Message385487
For faulthandler.enable(), maybe we reset SIGSEGV signal handler to the default handler if __has_feature(address_sanitizer) is true:
https://clang.llvm.org/docs/AddressSanitizer.html#conditional-compilation-with-has-feature-address-sanitizer
But we cannot do that in faulthandler._sigsegv() since this function is used to test_faulthandler to check the signal handler installed by faulthandler previously.
Maybe we should add a function to test.support which resets the signal handler and then trigger a crash.
There are multiple functions which trigger crashes on purpose:
* _testcapi.crash_no_current_thread() => Py_FatalError()
* _testcapi.return_null_without_error() => Py_FatalError()
* _testcapi.return_result_wit_error() => Py_FatalError()
* _testcapi.negative_refcount() => Py_FatalError()
* _testcapi.pymem_buffer_overflow() => Py_FatalError()
* _testcapi.set_nomemory(0) is used to trigger a _PyErr_NormalizeException crash => Py_FatalError()
* etc.
Py_FatalError() calls abort() which raises SIGABRT signal, but ASAN doesn't catch this signal.
More generally, search for support.SuppressCrashReport usage in tests.
See also faulthandler_suppress_crash_report() C function. |
|
Date |
User |
Action |
Args |
2021-01-22 10:16:04 | vstinner | set | recipients:
+ vstinner, orsenthil, pablogsal |
2021-01-22 10:16:04 | vstinner | set | messageid: <1611310564.82.0.550526464372.issue42985@roundup.psfhosted.org> |
2021-01-22 10:16:04 | vstinner | link | issue42985 messages |
2021-01-22 10:16:04 | vstinner | create | |
|