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.

Author vstinner
Recipients orsenthil, pablogsal, vstinner
Date 2021-01-22.10:16:04
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1611310564.82.0.550526464372.issue42985@roundup.psfhosted.org>
In-reply-to
Content
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.
History
Date User Action Args
2021-01-22 10:16:04vstinnersetrecipients: + vstinner, orsenthil, pablogsal
2021-01-22 10:16:04vstinnersetmessageid: <1611310564.82.0.550526464372.issue42985@roundup.psfhosted.org>
2021-01-22 10:16:04vstinnerlinkissue42985 messages
2021-01-22 10:16:04vstinnercreate