cpython/Modules/_sre
Miss Islington (bot) f47e928574
[3.14] gh-116738: Fix thread-safety issue in re module for free threading (gh-141923) (gh-141990)
Added atomic operations to `scanner_begin()` and `scanner_end()` to prevent
race conditions on the `executing` flag in free-threaded builds. Also added
tests for concurrent usage of the `re` module.

Without the atomic operations, `test_scanner_concurrent_access()` triggers
`assert(self->executing)` failures, or a thread sanitizer run emits errors.
(cherry picked from commit bc9e63dd9d)

Co-authored-by: Alper <alperyoney@fb.com>
2025-11-26 21:08:39 +00:00
..
clinic gh-131525: Cache the result of tuple_hash (#131529) 2025-03-27 09:57:06 -04:00
sre.c [3.14] gh-116738: Fix thread-safety issue in re module for free threading (gh-141923) (gh-141990) 2025-11-26 21:08:39 +00:00
sre.h gh-67877: Fix memory leaks in terminated RE matching (GH-126840) 2024-11-18 11:53:45 +02:00
sre_constants.h gh-105687: Remove deprecated objects from re module (#105688) 2023-06-14 12:26:20 +02:00
sre_lib.h gh-124130: Fix a bug in matching regular expression \B in empty string (GH-127007) 2025-01-02 12:11:21 +00:00
sre_targets.h gh-97669: Create Tools/build/ directory (#97963) 2022-10-17 12:01:00 +02:00