Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

C assertion error from the runtime while expecting a SyntaxError #100050

Closed
Labels
interpreter-core(Objects, Python, Grammar, and Parser dirs)type-crashA hard crash of the interpreter, possibly with a core dump
@yilei

Description

@yilei

Crash report

In a--with-pydebug build, run the following code:

$ cat ~/tmp/t.pyimport astast.parse("""func(    a=["unclosed], # Need a quote in this comment: "    b=2,)""")$ ./python ~/tmp/t.py

Error messages

python: Objects/call.c:324: _PyObject_Call: Assertion `!_PyErr_Occurred(tstate)' failed.fish: Job 1, './python ~/tmp/t.py' terminated by signal SIGABRT (Abort)

(How do I obtain a core dump?)

I think the error happens inside this call:

raise_unclosed_parentheses_error(p);

What happened is that the_PyTokenizer_Get(p->tok, &new_token) call earlier also sets an errorhere.

Your environment

  • CPython versions tested on: main branch at5c19050, but this also happens since Python 3.10
  • Operating system and architecture: Linux x86_64

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    interpreter-core(Objects, Python, Grammar, and Parser dirs)type-crashA hard crash of the interpreter, possibly with a core dump

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp