Skip to content

test_intern in test_sys leaks negative references in free-threaded build #122420

Description

@colesbury

Bug report

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)

Linked PRs

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    3.13bugs and security fixes3.14bugs and security fixestopic-free-threadingtype-bugAn unexpected behavior, bug, or error

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions