Miss Islington (bot) 1a798d30d8
[3.14] gh-120158: Fix inconsistent monitoring state when setting events too frequently (gh-141845) (gh-141879)
If we overflowed the global version counter (i.e., after 2*24 calls to
`_PyMonitoring_SetEvents`), we bailed out after setting global monitoring
events but before instrumenting code objects, which led to assertion errors
later on.

Also add a `time.sleep()` to `test_free_threading.test_monitoring` to avoid
overflowing the global version counter.
(cherry picked from commit e457d60daafe66534283e0f79c81517634408e57)

Co-authored-by: Sam Gross <colesbury@gmail.com>
2025-11-23 15:31:56 +00:00
..
2025-04-30 11:46:41 +02:00

Miscellaneous source files for the main Python shared library