Skip to content

Commit f1cf091

Browse files
authored
[compiler-rt][test] Added env command to fix NSAN_OPTIONS command not found error (#106676)
Resolved the issue where `'NSAN_OPTIONS=check_nan=true,halt_on_error=0'` was not recognized as a command. Changed the test command to set the environment variable correctly using `env`. fixes: #106598
1 parent 18e5505 commit f1cf091

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

compiler-rt/test/nsan/vec_sqrt.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// RUN: %clangxx_nsan -O0 -g -mavx %s -o %t
2-
// RUN: NSAN_OPTIONS=check_nan=true,halt_on_error=0 %run %t 2>&1 | FileCheck %s
2+
// RUN: env NSAN_OPTIONS=check_nan=true,halt_on_error=0 %run %t 2>&1 | FileCheck %s
33
// RUN: %clangxx_nsan -O3 -g -mavx %s -o %t
4-
// RUN: NSAN_OPTIONS=check_nan=true,halt_on_error=0 %run %t 2>&1 | FileCheck %s
4+
// RUN: env NSAN_OPTIONS=check_nan=true,halt_on_error=0 %run %t 2>&1 | FileCheck %s
55

66
#include <cmath>
77
#include <immintrin.h>
@@ -31,4 +31,4 @@ int main() {
3131
// CHECK: WARNING: NumericalStabilitySanitizer: NaN detected
3232
}
3333
return 0;
34-
}
34+
}

0 commit comments

Comments
 (0)