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
{{ message }}
Repository navigation
Commit c39fc6d
Browse filesBrowse the repository at this point in the historyBrowse files
[mypyc] Make tagged int attributes memory safe under free threading (#22203)
Previously native tagged `int` attributes used completely unsynchronized
access, which could result in use after free or double frees. Fix the
memory safety issues, but only synchronize if an int has a long value
(tag bit set and not undefined).
It can still leak memory if there is a race condition involving long
integers (e.g. 2**62 or larger on a 64-bit platform). This is a
compromise
to avoid slowing down very common (and fast) operations with short
tagged integers.
The implementation is otherwise similar to attributes with regular
reference types.
This doesn't have a measurable impact on self check performance
on Python 3.14t.
Work on mypyc/mypyc#1203.
0 commit comments