summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoerg Sonnenberger <joerg@bec.de>2015-03-12 00:25:56 +0000
committerJoerg Sonnenberger <joerg@bec.de>2015-03-12 00:25:56 +0000
commit55a3690916df972339fe877e077a2f27c7117211 (patch)
treef9a5b9e31553b4aebd42a21318ffe395e8ba15e5
parentc66aa3ede3f205a86c7a976a043dc7d0f4fa2175 (diff)
downloadcompiler-rt-release_36.tar.gz
Merging r231402:release_36
Move use of __builtin_longjmp under the same conditions as the only caller of the function. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/branches/release_36@231993 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/asan/tests/asan_test.cc16
1 files changed, 8 insertions, 8 deletions
diff --git a/lib/asan/tests/asan_test.cc b/lib/asan/tests/asan_test.cc
index f63040cc8..90dc84597 100644
--- a/lib/asan/tests/asan_test.cc
+++ b/lib/asan/tests/asan_test.cc
@@ -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_buf buf) {
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_buf buf) {
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 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) {