@@ -819,6 +819,8 @@ enable_optimizations
819
819
with_lto
820
820
with_hash_algorithm
821
821
with_address_sanitizer
822
+ with_memory_sanitizer
823
+ with_undefined_behavior_sanitizer
822
824
with_libs
823
825
with_system_expat
824
826
with_system_ffi
@@ -1515,7 +1517,10 @@ Optional Packages:
1515
1517
--with-hash-algorithm=[fnv|siphash24]
1516
1518
select hash algorithm
1517
1519
--with-address-sanitizer
1518
- enable AddressSanitizer
1520
+ enable AddressSanitizer (asan)
1521
+ --with-memory-sanitizer enable MemorySanitizer (msan)
1522
+ --with-undefined-behavior-sanitizer
1523
+ enable UndefinedBehaviorSanitizer (ubsan)
1519
1524
--with-libs='lib1 ...' link against additional libs
1520
1525
--with-system-expat build pyexpat module using an installed expat
1521
1526
library
@@ -10038,6 +10043,44 @@ if test "${with_address_sanitizer+set}" = set; then :
10038
10043
$as_echo " $withval " >&6 ; }
10039
10044
BASECFLAGS=" -fsanitize=address -fno-omit-frame-pointer $BASECFLAGS "
10040
10045
LDFLAGS=" -fsanitize=address $LDFLAGS "
10046
+ # ASan works by controlling memory allocation, our own malloc interferes.
10047
+ with_pymalloc=" no"
10048
+
10049
+ else
10050
+ { $as_echo " $as_me :${as_lineno-$LINENO } : result: no" >&5
10051
+ $as_echo " no" >&6 ; }
10052
+ fi
10053
+
10054
+
10055
+ { $as_echo " $as_me :${as_lineno-$LINENO } : checking for --with-memory-sanitizer" >&5
10056
+ $as_echo_n " checking for --with-memory-sanitizer... " >&6 ; }
10057
+
10058
+ # Check whether --with-memory_sanitizer was given.
10059
+ if test " ${with_memory_sanitizer+set} " = set ; then :
10060
+ withval=$with_memory_sanitizer ;
10061
+ { $as_echo " $as_me :${as_lineno-$LINENO } : result: $withval " >&5
10062
+ $as_echo " $withval " >&6 ; }
10063
+ BASECFLAGS=" -fsanitize=memory -fsanitize-memory-track-origins=2 -fno-omit-frame-pointer $BASECFLAGS "
10064
+ LDFLAGS=" -fsanitize=memory -fsanitize-memory-track-origins=2 $LDFLAGS "
10065
+ # MSan works by controlling memory allocation, our own malloc interferes.
10066
+ with_pymalloc=" no"
10067
+
10068
+ else
10069
+ { $as_echo " $as_me :${as_lineno-$LINENO } : result: no" >&5
10070
+ $as_echo " no" >&6 ; }
10071
+ fi
10072
+
10073
+
10074
+ { $as_echo " $as_me :${as_lineno-$LINENO } : checking for --with-undefined-behavior-sanitizer" >&5
10075
+ $as_echo_n " checking for --with-undefined-behavior-sanitizer... " >&6 ; }
10076
+
10077
+ # Check whether --with-undefined_behavior_sanitizer was given.
10078
+ if test " ${with_undefined_behavior_sanitizer+set} " = set ; then :
10079
+ withval=$with_undefined_behavior_sanitizer ;
10080
+ { $as_echo " $as_me :${as_lineno-$LINENO } : result: $withval " >&5
10081
+ $as_echo " $withval " >&6 ; }
10082
+ BASECFLAGS=" -fsanitize=undefined $BASECFLAGS "
10083
+ LDFLAGS=" -fsanitize=undefined $LDFLAGS "
10041
10084
10042
10085
else
10043
10086
{ $as_echo " $as_me :${as_lineno-$LINENO } : result: no" >&5
0 commit comments