summaryrefslogtreecommitdiffstats
path: root/Modules/faulthandler.c
Commit message (Collapse)AuthorAgeFilesLines
* Issue #24115: Update uses of PyObject_IsTrue(), PyObject_Not(),Serhiy Storchaka2015-05-301-2/+2
|\ | | | | | | | | PyObject_IsInstance(), PyObject_RichCompareBool() and _PyDict_Contains() to check for and handle errors correctly.
| * Issue #24115: Update uses of PyObject_IsTrue(), PyObject_Not(),Serhiy Storchaka2015-05-301-2/+2
| | | | | | | | | | PyObject_IsInstance(), PyObject_RichCompareBool() and _PyDict_Contains() to check for and handle errors correctly.
* | Issue #23836: Fix the faulthandler module to handle reentrant callsVictor Stinner2015-04-011-40/+45
| | | | | | | | | | | | | | | | | | | | to its signal handlers. Use also _Py_write_noraise() instead of write() to retry write() if it is interrupted by a signal (fail with EINTR). faulthandler.dump_traceback() also calls PyErr_CheckSignals() to call the Python signal handler if a signal was received.
* | Merge 3.4 (faulthandler ICC)Victor Stinner2015-03-231-1/+8
|\ \ | |/
| * Issue #23654: Fix faulthandler._stack_overflow() for the Intel C Compiler (ICC)Victor Stinner2015-03-231-1/+8
| | | | | | | | | | | | | | Issue #23654: Turn off ICC's tail call optimization for the stack_overflow generator. ICC turns the recursive tail call into a loop. Patch written by Matt Frank.
* | Issue #23566: enable(), register(), dump_traceback() and dump_traceback_later()Victor Stinner2015-03-121-21/+35
| | | | | | | | functions of faulthandler now accept file descriptors. Patch by Wei Wu.
* | Fixed few compiler warnings.Serhiy Storchaka2015-02-161-1/+1
| |
* | Merge 3.4 (faulthandler)Victor Stinner2015-02-111-4/+5
|\ \ | |/
| * Issue #23433: Fix faulthandler._stack_overflow()Victor Stinner2015-02-111-4/+5
| | | | | | | | | | Fix undefined behaviour: don't compare pointers. Use Py_uintptr_t type instead of void*. It fixes test_faulthandler on Fedora 22 which now uses GCC 5.
* | (Merge 3.4) faulthandler: test_gil_released() now uses _sigsegv() instead ofVictor Stinner2014-09-301-15/+23
|\ \ | |/ | | | | | | | | | | _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.
| * faulthandler: test_gil_released() now uses _sigsegv() instead of _read_null(),Victor Stinner2014-09-301-15/+23
| | | | | | | | | | 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.
| * faulthandler: _sigsegv() and _sigabrt() don't accept parametersVictor Stinner2014-09-301-2/+2
| |
* | faulthandler: suppress crash reporter directly in test functions written toVictor Stinner2014-09-301-6/+41
| | | | | | | | crash.
* | Issue #22018: Add _testcapi.raise_signal()Victor Stinner2014-07-211-26/+0
|/ | | | | | | | - 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
* Issue #21497: faulthandler functions now raise a better error if sys.stderr isVictor Stinner2014-05-141-0/+4
| | | | | None: RuntimeError("sys.stderr is None") instead of AttributeError("'NoneType' object has no attribute 'fileno'").
* Merge: #19970: Fix some comment typos.R David Murray2013-12-141-1/+1
|\
| * #19970: Fix some comment typos.R David Murray2013-12-141-1/+1
| | | | | | | | Report and patch by Vajrasky Kok.
* | Issue #19512, #19515: remove shared identifiers, move identifiers where theyVictor Stinner2013-11-071-4/+6
| | | | | | | | | | | | | | are used. Move also _Py_IDENTIFIER() defintions to the top in modified files to remove identifiers duplicated in the same file.
* | Issue #19512: add some common identifiers to only create common strings once,Victor Stinner2013-11-061-1/+1
| | | | | | | | | | | | | | instead of creating temporary Unicode string objects Add also more identifiers in pythonrun.c to avoid temporary Unicode string objets for the interactive interpreter.
* | Close #18957: The PYTHONFAULTHANDLER environment variable now only enables theVictor Stinner2013-09-081-1/+4
| | | | | | | | | | faulthandler module if the variable is non-empty. Same behaviour than other variables like PYTHONDONTWRITEBYTECODE.
* | Issue #18203: Add _PyMem_RawStrdup() and _PyMem_Strdup()Victor Stinner2013-07-071-5/+6
| | | | | | | | | | Replace strdup() with _PyMem_RawStrdup() or _PyMem_Strdup(), depending if the GIL is held or not.
* | (Merge 3.3) Issue #18343: faulthandler.register() now keeps the previous signalVictor Stinner2013-07-011-1/+2
|\ \ | |/ | | | | | | handler when the function is called twice, so faulthandler.unregister() restores correctly the original signal handler.
| * Issue #18343: faulthandler.register() now keeps the previous signal handlerVictor Stinner2013-07-011-1/+2
| | | | | | | | | | when the function is called twice, so faulthandler.unregister() restores correctly the original signal handler.
* | Issue #9566: Explicit downcast to fix compiler warnings on Win64Victor Stinner2012-10-301-2/+4
| |
* | #16135: Removal of OS/2 support (Modules/*)Jesus Cea2012-10-051-3/+0
|/
* Closes #15969: rename new API to have consistent names in the faulthandler ↵Georg Brandl2012-09-221-14/+14
| | | | module.
* faulthandler: fix the handler of user signalsVictor Stinner2012-08-091-1/+6
| | | | Restore the errno before calling the previous signal handler, and not after.
* Fix the user signal handler of faulthandlerVictor Stinner2012-08-011-3/+2
| | | | | Don't exit the tstate is NULL to restore the errno and chain the signal handler if needed.
* Issue #14154: Reimplement the bigmem test memory watchdog as a subprocess.Charles-François Natali2012-03-241-184/+0
|
* Issue #13874: read_null() of faulthandler uses volatile to avoid optimisationVictor Stinner2012-01-291-1/+4
| | | | Clang 3.0 removes "y = *x;" instruction if the optimisation level is 3.
* Fix _PyFaulthandler_Fini() so it can be called before _PyFaulthandler_Init()Victor Stinner2012-01-101-2/+2
|
* Rename _Py_identifier to _Py_IDENTIFIER.Martin v. Löwis2011-10-141-3/+3
|
* Add API for static strings, primarily good for identifiers.Martin v. Löwis2011-10-091-3/+6
| | | | Thanks to Konrad Schöbel and Jasper Schulz for helping with the mass-editing.
* Fix compilation error under WindowsAntoine Pitrou2011-10-041-1/+2
|
* Use the faulthandler module's infrastructure to write a GIL-lessAntoine Pitrou2011-10-041-0/+183
| | | | memory watchdog for timely stats collection.
* Use the new Py_ARRAY_LENGTH macroVictor Stinner2011-09-281-1/+1
|
* Issue #12929: faulthandler now uses char* for arithmetic on pointersVictor Stinner2011-09-071-1/+1
| | | | instead of void*
* Issue #12550: Add chain optional argument to faulthandler.register()Victor Stinner2011-07-131-32/+60
| | | | Call the previous signal handler if chain is True.
* faulthandler: add missing include, pthread.h, for FreeBSD 6Victor Stinner2011-06-291-0/+4
|
* Remove useless assignmentsVictor Stinner2011-05-261-5/+4
| | | | Warnings found by the the Clang Static Analyzer.
* Close #12153: faulthandler, mark stack_overflow() as staticVictor Stinner2011-05-231-1/+1
|
* Issue #12058: Minor edits to comments in faulthandlerVictor Stinner2011-05-111-18/+18
| | | | Patch written by Éric Araujo.
* faulthandler: improve_sigabrt() on Visual StudioVictor Stinner2011-05-091-7/+5
| | | | | Use _set_abort_behavior() + abort() instead of raise(SIGABRT) which may write an error message and/or open a popup asking to report the fault.
* faulthandler: make quiet a gcc 4.6 warning (z was unused)Victor Stinner2011-05-091-2/+5
|
* faulthandler: dump all threads by defaultVictor Stinner2011-05-071-6/+6
| | | | | | | | | | * Set the default value of all_threads arguments to True * Py_FatalError() dumps all threads, instead of only the current thread Dump only the current thread is not reliable. In some cases, Python is unable to retrieve the state of the current thread and so is unable to dump the traceback. faulthandler keeps a reference to the interpreter and so is always able to dump the traceback of all threads.
* faulthandler: save/restore errno in the two signal handlersVictor Stinner2011-05-071-0/+4
|
* faulthandler: don't use sigprocmask()Victor Stinner2011-04-191-5/+1
| | | | | It has an undefined behaviour with threads, only use pthread_sigmask() if it is available (and not broken).
* Improve faulthandler.enable(all_threads=True)Victor Stinner2011-04-081-22/+32
| | | | | | | faulthandler.enable(all_threads=True) dumps the tracebacks even if it is not possible to get the state of the current thread Create also the get_thread_state() subfunction to factorize the code.
* faulthandler: dump_tracebacks_later() displays also the timeoutVictor Stinner2011-04-081-3/+49
|
* faulthandler: fix variable name, timeout_ms => timeout_usVictor Stinner2011-04-081-6/+6
| | | | The comment was already correct.