SIGN IN SIGN UP

[3.13] gh-127521: Mark list as "shared" before resizing if necessary (GH-127524) (GH-127533)

In the free threading build, if a non-owning thread resizes a list,
it must use QSBR to free the old list array because there may be a
concurrent access (without a lock) from the owning thread.

To match the pattern in dictobject.c, we just mark the list as "shared"
before resizing if it's from a non-owning thread and not already marked
as shared.
(cherry picked from commit c7dec02de2ed4baf3cd22ad094350265b52c18af)

Co-authored-by: Sam Gross <colesbury@gmail.com>
M
Miss Islington (bot) committed
e546876d83e1cc3f761e1eeca57f8a4533d06d00
Parent: a853610
Committed by GitHub <noreply@github.com> on 12/3/2024, 12:22:05 AM