File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed
compiler-rt/test/sanitizer_common/TestCases/Posix Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change 1
- // RUN: %clangxx -O0 %s -o %t && %env_tool_opts=die_after_fork=0 %run %t
1
+ // RUN: %clang -O0 %s -o %t && %env_tool_opts=die_after_fork=0 %run %t
2
2
3
3
// UNSUPPORTED: asan, lsan, hwasan
4
4
@@ -28,10 +28,11 @@ pthread_barrier_t bar;
28
28
// start with locked internal mutexes.
29
29
void ShouldNotDeadlock () {
30
30
// Don't bother with leaks, we try to trigger allocator or lsan deadlock.
31
- __lsan::ScopedDisabler disable ;
32
- char *volatile p = new char [ 10 ] ;
31
+ __lsan_disable () ;
32
+ void * volatile p = malloc ( 10 ) ;
33
33
__lsan_do_recoverable_leak_check ();
34
- delete[] p;
34
+ free (p );
35
+ __lsan_enable ();
35
36
}
36
37
37
38
// Prevent stack buffer cleanup by instrumentation.
@@ -59,7 +60,7 @@ NOSAN static void *inchild(void *arg) {
59
60
int main (void ) {
60
61
pid_t pid ;
61
62
62
- pthread_barrier_init (&bar, nullptr , 2 );
63
+ pthread_barrier_init (& bar , NULL , 2 );
63
64
pthread_t thread_id ;
64
65
while (pthread_create (& thread_id , 0 , & inparent , 0 ) != 0 ) {
65
66
}
You can’t perform that action at this time.
0 commit comments