[compiler-rt] d2c5e49 - [NSan] Make Tests work with Internal Shell

via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 30 12:29:12 PDT 2025


Author: Aiden Grossman
Date: 2025-10-30T12:29:09-07:00
New Revision: d2c5e49015fdc20cb4d6cd131edb3ebfd3dbf44b

URL: https://github.com/llvm/llvm-project/commit/d2c5e49015fdc20cb4d6cd131edb3ebfd3dbf44b
DIFF: https://github.com/llvm/llvm-project/commit/d2c5e49015fdc20cb4d6cd131edb3ebfd3dbf44b.diff

LOG: [NSan] Make Tests work with Internal Shell

There was one test that was using a subshell. This is not supported by
lit's internal shell. Rewrite the test to use the readfile substitution.

Reviewers: alexander-shaposhnikov, fmayer

Reviewed By: alexander-shaposhnikov, fmayer

Pull Request: https://github.com/llvm/llvm-project/pull/165142

Added: 
    

Modified: 
    compiler-rt/test/nsan/Posix/allocator_mapping.cpp

Removed: 
    


################################################################################
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 <assert.h>
 #include <stdio.h>


        


More information about the llvm-commits mailing list