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
segfault calling sys.excepthook with non-Exception argument #47903
Comments
Calling sys.excepthook(1,'1',1) crashes 3.0: Python 3.0b3+ (py3k:65987, Aug 23 2008, 10:04:31)
[GCC 4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys; sys.excepthook(1,'1',1)
Segmentation fault gdb points at "PyException_GetTraceback at Objects/exceptions.c:265 This was found by Fusil and Victor Stinner (haypo) sent me a patch (see Thanks bpeterson for triaging :) PS: I also think that bpo-3643 should be targeted to 3.0, as the |
Patch looks good. |
Ok. Applied in r65998. |
The patch should probably used PyErr_Format() followed by |
Attaching new patch... |
PyErr_Format sets the new exception and returns NULL though. |
I think you need to clear the exception again before returning. |
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:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: