diff --git a/compiler-rt/test/nsan/Posix/allocator_mapping.cpp b/compiler-rt/test/nsan/Posix/allocator_mapping.cpp index 3a3e655e259d0..a92962e16d9d2 100644 --- a/compiler-rt/test/nsan/Posix/allocator_mapping.cpp +++ b/compiler-rt/test/nsan/Posix/allocator_mapping.cpp @@ -2,7 +2,8 @@ /// Test that a module constructor can not map memory over the NSan heap /// (without MAP_FIXED, of course). // RUN: %clangxx_nsan -O0 %s -o %t_1 -// RUN: %clangxx_nsan -O0 -DHEAP_ADDRESS=$(%run %t_1) %s -o %t_2 && %run %t_2 +// RUN: %run %t_1 > %t.heap_address +// RUN: %clangxx_nsan -O0 -DHEAP_ADDRESS=%{readfile:%t.heap_address} %s -o %t_2 && %run %t_2 #include #include