cpython/Objects/mimalloc
Sam Gross d061ffea7b
gh-123022: Fix crash with Py_Initialize in background thread (#123052)
Check that the current default heap is initialized in
`_mi_os_get_aligned_hint` and `mi_os_claim_huge_pages`.

The mimalloc function `_mi_os_get_aligned_hint` assumes that there is an
initialized default heap. This is true for our main thread, but not for
background threads. The problematic code path is usually called during
initialization (i.e., `Py_Initialize`), but it may also be called if the
program allocates large amounts of memory in total.

The crash only affected the free-threaded build.
2024-08-17 16:04:08 -04:00
..
prim gh-121731: Fix mimalloc compile error on GNU/Hurd (#121732) 2024-07-14 12:50:25 -04:00
alloc-aligned.c
alloc-override.c
alloc-posix.c
alloc.c gh-115103: Enable internal mimalloc assertions in debug builds (#116343) 2024-03-05 13:54:20 -05:00
arena.c
bitmap.c Fix typos in comments (#120821) 2024-06-24 19:47:00 +02:00
bitmap.h
heap.c Fix typos in comments (#120821) 2024-06-24 19:47:00 +02:00
init.c gh-115491: Keep some fields valid across allocations (free-threading) (#115573) 2024-02-20 10:36:40 -05:00
options.c
os.c gh-123022: Fix crash with Py_Initialize in background thread (#123052) 2024-08-17 16:04:08 -04:00
page-queue.c
page.c gh-115103: Delay reuse of mimalloc pages that store PyObjects (#115435) 2024-03-06 09:42:11 -05:00
random.c
segment-map.c
segment.c gh-117755: Fix mimalloc for huge allocation on s390x (#117809) 2024-04-16 20:34:12 +00:00
static.c
stats.c