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] Move setting of __cpyfunction__ outside of constructor (#20630)
When the `__cpyfunction__` attribute of callable class objects is
initialized in the constructor, it might end up becoming `NULL` after a
freed instance is reused because the attribute gets cleared when
deallocating the object and the constructor would only initialize it
when creating a new instance.
To fix this, move the initialization outside of the constructor and do
it right after. This also makes it consistent with the `__mypyc_env__`
attribute.
0 commit comments