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
test_intern in test_sys leaks negative references in free-threaded build #122420
The test_intern test "leaks" -2 references in the free-threaded build. This isn't caught by the refleak build bots because negative refleaks are treated as "suspicious" rather than "failing". This is a problem because the negative "leak" can hide a real leak somewhere else.
I think there's likely something wrong with the accounting for references in the immortalize=1 case in intern_common because this shows up in the free-threaded build, but not the default build.
./python -m test test_sys -m test_intern -R 3:3
Using random seed: 3390398091
0:00:00 load avg: 14.98 Run 1 test sequentially
0:00:00 load avg: 14.98 [1/1] test_sys
beginning 6 repetitions. Showing number of leaks (. for 0 or less, X for 10 or more)
123:456
X8. ...
test_sys leaked [-2, -2, -2] references, sum=-6 (this is fine)
Activity
colesbury commentedon Jul 29, 2024
cc @encukou
colesbury commentedon Jul 29, 2024
I think this is just an issue with
refleak.py:cpython/Lib/test/libregrtest/refleak.py
Lines 144 to 148 in 046670c
We now account for those two references in
intern_common, so we shouldn't subtract them out inrefleak.py:cpython/Objects/unicodeobject.c
Lines 15518 to 15527 in 046670c
pythongh-122420: Fix accounting for immortal, interned strings in ref…
gh-122420: Fix accounting for immortal interned strings in refleak.py (…
pythongh-122420: Fix accounting for immortal interned strings in refl…
[3.13] gh-122420: Fix accounting for immortal interned strings in ref…