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

PyErr_WriteUnraisable lacks exception type check #44619

Closed
gbeced mannequin opened this issue Feb 26, 2007 · 2 comments
Closed

PyErr_WriteUnraisable lacks exception type check #44619

gbeced mannequin opened this issue Feb 26, 2007 · 2 comments
Labels
interpreter-core (Objects, Python, Grammar, and Parser dirs)

Comments

@gbeced
Copy link
Mannequin

gbeced mannequin commented Feb 26, 2007

BPO 1669182

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields:

assignee = None
closed_at = <Date 2007-02-26.23:50:53.000>
created_at = <Date 2007-02-26.15:00:20.000>
labels = ['interpreter-core']
title = 'PyErr_WriteUnraisable lacks exception type check'
updated_at = <Date 2007-02-26.23:50:53.000>
user = 'https://bugs.python.org/gbeced'

bugs.python.org fields:

activity = <Date 2007-02-26.23:50:53.000>
actor = 'nnorwitz'
assignee = 'nnorwitz'
closed = True
closed_date = None
closer = None
components = ['Interpreter Core']
creation = <Date 2007-02-26.15:00:20.000>
creator = 'gbeced'
dependencies = []
files = []
hgrepos = []
issue_num = 1669182
keywords = []
message_count = 2.0
messages = ['31359', '31360']
nosy_count = 2.0
nosy_names = ['nnorwitz', 'gbeced']
pr_nums = []
priority = 'normal'
resolution = 'fixed'
stage = None
status = 'closed'
superseder = None
type = None
url = 'https://bugs.python.org/issue1669182'
versions = ['Python 2.5']

@gbeced
Copy link
Mannequin Author

gbeced mannequin commented Feb 26, 2007

I'd hit an access violation inside PyErr_WriteUnraisable when a non-exception instance was raised. The call to PyExceptionClass_Name with a non-exception instance is yielding an invalid pointer.
I'd hit the bug embedding Python 2.5 and raising a string instance via PyThreadState_SetAsyncExc but I could also reproduce the crash with this sample code:

class Foo:
    def __del__(self):
        raise "pum"

a = Foo()

@gbeced gbeced mannequin closed this as completed Feb 26, 2007
@gbeced gbeced mannequin assigned nnorwitz Feb 26, 2007
@gbeced gbeced mannequin added the interpreter-core (Objects, Python, Grammar, and Parser dirs) label Feb 26, 2007
@gbeced gbeced mannequin closed this as completed Feb 26, 2007
@gbeced gbeced mannequin assigned nnorwitz Feb 26, 2007
@gbeced gbeced mannequin added the interpreter-core (Objects, Python, Grammar, and Parser dirs) label Feb 26, 2007
@nnorwitz
Copy link
Mannequin

nnorwitz mannequin commented Feb 26, 2007

Thanks for the report. The print is kinda crappy, but it shouldn't crash.

Committed revision 53974. (2.5)
Committed revision 53975. (2.6)

@ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
interpreter-core (Objects, Python, Grammar, and Parser dirs)
Projects
None yet
Development

No branches or pull requests

0 participants