You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[mypyc] Fix segfault when top level raises exception (#10586)
If an error occurs while running the initialization code, set the
CPyModule_<name>_internal module pointer to NULL so future attempts to
import that same module don't mistakenly think that the module is
already initialized due to the fact that that module pointer is not
NULL.
Clearing that module pointer on error allows us to keep initializing it
at the beginning of the function before running any top level code,
which is necessary to prevent RecursionErrors when dealing with circular
imports.
0 commit comments