diff options
author | Łukasz Langa <lukasz@langa.pl> | 2021-09-15 18:34:57 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-15 18:34:57 (GMT) |
commit | 2563dd2d0a1cf793afca328ae9e195b72bd2b391 (patch) | |
tree | 9747e5f5eee587a9f3cbfb94577c90bf5f4c2b69 /Python | |
parent | 89966f59c2e1d0558f8126458acc7d7ae2a8fef5 (diff) | |
download | cpython-2563dd2d0a1cf793afca328ae9e195b72bd2b391.zip cpython-2563dd2d0a1cf793afca328ae9e195b72bd2b391.tar.gz cpython-2563dd2d0a1cf793afca328ae9e195b72bd2b391.tar.bz2 |
[3.10] bpo-34602: Quadruple stack size on macOS when compiling with UBSAN (GH-27309) (GH-28280)
(cherry picked from commit be9de8721d63b9d8e032d508069daf88c06542c6)
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
Diffstat (limited to 'Python')
-rw-r--r-- | Python/thread_pthread.h | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/Python/thread_pthread.h b/Python/thread_pthread.h index ec7d737..a45d842 100644 --- a/Python/thread_pthread.h +++ b/Python/thread_pthread.h @@ -32,18 +32,17 @@ #define THREAD_STACK_SIZE 0 /* use default stack size */ #endif -/* The default stack size for new threads on OSX and BSD is small enough that +/* The default stack size for new threads on BSD is small enough that * we'll get hard crashes instead of 'maximum recursion depth exceeded' * exceptions. * - * The default stack sizes below are the empirically determined minimal stack + * The default stack size below is the empirically determined minimal stack * sizes where a simple recursive function doesn't cause a hard crash. + * + * For macOS the value of THREAD_STACK_SIZE is determined in configure.ac + * as it also depends on the other configure options like chosen sanitizer + * runtimes. */ -#if defined(__APPLE__) && defined(THREAD_STACK_SIZE) && THREAD_STACK_SIZE == 0 -#undef THREAD_STACK_SIZE -/* Note: This matches the value of -Wl,-stack_size in configure.ac */ -#define THREAD_STACK_SIZE 0x1000000 -#endif #if defined(__FreeBSD__) && defined(THREAD_STACK_SIZE) && THREAD_STACK_SIZE == 0 #undef THREAD_STACK_SIZE #define THREAD_STACK_SIZE 0x400000 |