mirror of
https://github.com/python/cpython.git
synced 2025-12-10 19:10:59 +00:00
Issue #23654: Fix faulthandler._stack_overflow() for the Intel C Compiler (ICC)
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.
This commit is contained in:
parent
d4c2ac8394
commit
19276f184f
2 changed files with 9 additions and 1 deletions
|
|
@ -436,6 +436,7 @@ Doug Fort
|
||||||
Chris Foster
|
Chris Foster
|
||||||
John Fouhy
|
John Fouhy
|
||||||
Andrew Francis
|
Andrew Francis
|
||||||
|
Matt Frank
|
||||||
Stefan Franke
|
Stefan Franke
|
||||||
Martin Franklin
|
Martin Franklin
|
||||||
Kent Frazier
|
Kent Frazier
|
||||||
|
|
|
||||||
|
|
@ -911,7 +911,14 @@ faulthandler_fatal_error_py(PyObject *self, PyObject *args)
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(HAVE_SIGALTSTACK) && defined(HAVE_SIGACTION)
|
#if defined(HAVE_SIGALTSTACK) && defined(HAVE_SIGACTION)
|
||||||
static Py_uintptr_t
|
#ifdef __INTEL_COMPILER
|
||||||
|
/* Issue #23654: Turn off ICC's tail call optimization for the
|
||||||
|
* stack_overflow generator. ICC turns the recursive tail call into
|
||||||
|
* a loop. */
|
||||||
|
# pragma intel optimization_level 0
|
||||||
|
#endif
|
||||||
|
static
|
||||||
|
Py_uintptr_t
|
||||||
stack_overflow(Py_uintptr_t min_sp, Py_uintptr_t max_sp, size_t *depth)
|
stack_overflow(Py_uintptr_t min_sp, Py_uintptr_t max_sp, size_t *depth)
|
||||||
{
|
{
|
||||||
/* allocate 4096 bytes on the stack at each call */
|
/* allocate 4096 bytes on the stack at each call */
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue