Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Regression in MemoryError displaying (_PyErr_Display fallback to C impl of print_exception) #110912

Closed
chgnrdv opened this issue Oct 16, 2023 · 2 comments · Fixed by #110921
Closed
Assignees
Labels
type-bug An unexpected behavior, bug, or error

Comments

@chgnrdv
Copy link
Contributor

chgnrdv commented Oct 16, 2023

Bug report

Bug description:

After e733136:

>>> raise MemoryError()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
object address  : 0x7fd3b6037540
object refcount : 3
object type     : 0x556d6e04cf40
object type name: MemoryError
object repr     : MemoryError()
lost sys.stderr

cc @pablogsal

CPython versions tested on:

CPython main branch

Operating systems tested on:

Linux

Linked PRs

@chgnrdv chgnrdv added the type-bug An unexpected behavior, bug, or error label Oct 16, 2023
@pablogsal pablogsal self-assigned this Oct 16, 2023
@serhiy-storchaka
Copy link
Member

Seen this with real MemoryError, but I thought it was because the error handler couldn't run when out of memory. But if it produces this for an artificial MemoryError, something is very wrong.

@pablogsal
Copy link
Member

pablogsal commented Oct 16, 2023

Seen this with real MemoryError, but I thought it was because the error handler couldn't run when out of memory. But if it produces this for an artificial MemoryError, something is very wrong.

This was caused by an (incorrect) forceful fallback to the C implementation of the traceback machinery after we switched to use the Python traceback module as the main mechanism. Fixed in #110921

pablogsal added a commit that referenced this issue Oct 16, 2023
aisk pushed a commit to aisk/cpython that referenced this issue Feb 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type-bug An unexpected behavior, bug, or error
Projects
None yet
3 participants