[llvm-commits] [compiler-rt] r168793 - /compiler-rt/trunk/lib/asan/tests/asan_test.cc

Kostya Serebryany kcc at google.com
Wed Nov 28 07:01:23 PST 2012


Author: kcc
Date: Wed Nov 28 09:01:23 2012
New Revision: 168793

URL: http://llvm.org/viewvc/llvm-project?rev=168793&view=rev
Log:
[asan] add DISABLED_BuiltinLongJmpTest

Modified:
    compiler-rt/trunk/lib/asan/tests/asan_test.cc

Modified: compiler-rt/trunk/lib/asan/tests/asan_test.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/tests/asan_test.cc?rev=168793&r1=168792&r2=168793&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/tests/asan_test.cc (original)
+++ compiler-rt/trunk/lib/asan/tests/asan_test.cc Wed Nov 28 09:01:23 2012
@@ -637,6 +637,17 @@
   longjmp(buf, 1);
 }
 
+NOINLINE void BuiltinLongJmpFunc1(jmp_buf buf) {
+  // create three red zones for these two stack objects.
+  int a;
+  int b;
+
+  int *A = Ident(&a);
+  int *B = Ident(&b);
+  *A = *B;
+  __builtin_longjmp((void**)buf, 1);
+}
+
 NOINLINE void UnderscopeLongJmpFunc1(jmp_buf buf) {
   // create three red zones for these two stack objects.
   int a;
@@ -677,6 +688,16 @@
   }
 }
 
+// http://code.google.com/p/address-sanitizer/issues/detail?id=129
+TEST(AddressSanitizer, DISABLED_BuiltinLongJmpTest) {
+  static jmp_buf buf;
+  if (!setjmp(buf)) {
+    BuiltinLongJmpFunc1(buf);
+  } else {
+    TouchStackFunc();
+  }
+}
+
 TEST(AddressSanitizer, UnderscopeLongJmpTest) {
   static jmp_buf buf;
   if (!_setjmp(buf)) {





More information about the llvm-commits mailing list