New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bpo-38965: Fix stuck in test_stack_overflow tests. #17462
Conversation
7bee273
to
38206ab
Compare
After update to GCC10, the testcase is stuck and a pragma needs to be added.
38206ab
to
78a2825
Compare
Well, based on the discussion for https://bugs.python.org/issue23654 |
An alternative fix would be someting like: diff --git a/Modules/faulthandler.c b/Modules/faulthandler.c
index d1280532ae..7a48a39be4 100644
--- a/Modules/faulthandler.c
+++ b/Modules/faulthandler.c
@@ -1167,6 +1167,9 @@ faulthandler_fatal_error_py(PyObject *self, PyObject *args)
* a loop. */
# pragma intel optimization_level 0
#endif
+
+unsigned char *buffer_ptr;
+
static
uintptr_t
stack_overflow(uintptr_t min_sp, uintptr_t max_sp, size_t *depth)
@@ -1179,6 +1182,7 @@ stack_overflow(uintptr_t min_sp, uintptr_t max_sp, size_t *depth)
return sp;
buffer[0] = 1;
buffer[4095] = 0;
+ buffer_ptr = &buffer[0];
return stack_overflow(min_sp, max_sp, depth);
} @vstinner What do you prefer? |
If "+ buffer_ptr = &buffer[0];" prevents compiler specific pragma and fix the bug, yes: I prefer code working on any compiler ;-) |
After update to GCC10, the testcase is stuck and
a pragma needs to be added.
https://bugs.python.org/issue38965