diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 1bd5ca36ded..21d0f05910a 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,12 @@ +2013-01-17 Jack Howarth + + 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 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 f12f3b61e82..04c846a70a0 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 #include diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp index abc90384d5f..0b11817ff61 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 + 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