diff --git a/Misc/NEWS.d/next/Library/2019-12-04-08-46-23.bpo-38965.Yl4gI2asdfa.rst b/Misc/NEWS.d/next/Library/2019-12-04-08-46-23.bpo-38965.Yl4gI2asdfa.rst new file mode 100644 index 00000000000000..9c07fb6be0d7b5 --- /dev/null +++ b/Misc/NEWS.d/next/Library/2019-12-04-08-46-23.bpo-38965.Yl4gI2asdfa.rst @@ -0,0 +1,2 @@ +After update to GCC10, the testcase is stuck and +a pragma needs to be added. diff --git a/Modules/faulthandler.c b/Modules/faulthandler.c index d1280532ae2d4d..2543f11cb0a085 100644 --- a/Modules/faulthandler.c +++ b/Modules/faulthandler.c @@ -1169,6 +1169,11 @@ faulthandler_fatal_error_py(PyObject *self, PyObject *args) #endif static uintptr_t +#ifdef __GNUC__ + /* For the very same reason, the GCC compiler can turn the tail + * call into a loop. */ +__attribute__((optimize("-O0"))) +#endif stack_overflow(uintptr_t min_sp, uintptr_t max_sp, size_t *depth) { /* allocate 4096 bytes on the stack at each call */