-
-
Notifications
You must be signed in to change notification settings - Fork 30.6k
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
Segfault on cls.__dict__['__new__'].__annotations__
#125017
Labels
3.14
new features, 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
AA-Turner
added
interpreter-core
(Objects, Python, Grammar, and Parser dirs)
type-crash
A hard crash of the interpreter, possibly with a core dump
3.14
new features, bugs and security fixes
labels
Oct 6, 2024
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
3.14
new features, 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
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: