Skip to content

Commit 307e197

Browse files
committed
[test] Make fuzzer/value-profile-div.test x86 specific
The test requires that an integer division by zero causes a trap, leading to a signal like SIGFPE. This is the case on x86. On many other architectures, such as Arm (unless software division is used and `__aeabi_idiv0` is patched), Power, RISC-V, LoongArch, there is no trap. Therefore, it's more appropriate to invert the condition to run the test. Reviewed By: Ami-zhang Differential Revision: https://reviews.llvm.org/D155644
1 parent 1d133d9 commit 307e197

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

compiler-rt/test/fuzzer/value-profile-div.test

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
UNSUPPORTED: ios
2-
UNSUPPORTED: target={{(arm|aarch64).*}}
1+
REQUIRES: target={{(i.86|x86_64)-.*}}
32
CHECK: AddressSanitizer: {{FPE|int-divide-by-zero}}
43
RUN: %cpp_compiler %S/DivTest.cpp -fsanitize-coverage=trace-div -o %t-DivTest
54
RUN: not %run %t-DivTest -seed=1 -use_value_profile=1 -runs=10000000 2>&1 | FileCheck %s

0 commit comments

Comments
 (0)