[compiler-rt] 307e197 - [test] Make fuzzer/value-profile-div.test x86 specific
Fangrui Song via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 18 22:11:32 PDT 2023
Author: Fangrui Song
Date: 2023-07-18T22:11:27-07:00
New Revision: 307e19784a7c20eaff43ac9ded06544932662c44
URL: https://github.com/llvm/llvm-project/commit/307e19784a7c20eaff43ac9ded06544932662c44
DIFF: https://github.com/llvm/llvm-project/commit/307e19784a7c20eaff43ac9ded06544932662c44.diff
LOG: [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
Added:
Modified:
compiler-rt/test/fuzzer/value-profile-div.test
Removed:
################################################################################
diff --git a/compiler-rt/test/fuzzer/value-profile-div.test b/compiler-rt/test/fuzzer/value-profile-div.test
index 40ff37455dfeeb..cf2e255a8e187c 100644
--- a/compiler-rt/test/fuzzer/value-profile-div.test
+++ b/compiler-rt/test/fuzzer/value-profile-div.test
@@ -1,5 +1,4 @@
-UNSUPPORTED: ios
-UNSUPPORTED: target={{(arm|aarch64).*}}
+REQUIRES: target={{(i.86|x86_64)-.*}}
CHECK: AddressSanitizer: {{FPE|int-divide-by-zero}}
RUN: %cpp_compiler %S/DivTest.cpp -fsanitize-coverage=trace-div -o %t-DivTest
RUN: not %run %t-DivTest -seed=1 -use_value_profile=1 -runs=10000000 2>&1 | FileCheck %s
More information about the llvm-commits
mailing list