diff options
| author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2024-08-17 20:38:02 (GMT) |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-08-17 20:38:02 (GMT) |
| commit | ff58c3cb48a68949b2058f3642c9088b7d498e36 (patch) | |
| tree | e688091cdeac181a0c2bf6fae0bb52b779baa4e0 /Lib/idlelib/pyshell.py | |
| parent | 6001deacb73e10e6f4b6fc16286cfda2babeb59e (diff) | |
| download | cpython-ff58c3cb48a68949b2058f3642c9088b7d498e36.zip cpython-ff58c3cb48a68949b2058f3642c9088b7d498e36.tar.gz cpython-ff58c3cb48a68949b2058f3642c9088b7d498e36.tar.bz2 | |
[3.13] gh-123022: Fix crash with `Py_Initialize` in background thread (GH-123052) (#123114)
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.
(cherry picked from commit d061ffea7b408861d0a9d311e92c363da284971d)
Co-authored-by: Sam Gross <colesbury@gmail.com>
Diffstat (limited to 'Lib/idlelib/pyshell.py')
0 files changed, 0 insertions, 0 deletions
