summaryrefslogtreecommitdiff
path: root/PC
diff options
context:
space:
mode:
authorJeffrey Yasskin <jyasskin@gmail.com>2010-05-03 19:29:34 +0000
committerJeffrey Yasskin <jyasskin@gmail.com>2010-05-03 19:29:34 +0000
commit8cc1fda6b8c2d74a3abd2b8a007880656add8997 (patch)
tree98c8ddb5111deb4311ccc88f0a875790f3d6e667 /PC
parent916fe4197d8172e967b7e25d93ac9660c45ab0ea (diff)
downloadcpython-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 'PC')
-rw-r--r--PC/VS7.1/pythoncore.vcproj3
-rw-r--r--PC/VS8.0/pythoncore.vcproj8
-rw-r--r--PC/os2emx/Makefile1
3 files changed, 12 insertions, 0 deletions
diff --git a/PC/VS7.1/pythoncore.vcproj b/PC/VS7.1/pythoncore.vcproj
index b5b4f58230..a1a2501725 100644
--- a/PC/VS7.1/pythoncore.vcproj
+++ b/PC/VS7.1/pythoncore.vcproj
@@ -508,6 +508,9 @@
RelativePath="..\..\PC\config.c">
</File>
<File
+ RelativePath="..\..\Python\dynamic_annotations.c">
+ </File>
+ <File
RelativePath="..\..\Modules\datetimemodule.c">
</File>
<File
diff --git a/PC/VS8.0/pythoncore.vcproj b/PC/VS8.0/pythoncore.vcproj
index 86d440a8bd..d5325fcec0 100644
--- a/PC/VS8.0/pythoncore.vcproj
+++ b/PC/VS8.0/pythoncore.vcproj
@@ -707,6 +707,10 @@
>
</File>
<File
+ RelativePath="..\..\Include\dynamic_annotations.h"
+ >
+ </File>
+ <File
RelativePath="..\..\Include\enumobject.h"
>
</File>
@@ -1655,6 +1659,10 @@
>
</File>
<File
+ RelativePath="..\..\Python\dynamic_annotations.c"
+ >
+ </File>
+ <File
RelativePath="..\..\Python\dtoa.c"
>
</File>
diff --git a/PC/os2emx/Makefile b/PC/os2emx/Makefile
index 0db46a5308..d9cded7cb9 100644
--- a/PC/os2emx/Makefile
+++ b/PC/os2emx/Makefile
@@ -332,6 +332,7 @@ SRC.PYTHON= $(addprefix $(TOP), \
Python/ceval.c \
Python/compile.c \
Python/codecs.c \
+ Python/dynamic_annotations.c \
Python/errors.c \
Python/frozen.c \
Python/frozenmain.c \