0
0
mirror of https://github.com/python/cpython.git synced 2024-11-30 18:51:15 +01:00
cpython/Tools
Sam Gross e69d068ad0
gh-117657: Fix race involving GC and heap initialization (#119923)
The `_PyThreadState_Bind()` function is called before the first
`PyEval_AcquireThread()` so it's not synchronized with the stop the
world GC. We had a race where `gc_visit_heaps()` might visit a thread's
heap while it's being initialized.

Use a simple atomic int to avoid visiting heaps for threads that are not
yet fully initialized (i.e., before `tstate_mimalloc_bind()` is called).

The race was reproducible by running:
`python Lib/test/test_importlib/partial/pool_in_threads.py`.
2024-06-04 09:42:13 -04:00
..
build gh-112844: Update CPE references for external dependencies (#118521) 2024-05-20 13:27:09 -04:00
buildbot
c-analyzer gh-117398: Use Per-Interpreter State for the _datetime Static Types (gh-119929) 2024-06-03 17:09:18 -06:00
cases_generator gh-119689: generate stack effect metadata for pseudo instructions (#119691) 2024-05-29 09:47:56 +00:00
clinic gh-119661: Add _Py_SINGLETON() include in Argumenet Clinic (#119712) 2024-05-29 11:37:04 +02:00
freeze
gdb gdb/libpython.py: Update PyLongObjectPtr docstring (GH-118438) 2024-05-02 08:57:45 +00:00
i18n
importbench
jit GH-118943: Fix a race condition when generating jit_stencils.h (GH-118957) 2024-05-16 12:11:42 -04:00
lockbench
msi gh-119679: Ensures correct import libraries are included in Windows install packages (GH-119790) 2024-06-03 15:42:45 +01:00
nuget
patchcheck
peg_generator gh-116991: Improve pygen --help for python subparser (#116992) 2024-06-03 10:52:35 +03:00
scripts
ssl
tsan gh-117657: Fix race involving GC and heap initialization (#119923) 2024-06-04 09:42:13 -04:00
tz
unicode
unittestgui
wasm gh-97747: Improvements to WASM browser REPL. (#97665) 2024-05-31 09:58:46 +02:00
README
requirements-dev.txt Bump types-psutil from 5.9.5.20240423 to 5.9.5.20240516 in /Tools (#119900) 2024-06-01 10:38:13 +00:00
requirements-hypothesis.txt build(deps): bump hypothesis from 6.100.0 to 6.100.2 in /Tools (#118462) 2024-05-04 14:47:48 +01:00

This directory contains a number of Python programs that are useful
while building or extending Python.

build           Automatically generated directory by the build system
                contain build artifacts and intermediate files.

buildbot        Batchfiles for running on Windows buildbot workers.

c-analyzer      Tools to check no new global variables have been added.

cases_generator Tooling to generate interpreters.

clinic          A preprocessor for CPython C files in order to automate
                the boilerplate involved with writing argument parsing
                code for "builtins".

freeze          Create a stand-alone executable from a Python program.

gdb             Python code to be run inside gdb, to make it easier to
                debug Python itself (by David Malcolm).

i18n            Tools for internationalization. pygettext.py
                parses Python source code and generates .pot files,
                and msgfmt.py generates a binary message catalog
                from a catalog in text format.

importbench     A set of micro-benchmarks for various import scenarios.

msi             Support for packaging Python as an MSI package on Windows.

nuget           Files for the NuGet package manager for .NET.

patchcheck      Tools for checking and applying patches to the Python source code
                and verifying the integrity of patch files.

peg_generator   PEG-based parser generator (pegen) used for new parser.

scripts         A number of useful single-file programs, e.g. run_tests.py
                which runs the Python test suite.

ssl             Scripts to generate ssl_data.h from OpenSSL sources, and run
                tests against multiple installations of OpenSSL and LibreSSL.

tz              A script to dump timezone from /usr/share/zoneinfo.

unicode         Tools for generating unicodedata and codecs from unicode.org
                and other mapping files (by Fredrik Lundh, Marc-Andre Lemburg
                and Martin von Loewis).

unittestgui     A Tkinter based GUI test runner for unittest, with test
                discovery.

wasm            Config and helpers to facilitate cross compilation of CPython
                to WebAssembly (WASM).

Note: The pynche color editor has moved to https://gitlab.com/warsaw/pynche