-
-
Notifications
You must be signed in to change notification settings - Fork 34.4k
_PyPegen_add_type_comment_to_arg can fail in _PyPegen_name_default_pair #148157
Copy link
Copy link
Closed
Labels
interpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)topic-parsertype-crashA hard crash of the interpreter, possibly with a core dumpA hard crash of the interpreter, possibly with a core dump
Description
Crash report
What happened?
>>> import _testcapi
>>> _testcapi.Py_CompileStringExFlags(b"def a(f=8,#type: \x80\n\x80", "<test>", 256, 0x0800 | 0x1000)
python: Objects/typeobject.c:2440: type_call: Assertion `!_PyErr_Occurred(tstate)' failed.
Aborted (core dumped) ./pythonIn _PyPegen_name_default_pair, we call:
cpython/Parser/action_helpers.c
Line 437 in a95ee3a
| a->arg = _PyPegen_add_type_comment_to_arg(p, arg, tc); |
but don't check if it failed (and returned
NULL).
CPython versions tested on:
CPython main branch
Operating systems tested on:
No response
Output from running 'python -VV' on the command line:
No response
Linked PRs
- gh-148157: Check for
_PyPegen_add_type_comment_to_argfail in_PyPegen_name_default_pair#148158 - [3.14] gh-148157: Check for
_PyPegen_add_type_comment_to_argfail in_PyPegen_name_default_pair(GH-148158) #148162 - [3.13] gh-148157: Check for
_PyPegen_add_type_comment_to_argfail in_PyPegen_name_default_pair(GH-148158) #148163
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
interpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)topic-parsertype-crashA hard crash of the interpreter, possibly with a core dumpA hard crash of the interpreter, possibly with a core dump