@@ -827,11 +827,11 @@ with_trace_refs
827827with_assertions
828828enable_optimizations
829829with_lto
830- with_hash_algorithm
831- with_tzpath
832830with_address_sanitizer
833831with_memory_sanitizer
834832with_undefined_behavior_sanitizer
833+ with_hash_algorithm
834+ with_tzpath
835835with_libs
836836with_system_expat
837837with_system_ffi
@@ -1548,12 +1548,6 @@ Optional Packages:
15481548 --with-lto=[full|thin|no|yes]
15491549 enable Link-Time-Optimization in any build (default
15501550 is no)
1551- --with-hash-algorithm=[fnv|siphash24]
1552- select hash algorithm for use in Python/pyhash.c
1553- (default is SipHash24)
1554- --with-tzpath=<list of absolute paths separated by pathsep>
1555- Select the default time zone search path for zoneinfo.TZPATH
1556-
15571551 --with-address-sanitizer
15581552 enable AddressSanitizer memory error detector,
15591553 'asan' (default is no)
@@ -1562,6 +1556,12 @@ Optional Packages:
15621556 --with-undefined-behavior-sanitizer
15631557 enable UndefinedBehaviorSanitizer undefined
15641558 behaviour detector, 'ubsan' (default is no)
1559+ --with-hash-algorithm=[fnv|siphash24]
1560+ select hash algorithm for use in Python/pyhash.c
1561+ (default is SipHash24)
1562+ --with-tzpath=<list of absolute paths separated by pathsep>
1563+ Select the default time zone search path for zoneinfo.TZPATH
1564+
15651565 --with-libs='lib1 ...' link against additional libs (default is no)
15661566 --with-system-expat build pyexpat module using an installed expat
15671567 library, see Doc/library/pyexpat.rst (default is no)
@@ -9602,6 +9602,65 @@ $as_echo "no" >&6; }
96029602;;
96039603esac
96049604
9605+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-address-sanitizer" >&5
9606+ $as_echo_n "checking for --with-address-sanitizer... " >&6; }
9607+
9608+ # Check whether --with-address_sanitizer was given.
9609+ if test "${with_address_sanitizer+set}" = set; then :
9610+ withval=$with_address_sanitizer;
9611+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9612+ $as_echo "$withval" >&6; }
9613+ BASECFLAGS="-fsanitize=address -fno-omit-frame-pointer $BASECFLAGS"
9614+ LDFLAGS="-fsanitize=address $LDFLAGS"
9615+ # ASan works by controlling memory allocation, our own malloc interferes.
9616+ with_pymalloc="no"
9617+
9618+ else
9619+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9620+ $as_echo "no" >&6; }
9621+ fi
9622+
9623+
9624+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-memory-sanitizer" >&5
9625+ $as_echo_n "checking for --with-memory-sanitizer... " >&6; }
9626+
9627+ # Check whether --with-memory_sanitizer was given.
9628+ if test "${with_memory_sanitizer+set}" = set; then :
9629+ withval=$with_memory_sanitizer;
9630+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9631+ $as_echo "$withval" >&6; }
9632+ BASECFLAGS="-fsanitize=memory -fsanitize-memory-track-origins=2 -fno-omit-frame-pointer $BASECFLAGS"
9633+ LDFLAGS="-fsanitize=memory -fsanitize-memory-track-origins=2 $LDFLAGS"
9634+ # MSan works by controlling memory allocation, our own malloc interferes.
9635+ with_pymalloc="no"
9636+
9637+ else
9638+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9639+ $as_echo "no" >&6; }
9640+ fi
9641+
9642+
9643+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-undefined-behavior-sanitizer" >&5
9644+ $as_echo_n "checking for --with-undefined-behavior-sanitizer... " >&6; }
9645+
9646+ # Check whether --with-undefined_behavior_sanitizer was given.
9647+ if test "${with_undefined_behavior_sanitizer+set}" = set; then :
9648+ withval=$with_undefined_behavior_sanitizer;
9649+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9650+ $as_echo "$withval" >&6; }
9651+ BASECFLAGS="-fsanitize=undefined $BASECFLAGS"
9652+ LDFLAGS="-fsanitize=undefined $LDFLAGS"
9653+ with_ubsan="yes"
9654+
9655+ else
9656+
9657+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9658+ $as_echo "no" >&6; }
9659+ with_ubsan="no"
9660+
9661+ fi
9662+
9663+
96059664# Set info about shared libraries.
96069665
96079666
@@ -9812,9 +9871,20 @@ then
98129871# Issue #18075: the default maximum stack size (8MBytes) is too
98139872# small for the default recursion limit. Increase the stack size
98149873# to ensure that tests don't crash
9815- # Note: This matches the value of THREAD_STACK_SIZE in
9816- # thread_pthread.h
9817- LINKFORSHARED="-Wl,-stack_size,1000000 $LINKFORSHARED"
9874+ stack_size="1000000" # 16 MB
9875+ if test "$with_ubsan" == "yes"
9876+ then
9877+ # Undefined behavior sanitizer requires an even deeper stack
9878+ stack_size="4000000" # 64 MB
9879+ fi
9880+
9881+ LINKFORSHARED="-Wl,-stack_size,$stack_size $LINKFORSHARED"
9882+
9883+
9884+ cat >>confdefs.h <<_ACEOF
9885+ #define THREAD_STACK_SIZE 0x$stack_size
9886+ _ACEOF
9887+
98189888
98199889if test "$enable_framework"
98209890then
@@ -10410,61 +10480,6 @@ fi
1041010480
1041110481
1041210482
10413- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-address-sanitizer" >&5
10414- $as_echo_n "checking for --with-address-sanitizer... " >&6; }
10415-
10416- # Check whether --with-address_sanitizer was given.
10417- if test "${with_address_sanitizer+set}" = set; then :
10418- withval=$with_address_sanitizer;
10419- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10420- $as_echo "$withval" >&6; }
10421- BASECFLAGS="-fsanitize=address -fno-omit-frame-pointer $BASECFLAGS"
10422- LDFLAGS="-fsanitize=address $LDFLAGS"
10423- # ASan works by controlling memory allocation, our own malloc interferes.
10424- with_pymalloc="no"
10425-
10426- else
10427- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10428- $as_echo "no" >&6; }
10429- fi
10430-
10431-
10432- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-memory-sanitizer" >&5
10433- $as_echo_n "checking for --with-memory-sanitizer... " >&6; }
10434-
10435- # Check whether --with-memory_sanitizer was given.
10436- if test "${with_memory_sanitizer+set}" = set; then :
10437- withval=$with_memory_sanitizer;
10438- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10439- $as_echo "$withval" >&6; }
10440- BASECFLAGS="-fsanitize=memory -fsanitize-memory-track-origins=2 -fno-omit-frame-pointer $BASECFLAGS"
10441- LDFLAGS="-fsanitize=memory -fsanitize-memory-track-origins=2 $LDFLAGS"
10442- # MSan works by controlling memory allocation, our own malloc interferes.
10443- with_pymalloc="no"
10444-
10445- else
10446- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10447- $as_echo "no" >&6; }
10448- fi
10449-
10450-
10451- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-undefined-behavior-sanitizer" >&5
10452- $as_echo_n "checking for --with-undefined-behavior-sanitizer... " >&6; }
10453-
10454- # Check whether --with-undefined_behavior_sanitizer was given.
10455- if test "${with_undefined_behavior_sanitizer+set}" = set; then :
10456- withval=$with_undefined_behavior_sanitizer;
10457- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10458- $as_echo "$withval" >&6; }
10459- BASECFLAGS="-fsanitize=undefined $BASECFLAGS"
10460- LDFLAGS="-fsanitize=undefined $LDFLAGS"
10461-
10462- else
10463- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10464- $as_echo "no" >&6; }
10465- fi
10466-
10467-
1046810483# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
1046910484{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
1047010485$as_echo_n "checking for t_open in -lnsl... " >&6; }
0 commit comments