This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: PyErr_WriteUnraisable lacks exception type check
Type: Stage:
Components: Interpreter Core Versions: Python 2.5
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: nnorwitz Nosy List: gbeced, nnorwitz
Priority: normal Keywords:

Created on 2007-02-26 15:00 by gbeced, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (2)
msg31359 - (view) Author: Gabriel Becedillas (gbeced) Date: 2007-02-26 15:00
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()
msg31360 - (view) Author: Neal Norwitz (nnorwitz) * (Python committer) Date: 2007-02-26 23:50
Thanks for the report.  The print is kinda crappy, but it shouldn't crash.

Committed revision 53974. (2.5)
Committed revision 53975. (2.6)
History
Date User Action Args
2022-04-11 14:56:22adminsetgithub: 44619
2007-02-26 15:00:20gbecedcreate