Skip to content

Conversation

@chgnrdv
Copy link
Contributor

@chgnrdv chgnrdv commented Oct 15, 2023

Fixes #109894

  • set interp.static_objects.last_resort_memory_error.args to empty tuple to avoid crash on PyErr_Display() call
  • allow _PyExc_InitGlobalObjects() to be called on subinterpreter init

Fixes #109894

* set `interp.static_objects.last_resort_memory_error.args` to empty tuple to avoid crash on `PyErr_Display()` call
* allow `_PyExc_InitGlobalObjects()` to be called on subinterpreter init
@chgnrdv

This comment was marked as outdated.

Copy link
Member

@ericsnowcurrently ericsnowcurrently left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ericsnowcurrently
Copy link
Member

Thanks, @chgnrdv!

@ericsnowcurrently ericsnowcurrently added the needs backport to 3.12 only security fixes label Oct 23, 2023
@miss-islington-app
Copy link

Thanks @chgnrdv for the PR, and @ericsnowcurrently for merging it 🌮🎉.. I'm working now to backport this PR to: 3.12.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Oct 23, 2023
…erpreter (pythongh-110911)

Fixes pythonGH-109894

* set `interp.static_objects.last_resort_memory_error.args` to empty tuple to avoid crash on `PyErr_Display()` call
* allow `_PyExc_InitGlobalObjects()` to be called on subinterpreter init

---------

(cherry picked from commit 47d3e2e)

Co-authored-by: Radislav Chugunov <[email protected]>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
@bedevere-app
Copy link

bedevere-app bot commented Oct 23, 2023

GH-111238 is a backport of this pull request to the 3.12 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.12 only security fixes label Oct 23, 2023
@chgnrdv
Copy link
Contributor Author

chgnrdv commented Oct 24, 2023

@ericsnowcurrently thanks for review :)

ericsnowcurrently pushed a commit that referenced this pull request Nov 28, 2023
…terpreter (gh-110911) (gh-111238)

Fixes GH-109894

* set `interp.static_objects.last_resort_memory_error.args` to empty tuple to avoid crash on `PyErr_Display()` call
* allow `_PyExc_InitGlobalObjects()` to be called on subinterpreter init

---------

(cherry picked from commit 47d3e2e)

Co-authored-by: Radislav Chugunov <[email protected]>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
aisk pushed a commit to aisk/cpython that referenced this pull request Feb 11, 2024
…erpreter (pythongh-110911)

Fixes python#109894

* set `interp.static_objects.last_resort_memory_error.args` to empty tuple to avoid crash on `PyErr_Display()` call
* allow `_PyExc_InitGlobalObjects()` to be called on subinterpreter init

---------

Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Glyphack pushed a commit to Glyphack/cpython that referenced this pull request Sep 2, 2024
…erpreter (pythongh-110911)

Fixes python#109894

* set `interp.static_objects.last_resort_memory_error.args` to empty tuple to avoid crash on `PyErr_Display()` call
* allow `_PyExc_InitGlobalObjects()` to be called on subinterpreter init

---------

Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Segfault when printing MemoryError raised through PyErr_NoMemory() from subinterpreter

2 participants