cpython/Lib
Miss Islington (bot) ff58c3cb48
[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 d061ffea7b)

Co-authored-by: Sam Gross <colesbury@gmail.com>
2024-08-17 20:38:02 +00:00
..
__phello__
_pyrepl [3.13] gh-119896: Fix CTRL-Z behavior in the new REPL on Windows (GH-122217) (#122451) 2024-07-30 12:34:22 -07:00
asyncio [3.13] gh-121913: Use str(exc) instead of exc.strerror in `asyncio.base_events` (GH-122269) (#122278) 2024-07-25 12:20:40 +00:00
collections
concurrent [3.13] gh-120121: Add InvalidStateError to concurrent.futures.__all__ (GH-120123) (#120273) 2024-06-08 16:35:10 +00:00
ctypes [3.13] gh-105733: Soft-deprecate ctypes.ARRAY, rather than hard-deprecating it. (GH-122281) (GH-122440) 2024-07-30 08:05:09 +00:00
curses
dbm [3.13] gh-120417: Remove unused imports in the stdlib (GH-120420) (#120429) 2024-06-12 19:27:32 +00:00
email [3.13] gh-121650: Encode newlines in headers, and verify headers are sound (GH-122233) (#122484) 2024-08-06 19:06:41 +02:00
encodings
ensurepip [3.13] gh-122744: Bump bundled pip to 24.2 (#122746) 2024-08-06 18:50:12 +00:00
html
http [3.13] gh-121905: Consistently use "floating-point" instead of "floating point" (GH-121907) (GH-122012) 2024-07-19 09:13:08 +00:00
idlelib [3.13] GH-122482: Make About IDLE direct discussion to DPO (GH-122483) (#122485) 2024-07-30 22:54:01 +00:00
importlib [3.13] gh-116608: Apply style and compatibility changes from importlib_resources. (GH-123028) (#123051) 2024-08-15 19:57:07 +00:00
json
logging [3.13] gh-105376: Restore deprecated logging warn() method (GH-122775) (#122856) 2024-08-09 17:15:30 +02:00
multiprocessing
pathlib
pydoc_data Python 3.13.0rc1 2024-07-31 20:18:39 +02:00
re [3.13] Fix syntax in generate_re_casefix.py (GH-122699) (#122721) 2024-08-06 06:46:14 +00:00
site-packages
sqlite3
sysconfig [3.13] gh-120831: Correct default minimum iOS version. (GH-122339) (#122341) 2024-07-27 02:18:34 +00:00
test [3.13] gh-123022: Fix crash with `Py_Initialize` in background thread (GH-123052) (#123114) 2024-08-17 20:38:02 +00:00
tkinter [3.13] gh-121905: Consistently use "floating-point" instead of "floating point" (GH-121907) (GH-122012) 2024-07-19 09:13:08 +00:00
tomllib
turtledemo [3.13] gh-120633: Move scrollbar and remove tear-off menus in turtledemo (GH-120634) (#120725) 2024-06-19 06:46:13 +00:00
unittest [3.13] gh-120732: Fix `name` passing to `Mock`, when using kwargs to `create_autospec` (GH-120737) (#120760) 2024-06-19 20:59:28 +00:00
urllib
venv
wsgiref
xml [3.13] gh-119577: Adjust DeprecationWarning when testing element truth values in ElementTree (GH-119762) (GH-120189) 2024-06-07 03:43:17 +00:00
xmlrpc
zipfile [3.13] gh-122903: Honor directories in zipfile.Path.glob. (GH-122908) (#122926) 2024-08-12 01:02:10 +00:00
zoneinfo
__future__.py
__hello__.py
_aix_support.py
_android_support.py [3.13] gh-116622: Add Android test script (GH-121595) (#123061) 2024-08-16 16:36:46 +08:00
_collections_abc.py
_colorize.py
_compat_pickle.py
_compression.py
_ios_support.py
_markupbase.py
_opcode_metadata.py
_osx_support.py
_py_abc.py
_pydatetime.py Revert "[3.13] gh-120713: Normalize year with century for datetime.strftime (GH-120820) (GH-121144)" (GH-122408) 2024-07-29 21:55:28 +03:00
_pydecimal.py [3.13] gh-121905: Consistently use "floating-point" instead of "floating point" (GH-121907) (GH-122012) 2024-07-19 09:13:08 +00:00
_pyio.py
_pylong.py
_sitebuiltins.py
_strptime.py
_threading_local.py
_weakrefset.py
abc.py
antigravity.py
argparse.py [3.13] gh-121018: Fix more cases of exiting in argparse when exit_on_error=False (GH-121056) (GH-121128) 2024-06-28 15:04:44 +00:00
ast.py
base64.py
bdb.py
bisect.py
bz2.py
cProfile.py
calendar.py [3.13] gh-120567: Clarify weekday return in calendar.monthrange docstring (GH-120570) (#120597) 2024-06-16 21:09:54 +00:00
cmd.py
code.py [3.13] gh-87320: In the code module, handle exceptions raised in sys.excepthook (GH-122456) (GH-122514) 2024-08-08 07:26:52 +00:00
codecs.py
codeop.py [3.13] gh-119521: Rename IncompleteInputError to _IncompleteInputError and remove from public API/ABI (GH-119680, GH-120955) (GH-120944) 2024-06-24 20:23:30 +02:00
colorsys.py [3.13] gh-121905: Consistently use "floating-point" instead of "floating point" (GH-121907) (GH-122012) 2024-07-19 09:13:08 +00:00
compileall.py
configparser.py
contextlib.py
contextvars.py
copy.py [3.13] gh-121300: Add `replace` to `copy.__all__` (GH-121302) (#121337) 2024-07-03 15:28:57 +00:00
copyreg.py
csv.py [3.13] gh-121905: Consistently use "floating-point" instead of "floating point" (GH-121907) (GH-122012) 2024-07-19 09:13:08 +00:00
dataclasses.py [3.13] gh-120417: Remove unused imports in the stdlib (GH-120420) (#120429) 2024-06-12 19:27:32 +00:00
datetime.py
decimal.py [3.13] gh-121905: Consistently use "floating-point" instead of "floating point" (GH-121907) (GH-122012) 2024-07-19 09:13:08 +00:00
difflib.py
dis.py
doctest.py
enum.py
filecmp.py [3.13] gh-122400: Handle ValueError in filecmp (GH-122401) (GH-122441) 2024-07-30 09:17:35 +00:00
fileinput.py
fnmatch.py
fractions.py [3.13] gh-119189: Fix the power operator for Fraction (GH-119242) (GH-119836) 2024-07-16 10:44:23 +03:00
ftplib.py
functools.py [3.13] gh-121027: Add a future warning in functools.partial.__get__ (GH-121086) (#121092) 2024-06-27 12:13:01 +00:00
genericpath.py
getopt.py
getpass.py
gettext.py
glob.py
graphlib.py
gzip.py [3.13] gh-112346: Always set OS byte to 255, simpler gzip.compress function. (GH-120486) (#120563) 2024-06-15 19:10:50 +00:00
hashlib.py
heapq.py
hmac.py
imaplib.py
inspect.py [3.13] gh-122087: Restore ismethoddescriptor() and isroutine() for partial objects (GH-122218) 2024-07-25 10:11:47 +03:00
io.py
ipaddress.py [3.13] gh-120128: fix description of argument to ipaddress.collapse_addresses() (GH-120131) (#120135) 2024-06-12 09:23:24 +03:00
keyword.py
linecache.py [3.13] gh-122170: Handle ValueError raised by os.stat() in linecache (GH-122176) (GH-122348) 2024-07-27 10:54:49 +00:00
locale.py
lzma.py
mailbox.py
mimetypes.py
modulefinder.py
netrc.py
ntpath.py [3.13] gh-120417: Remove unused imports in the stdlib (GH-120420) (#120429) 2024-06-12 19:27:32 +00:00
nturl2path.py
numbers.py
opcode.py
operator.py
optparse.py
os.py
pdb.py [3.13] gh-118714: Make the pdb post-mortem restart/quit behavior more reasonable (GH-118725) (#121346) 2024-07-03 12:15:53 -07:00
pickle.py [3.13] gh-122311: Fix some error messages in pickle (GH-122386) (GH-122387) 2024-07-29 12:27:14 +03:00
pickletools.py
pkgutil.py
platform.py
plistlib.py
poplib.py
posixpath.py
pprint.py
profile.py
pstats.py [3.13] gh-121905: Consistently use "floating-point" instead of "floating point" (GH-121907) (GH-122012) 2024-07-19 09:13:08 +00:00
pty.py
py_compile.py
pyclbr.py
pydoc.py [3.13] gh-120541: Improve the "less" prompt in pydoc (GH-120543) (GH-120562) 2024-06-15 18:21:13 +00:00
queue.py
quopri.py
random.py [3.13] gh-121905: Consistently use "floating-point" instead of "floating point" (GH-121907) (GH-122012) 2024-07-19 09:13:08 +00:00
reprlib.py
rlcompleter.py
runpy.py
sched.py [3.13] gh-121905: Consistently use "floating-point" instead of "floating point" (GH-121907) (GH-122012) 2024-07-19 09:13:08 +00:00
secrets.py
selectors.py
shelve.py
shlex.py
shutil.py [3.13] GH-89727: Fix `shutil.rmtree()` recursion error on deep trees (GH-119808) (#119918) 2024-06-01 20:38:55 +01:00
signal.py
site.py [3.13] gh-121790: Fix interactive console initialization (GH-121793) (GH-121822) 2024-07-16 00:49:41 +02:00
smtplib.py
socket.py [3.13] gh-122133: Rework pure Python socketpair tests to avoid use of importlib.reload. (GH-122493) (#122504) 2024-07-31 08:48:59 +00:00
socketserver.py
sre_compile.py
sre_constants.py
sre_parse.py
ssl.py
stat.py [3.13] gh-120417: Remove unused imports in the stdlib (GH-120420) (#120429) 2024-06-12 19:27:32 +00:00
statistics.py [3.13] gh-121905: Consistently use "floating-point" instead of "floating point" (GH-121907) (GH-122012) 2024-07-19 09:13:08 +00:00
string.py
stringprep.py
struct.py
subprocess.py
symtable.py [3.13] gh-119698: fix a special case in `symtable.Class.get_methods` (GH-121802) (#121909) 2024-07-17 13:54:40 +00:00
tabnanny.py [3.13] gh-120495: Fix incorrect exception handling in Tab Nanny (GH-120498) (#120548) 2024-06-15 11:28:28 +00:00
tarfile.py
tempfile.py
textwrap.py
this.py
threading.py [3.13] gh-121474: Add threading.Barrier parties arg sanity check. (GH-121480) (GH-122444) 2024-07-30 09:24:35 +00:00
timeit.py
token.py
tokenize.py
trace.py
traceback.py
tracemalloc.py
tty.py
turtle.py [3.13] Fix `print` usage in `turtle` doctests (GH-122940) (#122977) 2024-08-13 17:03:36 +00:00
types.py
typing.py [3.13] gh-114053: Fix another edge case involving `get_type_hints`, PEP 695 and PEP 563 (GH-120272) (#121003) 2024-06-25 16:30:08 +00:00
uuid.py
warnings.py [3.13] gh-122088: Copy the coroutine status of the underlying callable in `@warnings.deprecated` (GH-122086) (#122156) 2024-07-23 10:24:07 +00:00
wave.py
weakref.py
webbrowser.py
zipapp.py
zipimport.py