summaryrefslogtreecommitdiffstats
path: root/Modules/faulthandler.c
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2020-01-30 12:09:11 (GMT)
committerGitHub <noreply@github.com>2020-01-30 12:09:11 (GMT)
commit2a4903fcce54c25807d362dbbbcfb32d0b494f9f (patch)
tree9ed04fc7af4e5926778b0764be5078a1f6338b64 /Modules/faulthandler.c
parent17c68b8107e348aeaaa05f7ac5072cacff916022 (diff)
downloadcpython-2a4903fcce54c25807d362dbbbcfb32d0b494f9f.zip
cpython-2a4903fcce54c25807d362dbbbcfb32d0b494f9f.tar.gz
cpython-2a4903fcce54c25807d362dbbbcfb32d0b494f9f.tar.bz2
bpo-38631: Add _Py_NO_RETURN to functions calling Py_FatalError() (GH-18278)
Add _Py_NO_RETURN to functions calling Py_FatalError(): * _PyObject_AssertFailed() * dummy_dealloc() * faulthandler_fatal_error_thread() * none_dealloc() * notimplemented_dealloc()
Diffstat (limited to 'Modules/faulthandler.c')
-rw-r--r--Modules/faulthandler.c16
1 files changed, 1 insertions, 15 deletions
diff --git a/Modules/faulthandler.c b/Modules/faulthandler.c
index b19401e..555e1af 100644
--- a/Modules/faulthandler.c
+++ b/Modules/faulthandler.c
@@ -1065,24 +1065,10 @@ faulthandler_sigsegv(PyObject *self, PyObject *args)
Py_RETURN_NONE;
}
-static void
+static void _Py_NO_RETURN
faulthandler_fatal_error_thread(void *plock)
{
-#ifndef __clang__
- PyThread_type_lock *lock = (PyThread_type_lock *)plock;
-#endif
-
Py_FatalError("in new thread");
-
-#ifndef __clang__
- /* Issue #28152: Py_FatalError() is declared with
- __attribute__((__noreturn__)). GCC emits a warning without
- "PyThread_release_lock()" (compiler bug?), but Clang is smarter and
- emits a warning on the return. */
-
- /* notify the caller that we are done */
- PyThread_release_lock(lock);
-#endif
}
static PyObject *