File tree Expand file tree Collapse file tree 3 files changed +15
-24
lines changed Expand file tree Collapse file tree 3 files changed +15
-24
lines changed Original file line number Diff line number Diff line change @@ -53,12 +53,12 @@ if(EXAMPLE_USE_SANITIZER)
53
53
endif ()
54
54
55
55
# Fails with ThreadSanitizer
56
- add_executable (tsanFail ../src/tsan_fail .cpp)
57
- target_code_coverage(tsanFail AUTO ALL )
56
+ add_executable (tsan_data_race ../src/tsan/data_race .cpp)
57
+ target_code_coverage(tsan_data_race AUTO ALL )
58
58
if (UNIX )
59
- target_link_libraries (tsanFail PUBLIC pthread)
59
+ target_link_libraries (tsan_data_race PUBLIC pthread)
60
60
endif ()
61
- add_test (tsan tsanFail )
61
+ add_test (tsan_data_race tsan_data_race )
62
62
63
63
# Fails with LeakSanitizer
64
64
add_executable (lsan_direct_leak ../src/lsan/direct_leak.c)
Original file line number Diff line number Diff line change
1
+ #include < stdio.h>
2
+ #include < thread>
3
+
4
+ void threadfunc (int *p) { *p = 1 ; }
5
+
6
+ int main () {
7
+ int val = 0 ;
8
+ std::thread t (threadfunc, &val);
9
+ printf (" foo=%i\n " , val);
10
+ t.join ();
11
+ }
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments