[llvm-branch-commits] [compiler-rt-branch] r231993 - Merging r231402:

Joerg Sonnenberger joerg at bec.de
Wed Mar 11 17:25:56 PDT 2015


Author: joerg
Date: Wed Mar 11 19:25:56 2015
New Revision: 231993

URL: http://llvm.org/viewvc/llvm-project?rev=231993&view=rev
Log:
Merging r231402:
Move use of __builtin_longjmp under the same conditions as the only
caller of the function.

Modified:
    compiler-rt/branches/release_36/   (props changed)
    compiler-rt/branches/release_36/lib/asan/tests/asan_test.cc

Propchange: compiler-rt/branches/release_36/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Mar 11 19:25:56 2015
@@ -1 +1 @@
-/compiler-rt/trunk:226809
+/compiler-rt/trunk:226809,231402

Modified: compiler-rt/branches/release_36/lib/asan/tests/asan_test.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/branches/release_36/lib/asan/tests/asan_test.cc?rev=231993&r1=231992&r2=231993&view=diff
==============================================================================
--- compiler-rt/branches/release_36/lib/asan/tests/asan_test.cc (original)
+++ compiler-rt/branches/release_36/lib/asan/tests/asan_test.cc Wed Mar 11 19:25:56 2015
@@ -569,7 +569,7 @@ TEST(AddressSanitizer, LongJmpTest) {
 }
 
 #if !defined(_WIN32)  // Only basic longjmp is available on Windows.
-NOINLINE void BuiltinLongJmpFunc1(jmp_buf buf) {
+NOINLINE void UnderscopeLongJmpFunc1(jmp_buf buf) {
   // create three red zones for these two stack objects.
   int a;
   int b;
@@ -577,10 +577,10 @@ NOINLINE void BuiltinLongJmpFunc1(jmp_bu
   int *A = Ident(&a);
   int *B = Ident(&b);
   *A = *B;
-  __builtin_longjmp((void**)buf, 1);
+  _longjmp(buf, 1);
 }
 
-NOINLINE void UnderscopeLongJmpFunc1(jmp_buf buf) {
+NOINLINE void SigLongJmpFunc1(sigjmp_buf buf) {
   // create three red zones for these two stack objects.
   int a;
   int b;
@@ -588,10 +588,12 @@ NOINLINE void UnderscopeLongJmpFunc1(jmp
   int *A = Ident(&a);
   int *B = Ident(&b);
   *A = *B;
-  _longjmp(buf, 1);
+  siglongjmp(buf, 1);
 }
 
-NOINLINE void SigLongJmpFunc1(sigjmp_buf buf) {
+#if !defined(__ANDROID__) && !defined(__arm__) && \
+    !defined(__powerpc64__) && !defined(__powerpc__)
+NOINLINE void BuiltinLongJmpFunc1(jmp_buf buf) {
   // create three red zones for these two stack objects.
   int a;
   int b;
@@ -599,11 +601,9 @@ NOINLINE void SigLongJmpFunc1(sigjmp_buf
   int *A = Ident(&a);
   int *B = Ident(&b);
   *A = *B;
-  siglongjmp(buf, 1);
+  __builtin_longjmp((void**)buf, 1);
 }
 
-#if !defined(__ANDROID__) && !defined(__arm__) && \
-    !defined(__powerpc64__) && !defined(__powerpc__)
 // Does not work on Power and ARM:
 // https://code.google.com/p/address-sanitizer/issues/detail?id=185
 TEST(AddressSanitizer, BuiltinLongJmpTest) {





More information about the llvm-branch-commits mailing list