Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[3.13] gh-123022: Fix crash withPy_Initialize in background thread (GH-123052)#123114

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged

Conversation

miss-islington
Copy link
Contributor

@miss-islingtonmiss-islington commentedAug 17, 2024
edited by bedevere-appbot
Loading

Check that the current default heap is initialized in
_mi_os_get_aligned_hint andmi_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 commitd061ffe)

Co-authored-by: Sam Grosscolesbury@gmail.com

…ythonGH-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 aninitialized default heap. This is true for our main thread, but not forbackground threads. The problematic code path is usually called duringinitialization (i.e., `Py_Initialize`), but it may also be called if theprogram allocates large amounts of memory in total.The crash only affected the free-threaded build.(cherry picked from commitd061ffe)Co-authored-by: Sam Gross <colesbury@gmail.com>
@colesburycolesburyenabled auto-merge (squash)August 17, 2024 20:14
@colesburycolesbury merged commitff58c3c intopython:3.13Aug 17, 2024
38 checks passed
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@miss-islington@colesbury

[8]ページ先頭

©2009-2025 Movatter.jp