[compiler-rt] r344203 - [hwasan] simplify a test
Kostya Serebryany via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 10 16:57:38 PDT 2018
Author: kcc
Date: Wed Oct 10 16:57:38 2018
New Revision: 344203
URL: http://llvm.org/viewvc/llvm-project?rev=344203&view=rev
Log:
[hwasan] simplify a test
Modified:
compiler-rt/trunk/test/hwasan/TestCases/stack-history-length.c
Modified: compiler-rt/trunk/test/hwasan/TestCases/stack-history-length.c
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/hwasan/TestCases/stack-history-length.c?rev=344203&r1=344202&r2=344203&view=diff
==============================================================================
--- compiler-rt/trunk/test/hwasan/TestCases/stack-history-length.c (original)
+++ compiler-rt/trunk/test/hwasan/TestCases/stack-history-length.c Wed Oct 10 16:57:38 2018
@@ -1,7 +1,6 @@
-// RUN: %clang_hwasan -O1 -DX=2046 %s -o %t.2046
-// RUN: %clang_hwasan -O1 -DX=2047 %s -o %t.2047
-// RUN: %env_hwasan_opts=stack_history_size=2048 not %run %t.2046 2>&1 | FileCheck %s --check-prefix=YES
-// RUN: %env_hwasan_opts=stack_history_size=2048 not %run %t.2047 2>&1 | FileCheck %s --check-prefix=NO
+// RUN: %clang_hwasan -O1 %s -o %t
+// RUN: %env_hwasan_opts=stack_history_size=2048 not %run %t 2046 2>&1 | FileCheck %s --check-prefix=YES
+// RUN: %env_hwasan_opts=stack_history_size=2048 not %run %t 2047 2>&1 | FileCheck %s --check-prefix=NO
// REQUIRES: stable-runtime
@@ -16,7 +15,8 @@ __attribute__((noinline)) void FUNC0() {
__attribute__((noinline)) void FUNC() { int x[4]; USE(&x[0]); }
__attribute__((noinline)) void OOB() { int x[4]; x[four] = 0; USE(&x[0]); }
-int main() {
+int main(int argc, char **argv) {
+ int X = argc == 2 ? atoi(argv[1]) : 10;
// FUNC0 is X+2's element of the ring buffer.
// If runtime buffer size is less than it, FUNC0 record will be lost.
FUNC0();
More information about the llvm-commits
mailing list