aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJack Howarth <howarth@bromo.med.uc.edu>2013-01-17 21:28:56 +0000
committerMike Stump <mrs@gcc.gnu.org>2013-01-17 21:28:56 +0000
commitec03e9e94598351083d3d9a46b6e5a97cfe0e88c (patch)
treef67df12fade984a9ff43d76eae8ba4d08b36beb0 /gcc
parent1bd3f7500b7223cded3ae19ff27eb27e05a9b147 (diff)
downloadgcc-ec03e9e94598351083d3d9a46b6e5a97cfe0e88c.zip
gcc-ec03e9e94598351083d3d9a46b6e5a97cfe0e88c.tar.gz
gcc-ec03e9e94598351083d3d9a46b6e5a97cfe0e88c.tar.bz2
re PR sanitizer/55679 (new asan tests from r194458 fail on x86_64-apple-darwin10)
PR sanitizer/55679 * g++.dg/asan/interception-test-1.C: Skip on darwin. * lib/target-supports.exp (check_effective_target_swapcontext): Use check_no_compiler_messages to test support in ucontext.h. (check_effective_target_setrlimit): Return 0 for Darwin's non-posix compliant RLIMIT_AS. From-SVN: r195281
Diffstat (limited to 'gcc')
-rw-r--r--gcc/testsuite/ChangeLog9
-rw-r--r--gcc/testsuite/g++.dg/asan/interception-test-1.C1
-rw-r--r--gcc/testsuite/lib/target-supports.exp13
3 files changed, 22 insertions, 1 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 1bd5ca3..21d0f05 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,12 @@
+2013-01-17 Jack Howarth <howarth@bromo.med.uc.edu>
+
+ PR sanitizer/55679
+ * g++.dg/asan/interception-test-1.C: Skip on darwin.
+ * lib/target-supports.exp (check_effective_target_swapcontext): Use
+ check_no_compiler_messages to test support in ucontext.h.
+ (check_effective_target_setrlimit): Return 0 for Darwin's non-posix
+ compliant RLIMIT_AS.
+
2013-01-17 Marek Polacek <polacek@redhat.com>
PR rtl-optimization/55833
diff --git a/gcc/testsuite/g++.dg/asan/interception-test-1.C b/gcc/testsuite/g++.dg/asan/interception-test-1.C
index f12f3b6..04c846a 100644
--- a/gcc/testsuite/g++.dg/asan/interception-test-1.C
+++ b/gcc/testsuite/g++.dg/asan/interception-test-1.C
@@ -3,6 +3,7 @@
// { dg-do run }
// { dg-options "-fno-builtin-malloc -fno-builtin-free" }
// { dg-shouldfail "asan" }
+// { dg-skip-if "Darwin uses mac function interposition" { *-*-darwin* } }
#include <stdlib.h>
#include <stdio.h>
diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp
index abc9038..0b11817 100644
--- a/gcc/testsuite/lib/target-supports.exp
+++ b/gcc/testsuite/lib/target-supports.exp
@@ -730,12 +730,23 @@ proc check_effective_target_clone {} {
# Return 1 if the target supports setrlimit, 0 otherwise.
proc check_effective_target_setrlimit {} {
+ # Darwin has non-posix compliant RLIMIT_AS
+ if { [istarget *-*-darwin*] } {
+ return 0
+ }
return [check_function_available "setrlimit"]
}
# Return 1 if the target supports swapcontext, 0 otherwise.
proc check_effective_target_swapcontext {} {
- return [check_function_available "swapcontext"]
+ return [check_no_compiler_messages swapcontext executable {
+ #include <ucontext.h>
+ int main (void)
+ {
+ ucontext_t orig_context,child_context;
+ if (swapcontext(&child_context, &orig_context) < 0) { }
+ }
+ }]
}
# Return 1 if compilation with -pthread is error-free for trivial