[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
This commit is contained in:
Harini0924
2024-08-30 09:33:02 -07:00
committed by GitHub
parent 18e55052d6
commit f1cf09104e

View File

@@ -1,7 +1,7 @@
// RUN: %clangxx_nsan -O0 -g -mavx %s -o %t
// RUN: NSAN_OPTIONS=check_nan=true,halt_on_error=0 %run %t 2>&1 | FileCheck %s
// RUN: env NSAN_OPTIONS=check_nan=true,halt_on_error=0 %run %t 2>&1 | FileCheck %s
// RUN: %clangxx_nsan -O3 -g -mavx %s -o %t
// RUN: NSAN_OPTIONS=check_nan=true,halt_on_error=0 %run %t 2>&1 | FileCheck %s
// RUN: env NSAN_OPTIONS=check_nan=true,halt_on_error=0 %run %t 2>&1 | FileCheck %s
#include <cmath>
#include <immintrin.h>
@@ -31,4 +31,4 @@ int main() {
// CHECK: WARNING: NumericalStabilitySanitizer: NaN detected
}
return 0;
}
}