CXXFLAGS += -O3
endif
ifeq ($(CXX), clang++)
- CXXFLAGS+= -Wno-unused-private-field -Wno-static-in-inline
+ CXXFLAGS+= -Wno-unused-private-field -Wno-static-in-inline -Wgnu
endif
LIBTSAN=rtl/libtsan.a
@ echo " make install_deps # Install third-party dependencies required for building"
@ echo " make presubmit # Run it every time before committing"
@ echo
- @ echo "For more info, see http://code.google.com/p/data-race-test/wiki/ThreadSanitizer2"
+ @ echo "For more info, see http://code.google.com/p/thread-sanitizer/wiki/Development"
$(LIBTSAN): libtsan
return fd;
}
-TSAN_INTERCEPTOR(int, inotify_init) {
- SCOPED_TSAN_INTERCEPTOR(inotify_init);
- int fd = REAL(inotify_init)();
+TSAN_INTERCEPTOR(int, inotify_init, int fake) {
+ SCOPED_TSAN_INTERCEPTOR(inotify_init, fake);
+ int fd = REAL(inotify_init)(fake);
if (fd >= 0)
FdInotifyCreate(thr, pc, fd);
return fd;
return 0;
}
-TSAN_INTERCEPTOR(int, fork) {
- SCOPED_TSAN_INTERCEPTOR(fork);
+TSAN_INTERCEPTOR(int, fork, int fake) {
+ SCOPED_TSAN_INTERCEPTOR(fork, fake);
// It's intercepted merely to process pending signals.
- int pid = REAL(fork)();
+ int pid = REAL(fork)(fake);
if (pid == 0) {
// child
FdOnFork(thr, pc);