]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-130030: Fix crash on 32-bit Linux with free threading (gh-130043)
authorSam Gross <colesbury@gmail.com>
Wed, 12 Feb 2025 23:09:15 +0000 (18:09 -0500)
committerGitHub <noreply@github.com>
Wed, 12 Feb 2025 23:09:15 +0000 (18:09 -0500)
commite09442089eb86d88d4b5a96e56f713cb31173ae9
treec226bba4ee51fda97810b3dc16a64b76be31d1d2
parent791cdfe1416a591e240b8ffc6f10eb6f659c8277
gh-130030: Fix crash on 32-bit Linux with free threading (gh-130043)

The `gc_get_refs` assertion needs to be after we check the alive and
unreachable bits. Otherwise, `ob_tid` may store the actual thread id
instead of the computed `gc_refs`, which may trigger the assertion if
the `ob_tid` looks like a negative value.

Also fix a few type warnings on 32-bit systems.
Objects/obmalloc.c
Python/gc_free_threading.c