From patchwork Fri Dec 14 15:13:47 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jack Howarth X-Patchwork-Id: 206515 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id 3D57F2C0091 for ; Sat, 15 Dec 2012 02:14:10 +1100 (EST) Comment: DKIM? See http://www.dkim.org DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=gcc.gnu.org; s=default; x=1356102851; h=Comment: DomainKey-Signature:Received:Received:Received:Received:Received: Date:From:To:Cc:Subject:Message-ID:MIME-Version:Content-Type: Content-Disposition:User-Agent:Mailing-List:Precedence:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:Sender: Delivered-To; bh=T+W4mT68n00rldru3otlqumjg1k=; b=PHagT2HugMoJ1Gu OhHT8ZGKZYvCksN9q8s78ZnOllv0oWl+hbWy7T3uXQz3TwZGcScxb1zYZuWFnX9J LKbkveXmPT+dmaxl/Br9GqrFjMx/Ur+Zjz6CyCguBLCq8tcjgDR4NDHhgyi9/OrA DMo9/muq5vU6yhKsxxnGMiWFiSbw= Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=gcc.gnu.org; h=Received:Received:X-SWARE-Spam-Status:X-Spam-Check-By:Received:Received:Received:Date:From:To:Cc:Subject:Message-ID:MIME-Version:Content-Type:Content-Disposition:User-Agent:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=q1FkPBIv83hC5mjh3N5IYigI0u27KxeaKqNNnocWit2iKjJt40u+pCDn6YmDsD Zb1fWiRujlvGtRInB3PIvwq3j3ZhkykpfhNNvs+w7paJtuYQZXZ6dVWXTREcLtoF ZQgo+n6XhrWldR/D7+hpDT7stxPnQ6AO+zLLps9twTO4s=; Received: (qmail 5794 invoked by alias); 14 Dec 2012 15:13:58 -0000 Received: (qmail 5785 invoked by uid 22791); 14 Dec 2012 15:13:57 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL, BAYES_00, RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from bromo.med.uc.edu (HELO bromo.med.uc.edu) (129.137.3.146) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 14 Dec 2012 15:13:49 +0000 Received: from bromo.med.uc.edu (localhost.localdomain [127.0.0.1]) by bromo.med.uc.edu (Postfix) with ESMTP id 9A996B004B; Fri, 14 Dec 2012 10:13:48 -0500 (EST) Received: (from howarth@localhost) by bromo.med.uc.edu (8.14.3/8.14.3/Submit) id qBEFDlI6006585; Fri, 14 Dec 2012 10:13:47 -0500 Date: Fri, 14 Dec 2012 10:13:47 -0500 From: Jack Howarth To: gcc-patches@gcc.gnu.org Cc: dodji@redhat.com, konstantin.s.serebryany@gmail.com, mikestump@comcast.net, iain@codesourcery.com, glider@google.com, jakub@redhat.com Subject: [PATCH][Revised] PR55679: skip invalid tests from r194458 on darwin Message-ID: <20121214151347.GA6550@bromo.med.uc.edu> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.18 (2008-05-17) Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org The attached revised patch disables two asan tests introduced in r194458 which are invalid on darwin. The g++.dg/asan/interception-test-1.C test should be dg-skip-if'd on darwin since mac function interposition is used instead of interception. The c-c++-common/asan/swapcontext-test-1.c test is invalid as ucontext support was deprecated in darwin10 and removed completely in darwin11. The current implementation of check_effective_target_swapcontext in lib/target-supports.exp doesn't catch the deprecation of ucontext support on darwin because it doesn't try to parse the ucontext.h include file. The attached patch changes the check_effective_target_swapcontext to use check_no_compiler_messages with compilation of ucontext.h. Tested without regression on both x86_64-apple-darwin10 and x86_64-unknown-linux-gnu. Okay for gcc trunk? Jack gcc/testsuite/ 2012-12-14 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. Index: gcc/testsuite/g++.dg/asan/interception-test-1.C =================================================================== --- gcc/testsuite/g++.dg/asan/interception-test-1.C (revision 194483) +++ gcc/testsuite/g++.dg/asan/interception-test-1.C (working copy) @@ -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 Index: gcc/testsuite/lib/target-supports.exp =================================================================== --- gcc/testsuite/lib/target-supports.exp (revision 194495) +++ gcc/testsuite/lib/target-supports.exp (working copy) @@ -736,7 +736,14 @@ proc check_effective_target_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 object { + #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