diff Include/Python.h @ 61184:4fd3ab5fa71d

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.
author Jeffrey Yasskin <jyasskin@gmail.com>
date Mon, 03 May 2010 19:29:34 +0000
parents fe6b6c189bb4
children d35782ac21f8
line wrap: on
line diff
--- a/Include/Python.h	Mon May 03 16:48:20 2010 +0000
+++ b/Include/Python.h	Mon May 03 19:29:34 2010 +0000
@@ -49,6 +49,8 @@
 
 #include "pyport.h"
 
+#include "pyatomic.h"
+
 /* Debug-mode build with pymalloc implies PYMALLOC_DEBUG.
  *  PYMALLOC_DEBUG is in error if pymalloc is not in use.
  */