-
-
Notifications
You must be signed in to change notification settings - Fork 32.1k
Segfault on cls.__dict__['__new__'].__annotations__
#125017
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Labels
3.14
bugs and security fixes
interpreter-core
(Objects, Python, Grammar, and Parser dirs)
type-crash
A hard crash of the interpreter, possibly with a core dump
Comments
This was referenced Oct 6, 2024
@JelleZijlstra I took a quick glance at the implementation and PR, and I think this is a matter of forgetting to initialize |
Thanks @ZeroIntensity, I agree that's the right diagnosis. Found a related crash too:
|
JelleZijlstra
added a commit
to JelleZijlstra/cpython
that referenced
this issue
Oct 17, 2024
…ethod annotations
JelleZijlstra
added a commit
that referenced
this issue
Oct 17, 2024
zware
added a commit
to zware/cpython
that referenced
this issue
Oct 17, 2024
zware
added a commit
that referenced
this issue
Oct 17, 2024
ebonnal
pushed a commit
to ebonnal/cpython
that referenced
this issue
Jan 12, 2025
…ethod annotations (python#125636)
ebonnal
pushed a commit
to ebonnal/cpython
that referenced
this issue
Jan 12, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
3.14
bugs and security fixes
interpreter-core
(Objects, Python, Grammar, and Parser dirs)
type-crash
A hard crash of the interpreter, possibly with a core dump
Uh oh!
There was an error while loading. Please reload this page.
Crash report
What happened?
The following is a reproducer of (another) segfault discovered when trying to test Python 3.14 in CI for Sphinx:
Whilst checking
__annotations__
directly is somewhat convoluted, it was originally triggered byinspect.isasyncgenfunction()
, which callsinspect._signature_is_functionlike()
via_has_code_flag()
.A similar error occurs with
__class_getitem__
and__init_subclass__
, but not with user-defined methdods declared with eitherclassmethod
orstaticmethod
. As the reproducer demonstrates, the segfault only happens with the descriptor object from__dict__
--cls.__new__.__annotations__
is fine.Bisection showed this to be due to d28afd3 (#119864), cc @JelleZijlstra
A
CPython versions tested on:
CPython main branch
Operating systems tested on:
Linux
Output from running 'python -VV' on the command line:
Python 3.14.0a0 (bisect/bad:d28afd3fa06, Oct 6 2024, 01:35:23) [GCC 13.2.0]
Linked PRs
The text was updated successfully, but these errors were encountered: