@@ -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
@@ -1547,12 +1547,6 @@ Optional Packages:
15471547 --with-assertions build with C assertions enabled (default is no)
15481548 --with-lto enable Link-Time-Optimization in any build (default
15491549 is no)
1550- --with-hash-algorithm=[fnv|siphash24]
1551- select hash algorithm for use in Python/pyhash.c
1552- (default is SipHash24)
1553- --with-tzpath=<list of absolute paths separated by pathsep>
1554- Select the default time zone search path for zoneinfo.TZPATH
1555-
15561550 --with-address-sanitizer
15571551 enable AddressSanitizer memory error detector,
15581552 'asan' (default is no)
@@ -1561,6 +1555,12 @@ Optional Packages:
15611555 --with-undefined-behavior-sanitizer
15621556 enable UndefinedBehaviorSanitizer undefined
15631557 behaviour detector, 'ubsan' (default is no)
1558+ --with-hash-algorithm=[fnv|siphash24]
1559+ select hash algorithm for use in Python/pyhash.c
1560+ (default is SipHash24)
1561+ --with-tzpath=<list of absolute paths separated by pathsep>
1562+ Select the default time zone search path for zoneinfo.TZPATH
1563+
15641564 --with-libs='lib1 ...' link against additional libs (default is no)
15651565 --with-system-expat build pyexpat module using an installed expat
15661566 library, see Doc/library/pyexpat.rst (default is no)
@@ -9566,6 +9566,65 @@ $as_echo "no" >&6; }
95669566 ;;
95679567esac
95689568
9569+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-address-sanitizer" >&5
9570+ $as_echo_n "checking for --with-address-sanitizer... " >&6; }
9571+
9572+ # Check whether --with-address_sanitizer was given.
9573+ if test "${with_address_sanitizer+set}" = set; then :
9574+ withval=$with_address_sanitizer;
9575+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9576+ $as_echo "$withval" >&6; }
9577+ BASECFLAGS="-fsanitize=address -fno-omit-frame-pointer $BASECFLAGS"
9578+ LDFLAGS="-fsanitize=address $LDFLAGS"
9579+ # ASan works by controlling memory allocation, our own malloc interferes.
9580+ with_pymalloc="no"
9581+
9582+ else
9583+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9584+ $as_echo "no" >&6; }
9585+ fi
9586+
9587+
9588+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-memory-sanitizer" >&5
9589+ $as_echo_n "checking for --with-memory-sanitizer... " >&6; }
9590+
9591+ # Check whether --with-memory_sanitizer was given.
9592+ if test "${with_memory_sanitizer+set}" = set; then :
9593+ withval=$with_memory_sanitizer;
9594+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9595+ $as_echo "$withval" >&6; }
9596+ BASECFLAGS="-fsanitize=memory -fsanitize-memory-track-origins=2 -fno-omit-frame-pointer $BASECFLAGS"
9597+ LDFLAGS="-fsanitize=memory -fsanitize-memory-track-origins=2 $LDFLAGS"
9598+ # MSan works by controlling memory allocation, our own malloc interferes.
9599+ with_pymalloc="no"
9600+
9601+ else
9602+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9603+ $as_echo "no" >&6; }
9604+ fi
9605+
9606+
9607+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-undefined-behavior-sanitizer" >&5
9608+ $as_echo_n "checking for --with-undefined-behavior-sanitizer... " >&6; }
9609+
9610+ # Check whether --with-undefined_behavior_sanitizer was given.
9611+ if test "${with_undefined_behavior_sanitizer+set}" = set; then :
9612+ withval=$with_undefined_behavior_sanitizer;
9613+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9614+ $as_echo "$withval" >&6; }
9615+ BASECFLAGS="-fsanitize=undefined $BASECFLAGS"
9616+ LDFLAGS="-fsanitize=undefined $LDFLAGS"
9617+ with_ubsan="yes"
9618+
9619+ else
9620+
9621+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9622+ $as_echo "no" >&6; }
9623+ with_ubsan="no"
9624+
9625+ fi
9626+
9627+
95699628# Set info about shared libraries.
95709629
95719630
@@ -9776,9 +9835,20 @@ then
97769835 # Issue #18075: the default maximum stack size (8MBytes) is too
97779836 # small for the default recursion limit. Increase the stack size
97789837 # to ensure that tests don't crash
9779- # Note: This matches the value of THREAD_STACK_SIZE in
9780- # thread_pthread.h
9781- LINKFORSHARED="-Wl,-stack_size,1000000 $LINKFORSHARED"
9838+ stack_size="1000000" # 16 MB
9839+ if test "$with_ubsan" == "yes"
9840+ then
9841+ # Undefined behavior sanitizer requires an even deeper stack
9842+ stack_size="4000000" # 64 MB
9843+ fi
9844+
9845+ LINKFORSHARED="-Wl,-stack_size,$stack_size $LINKFORSHARED"
9846+
9847+
9848+ cat >>confdefs.h <<_ACEOF
9849+ #define THREAD_STACK_SIZE 0x$stack_size
9850+ _ACEOF
9851+
97829852
97839853 if test "$enable_framework"
97849854 then
@@ -10374,61 +10444,6 @@ fi
1037410444
1037510445
1037610446
10377- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-address-sanitizer" >&5
10378- $as_echo_n "checking for --with-address-sanitizer... " >&6; }
10379-
10380- # Check whether --with-address_sanitizer was given.
10381- if test "${with_address_sanitizer+set}" = set; then :
10382- withval=$with_address_sanitizer;
10383- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10384- $as_echo "$withval" >&6; }
10385- BASECFLAGS="-fsanitize=address -fno-omit-frame-pointer $BASECFLAGS"
10386- LDFLAGS="-fsanitize=address $LDFLAGS"
10387- # ASan works by controlling memory allocation, our own malloc interferes.
10388- with_pymalloc="no"
10389-
10390- else
10391- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10392- $as_echo "no" >&6; }
10393- fi
10394-
10395-
10396- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-memory-sanitizer" >&5
10397- $as_echo_n "checking for --with-memory-sanitizer... " >&6; }
10398-
10399- # Check whether --with-memory_sanitizer was given.
10400- if test "${with_memory_sanitizer+set}" = set; then :
10401- withval=$with_memory_sanitizer;
10402- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10403- $as_echo "$withval" >&6; }
10404- BASECFLAGS="-fsanitize=memory -fsanitize-memory-track-origins=2 -fno-omit-frame-pointer $BASECFLAGS"
10405- LDFLAGS="-fsanitize=memory -fsanitize-memory-track-origins=2 $LDFLAGS"
10406- # MSan works by controlling memory allocation, our own malloc interferes.
10407- with_pymalloc="no"
10408-
10409- else
10410- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10411- $as_echo "no" >&6; }
10412- fi
10413-
10414-
10415- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-undefined-behavior-sanitizer" >&5
10416- $as_echo_n "checking for --with-undefined-behavior-sanitizer... " >&6; }
10417-
10418- # Check whether --with-undefined_behavior_sanitizer was given.
10419- if test "${with_undefined_behavior_sanitizer+set}" = set; then :
10420- withval=$with_undefined_behavior_sanitizer;
10421- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10422- $as_echo "$withval" >&6; }
10423- BASECFLAGS="-fsanitize=undefined $BASECFLAGS"
10424- LDFLAGS="-fsanitize=undefined $LDFLAGS"
10425-
10426- else
10427- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10428- $as_echo "no" >&6; }
10429- fi
10430-
10431-
1043210447# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
1043310448{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
1043410449$as_echo_n "checking for t_open in -lnsl... " >&6; }
0 commit comments