* Add support.MS_WINDOWS: True if Python is running on Microsoft Windows.
* Add support.MACOS: True if Python is running on Apple macOS.
* Replace support.is_android with support.ANDROID
* Replace support.is_jython with support.JYTHON
* Cleanup code to initialize unix_shell
* bpo-30557: faulthandler now correctly filters and displays exception codes on Windows
* Adds test for non-fatal exceptions.
* Adds bpo number to comment.
* bpo-30125: Cleanup faulthandler.c
* Use size_t type for iterators
* Add { ... }
* bpo-30125: Fix faulthandler.disable() on Windows
On Windows, faulthandler.disable() now removes the exception handler
installed by faulthandler.enable().
Issue #23848, #26622:
* faulthandler now only logs fatal Windows exceptions.
* write error code as decimal, not as hexadecimal
* replace "Windows exception" with "Windows fatal exception"
Issue #23848: On Windows, faulthandler.enable() now also installs an exception
handler to dump the traceback of all Python threads on any Windows exception,
not only on UNIX signals (SIGSEGV, SIGFPE, SIGABRT).
Issue #26563:
* Add _PyGILState_GetInterpreterStateUnsafe() function: the single
PyInterpreterState used by this process' GILState implementation.
* Enhance _Py_DumpTracebackThreads() to retrieve the interpreter state from
autoInterpreterState in last resort. The function now accepts NULL for interp
and current_tstate parameters.
* test_faulthandler: fix a ResourceWarning when test is interrupted by CTRL+c
mode. Explicitly remove the PYTHONFAULTHANDLER environment variable before
launching a child interpreter when its presence would impact the test (the
reason -E was being used in the first place).
This enables running the test in an environment where other Python environment variables must be set in order for things to run (such as using PYTHONHOME to
tell an embedded interpreter where it should think it lives).
mode. Explicitly remove the PYTHONFAULTHANDLER environment variable before
launching a child interpreter when its presence would impact the test (the
reason -E was being used in the first place).
This enables running the test in an environment where other Python environment
variables must be set in order for things to run (such as using PYTHONHOME to
tell an embedded interpreter where it should think it lives).
_read_null(), because _read_null() cannot be used on AIX. On AIX, reading from
NULL is allowed: the first page of memory is a mapped read-only on AIX.
_read_null() and _sigabrt() don't accept parameters.
- Use _testcapi.raise_signal() in test_signal
- close also os.pipe() file descriptors in some test_signal tests where they
were not closed properly
- Remove faulthandler._sigill() and faulthandler._sigbus(): reuse
_testcapi.raise_signal() in test_faulthandler
AIX maps the first page of memory at address zero as valid, read-only. Reading
NULL is not a fault on AIX. This is utilized by IBM compiler optimizations.
One speculatively can indirect through a pointer which may be null without
first testing if null and defer the test before using the value.
AIX maps the first page of memory at address zero as valid, read-only. Reading
NULL is not a fault on AIX. This is utilized by IBM compiler optimizations.
One speculatively can indirect through a pointer which may be null without
first testing if null and defer the test before using the value.
faulthandler requires the importlib if "-X faulthandler" option is present on
the command line, so initialize faulthandler after importlib.
Add also an unit test.