[compiler-rt] r251361 - [asan] Fix throw-call-test to properly XFAIL on android/aarch64.

Evgeniy Stepanov via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 26 15:19:47 PDT 2015


Author: eugenis
Date: Mon Oct 26 17:19:47 2015
New Revision: 251361

URL: http://llvm.org/viewvc/llvm-project?rev=251361&view=rev
Log:
[asan] Fix throw-call-test to properly XFAIL on android/aarch64.

The test is sensitive to stack layout changes. Tweak it a bit to
expose the bug on aarch64 as well as on arm.

Modified:
    compiler-rt/trunk/test/asan/TestCases/throw_call_test.cc

Modified: compiler-rt/trunk/test/asan/TestCases/throw_call_test.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/throw_call_test.cc?rev=251361&r1=251360&r2=251361&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/throw_call_test.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/throw_call_test.cc Mon Oct 26 17:19:47 2015
@@ -23,12 +23,15 @@ void ReallyThrow() {
 
 __attribute__((noinline))
 void Throw() {
-  int a, b, c, d, e;
+  int a, b, c, d, e, f, g, h;
   pretend_to_do_something(&a);
   pretend_to_do_something(&b);
   pretend_to_do_something(&c);
   pretend_to_do_something(&d);
   pretend_to_do_something(&e);
+  pretend_to_do_something(&f);
+  pretend_to_do_something(&g);
+  pretend_to_do_something(&h);
   fprintf(stderr, "Throw stack = %p\n", &a);
   ReallyThrow();
 }
@@ -37,9 +40,9 @@ __attribute__((noinline))
 void CheckStack() {
   int ar[100];
   pretend_to_do_something(ar);
+  fprintf(stderr, "CheckStack stack = %p, %p\n", ar, ar + 100);
   for (int i = 0; i < 100; i++)
     ar[i] = i;
-  fprintf(stderr, "CheckStack stack = %p, %p\n", ar, ar + 100);
 }
 
 int main(int argc, char** argv) {




More information about the llvm-commits mailing list