diff options
author | Jeffrey Yasskin <jyasskin@gmail.com> | 2010-05-03 19:29:34 +0000 |
---|---|---|
committer | Jeffrey Yasskin <jyasskin@gmail.com> | 2010-05-03 19:29:34 +0000 |
commit | 8cc1fda6b8c2d74a3abd2b8a007880656add8997 (patch) | |
tree | 98c8ddb5111deb4311ccc88f0a875790f3d6e667 /configure.in | |
parent | 916fe4197d8172e967b7e25d93ac9660c45ab0ea (diff) | |
download | cpython-8cc1fda6b8c2d74a3abd2b8a007880656add8997.tar.gz |
Make (most of) Python's tests pass under Thread Sanitizer.
http://code.google.com/p/data-race-test/wiki/ThreadSanitizer is a dynamic data
race detector that runs on top of valgrind. With this patch, the binaries at
http://code.google.com/p/data-race-test/wiki/ThreadSanitizer#Binaries pass many
but not all of the Python tests. All of regrtest still passes outside of tsan.
I've implemented part of the C1x atomic types so that we can explicitly mark
variables that are used across threads, and get defined behavior as compilers
advance.
I've added tsan's client header and implementation to the codebase in
dynamic_annotations.{h,c} (docs at
http://code.google.com/p/data-race-test/wiki/DynamicAnnotations).
Unfortunately, I haven't been able to get helgrind and drd to give sensible
error messages, even when I use their client annotations, so I'm not supporting
them.
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/configure.in b/configure.in index 0cd867c56a..f991823f22 100644 --- a/configure.in +++ b/configure.in @@ -2515,6 +2515,7 @@ if test "$with_valgrind" != no; then [AC_DEFINE([WITH_VALGRIND], 1, [Define if you want pymalloc to be disabled when running under valgrind])], [AC_MSG_ERROR([Valgrind support requested but headers not available])] ) + OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT" fi # Check for --with-wctype-functions |