From patchwork Wed Dec 5 15:06:51 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jakub Jelinek X-Patchwork-Id: 203884 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 2A4E12C00A8 for ; Thu, 6 Dec 2012 02:07: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=1355324831; h=Comment: DomainKey-Signature:Received:Received:Received:Received:Received: Received:Received:Date:From:To:Cc:Subject:Message-ID:Reply-To: References:MIME-Version:Content-Type:Content-Disposition: In-Reply-To:User-Agent:Mailing-List:Precedence:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:Sender: Delivered-To; bh=DhBey5WwMj0LtyoA2rLkX8eqTLA=; b=gj8L666JSoR1ZFM BL44nzVjmQOVwUwcXp3P9XsDXd1p4tqRadftAUPEmA9dIKMR0mCSayZ7WZBebRW/ cimC0LeQB7jHp8ZMTxwyrHeK0nI8HZ+rwPCCeVDh1CAyODUkeqxLliNREgrI0uCV Z2oKZZRWtCPXfar2U2u52uhI4cYE= 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:Received:Received:Date:From:To:Cc:Subject:Message-ID:Reply-To:References:MIME-Version:Content-Type:Content-Disposition:In-Reply-To:User-Agent:X-IsSubscribed:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=uyH/dmreav5+UB6FA7e2Z6SQsEMG7gWvqyNnUmgYZ7iQ0/d7woV4OdWdDa5vOf 8ZhMudsPC45flU26HZx4Stqkt7oP3WrS8BBe1LK31ONmQSEgqq1XIHqhOuBC0kv1 SZ7o/RGZTD4K9Xdd9m51tmF8aggrf+1XRNVygDOhGOw0c=; Received: (qmail 7584 invoked by alias); 5 Dec 2012 15:07:06 -0000 Received: (qmail 7574 invoked by uid 22791); 5 Dec 2012 15:07:04 -0000 X-SWARE-Spam-Status: No, hits=-6.3 required=5.0 tests=AWL, BAYES_00, KHOP_RCVD_UNTRUST, KHOP_SPAMHAUS_DROP, RCVD_IN_DNSWL_HI, RCVD_IN_HOSTKARMA_W, RP_MATCHES_RCVD, SPF_HELO_PASS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 05 Dec 2012 15:06:55 +0000 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id qB5F6s4q025741 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 5 Dec 2012 10:06:54 -0500 Received: from zalov.redhat.com (vpn1-5-46.ams2.redhat.com [10.36.5.46]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id qB5F6r2V002767 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 5 Dec 2012 10:06:54 -0500 Received: from zalov.cz (localhost [127.0.0.1]) by zalov.redhat.com (8.14.5/8.14.5) with ESMTP id qB5F6qYx014169; Wed, 5 Dec 2012 16:06:52 +0100 Received: (from jakub@localhost) by zalov.cz (8.14.5/8.14.5/Submit) id qB5F6qrw014168; Wed, 5 Dec 2012 16:06:52 +0100 Date: Wed, 5 Dec 2012 16:06:51 +0100 From: Jakub Jelinek To: Konstantin Serebryany , Dodji Seketeli Cc: gcc-patches@gcc.gnu.org Subject: Re: [asan] Handle noreturn calls with __asan_handle_no_return () Message-ID: <20121205150651.GW2315@tucnak.redhat.com> Reply-To: Jakub Jelinek References: <20121205144952.GV2315@tucnak.redhat.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20121205144952.GV2315@tucnak.redhat.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-IsSubscribed: yes 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 On Wed, Dec 05, 2012 at 03:49:52PM +0100, Jakub Jelinek wrote: > +FAIL: g++.dg/asan/asan_test.C -O2 AddressSanitizer_PthreadExitTest execution test > > but that looks like a library problem to me: > > AddressSanitizer CHECK failed: ../../../../../libsanitizer/asan/asan_rtl.cc:271 "((curr_thread)) != (0)" (0x0, 0x0) Actually, the problem was that libasan was linked in after libpthread. Perhaps we need some driver hacks to make sure -lasan comes before -lpthread when added automatically for -fsanitize=address (and similarly for -ltsan). For now just tweaking dg-options. Ok for trunk? (of course, depends on all the earlier patches from today and Wei's patch). With this the only failures I get are: FAIL: g++.dg/asan/asan_test.C -O2 AddressSanitizer_BitFieldPositiveTest x->bf1 = 0 execution test FAIL: g++.dg/asan/asan_test.C -O2 AddressSanitizer_BitFieldPositiveTest x->bf2 = 0 execution test FAIL: g++.dg/asan/asan_test.C -O2 AddressSanitizer_BitFieldPositiveTest x->bf3 = 0 execution test FAIL: g++.dg/asan/asan_test.C -O2 AddressSanitizer_BitFieldPositiveTest x->bf4 = 0 execution test FAIL: g++.dg/asan/asan_test.C -O2 AddressSanitizer_GlobalStringConstTest Ident(p[15]) execution test FAIL: g++.dg/asan/asan_test.C -O2 AddressSanitizer_FileNameInGlobalReportTest Ident(p[15]) output pattern test, should match zoo.*asan_test.cc which is 4x missing bitfield instrumentation and twice unanalyzed thing. 2012-12-05 Jakub Jelinek * g++.dg/asan/asan_test.C: Link -lasan before -lpthread. * g++.dg/asan/deep-thread-stack-1.C: Likewise. Remove dg-skip-if. Jakub --- gcc/testsuite/g++.dg/asan/asan_test.C.jj 2012-12-03 12:43:20.000000000 +0100 +++ gcc/testsuite/g++.dg/asan/asan_test.C 2012-12-05 15:50:36.686157455 +0100 @@ -2,7 +2,7 @@ // { dg-skip-if "" { *-*-* } { "*" } { "-O2" } } // { dg-skip-if "" { *-*-* } { "-flto" } { "" } } // { dg-additional-sources "asan_globals_test.cc" } -// { dg-options "-fsanitize=address -fno-builtin -Wall -Wno-format -Werror -g -DASAN_UAR=0 -DASAN_HAS_EXCEPTIONS=1 -DASAN_HAS_BLACKLIST=0 -DASAN_USE_DEJAGNU_GTEST=1 -lpthread -ldl" } +// { dg-options "-fsanitize=address -fno-builtin -Wall -Wno-format -Werror -g -DASAN_UAR=0 -DASAN_HAS_EXCEPTIONS=1 -DASAN_HAS_BLACKLIST=0 -DASAN_USE_DEJAGNU_GTEST=1 -lasan -lpthread -ldl" } // { dg-additional-options "-DASAN_NEEDS_SEGV=1" { target { ! arm*-*-* } } } // { dg-additional-options "-DASAN_LOW_MEMORY=1 -DASAN_NEEDS_SEGV=0" { target arm*-*-* } } // { dg-additional-options "-DASAN_AVOID_EXPENSIVE_TESTS=1" { target { ! run_expensive_tests } } } --- gcc/testsuite/g++.dg/asan/deep-thread-stack-1.C.jj 2012-12-05 11:45:31.000000000 +0100 +++ gcc/testsuite/g++.dg/asan/deep-thread-stack-1.C 2012-12-05 15:51:20.687897439 +0100 @@ -1,6 +1,5 @@ // { dg-do run { target pthread } } -// { dg-skip-if "" { *-*-* } { "*" } { "" } } -// { dg-options "-lpthread" } +// { dg-options "-lasan -lpthread" } // { dg-shouldfail "asan" } #include