-
-
Notifications
You must be signed in to change notification settings - Fork 31.1k
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
bpo-30125: disable faulthandler in ctypes test_SEH #1237
Conversation
@Haypo, thanks for your PR! By analyzing the history of the files in this pull request, we identified @zware, @theller and @serhiy-storchaka to be potential reviewers. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, but when could faulthandler be missing? I think you could use support.import_module to simplify things and still have protection from missing faulthandler if it's needed.
Wait... faulthandler.disable() is broken on Windows: I simply forgot to implement RemoveVectoredExceptionHandler()! I will write a second PR. |
Other Python implementations may implement ctypes but not faulthandler. Note: PyPy implements faulthandler, but I don't know if they implemented the Windows exception handler. |
See #1240 for the faulthandler.disable() fix. |
Oh, the first run of test_ctypes using -W failed:
But the second run without -W succeeded. I fixed my change to call enable() with file=sys.stderr.fileno() instead. I should now work in all cases. I also fixed enable() call: pass all_threads=True. Since the code became more complex than expected, I moved it to a new helper in test.support. I saw that test.support always import faulthandler, so I removed the try/except ImportError. |
Disable faulthandler to run test_SEH() of test_ctypes to prevent the following log with a traceback: Windows fatal exception: access violation Add support.disable_faulthandler() context manager.
Disable faulthandler to run test_SEH() of test_ctypes to prevent the following log with a traceback: Windows fatal exception: access violation Add support.disable_faulthandler() context manager. (cherry picked from commit a36e939)
Disable faulthandler to run test_SEH() of test_ctypes to prevent the
following log with a traceback: