gh-112536: Add support for thread sanitizer (TSAN) (gh-112648)

This commit is contained in:
Samet YASLAN 2023-12-30 09:17:02 +01:00 committed by GitHub
parent f46987b828
commit 88cb972000
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 81 additions and 10 deletions

25
configure generated vendored
View file

@ -1082,6 +1082,7 @@ with_dsymutil
with_address_sanitizer
with_memory_sanitizer
with_undefined_behavior_sanitizer
with_thread_sanitizer
with_hash_algorithm
with_tzpath
with_libs
@ -1860,6 +1861,8 @@ Optional Packages:
--with-undefined-behavior-sanitizer
enable UndefinedBehaviorSanitizer undefined
behaviour detector, 'ubsan' (default is no)
--with-thread-sanitizer enable ThreadSanitizer data race detector, 'tsan'
(default is no)
--with-hash-algorithm=[fnv|siphash13|siphash24]
select hash algorithm for use in Python/pyhash.c
(default is SipHash13)
@ -12506,6 +12509,28 @@ with_ubsan="no"
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --with-thread-sanitizer" >&5
printf %s "checking for --with-thread-sanitizer... " >&6; }
# Check whether --with-thread_sanitizer was given.
if test ${with_thread_sanitizer+y}
then :
withval=$with_thread_sanitizer;
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
printf "%s\n" "$withval" >&6; }
BASECFLAGS="-fsanitize=thread $BASECFLAGS"
LDFLAGS="-fsanitize=thread $LDFLAGS"
with_tsan="yes"
else $as_nop
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
with_tsan="no"
fi
# Set info about shared libraries.