From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3901 invoked by alias); 12 Dec 2012 21:32:50 -0000 Received: (qmail 3876 invoked by uid 22791); 12 Dec 2012 21:32:46 -0000 X-SWARE-Spam-Status: No, hits=-5.9 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,SPF_HELO_PASS,TW_LV 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, 12 Dec 2012 21:32:41 +0000 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id qBCLWbvs022658 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 12 Dec 2012 16:32:38 -0500 Received: from localhost (ovpn-116-60.ams2.redhat.com [10.36.116.60]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id qBCLGocv025523 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 12 Dec 2012 16:16:51 -0500 Received: by localhost (Postfix, from userid 1000) id D40EE9F162; Wed, 12 Dec 2012 22:16:49 +0100 (CET) From: Dodji Seketeli To: Jakub Jelinek Cc: Wei Mi , Mike Stump , GCC Patches , David Li , Diego Novillo , Kostya Serebryany , Dodji Seketeli Subject: Re: [PATCH] asan unit tests from llvm lit-test incremental changes References: <20121128101420.GG2315@tucnak.redhat.com> <20121203110018.GR2315@tucnak.redhat.com> <20121205122906.GO2315@tucnak.redhat.com> X-URL: http://www.redhat.com Date: Wed, 12 Dec 2012 21:32:00 -0000 In-Reply-To: <20121205122906.GO2315@tucnak.redhat.com> (Jakub Jelinek's message of "Wed, 5 Dec 2012 13:29:06 +0100") Message-ID: <87ehivq8ce.fsf@redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2012-12/txt/msg00859.txt.bz2 Hello, Independently of this review, I think it's be interesting to hear Kostya's voice on: Jakub Jelinek writes: > 2) In large-func-test-1.C, I had to stop matching the backtrace after > _Znw[jm], because libasan is using the fast but inaccurate backtrace, > and while the tests can be easily tweaked to compile with > -fno-omit-frame-pointer, we definitely can't rely on libstdc++.so to be > built with that option. Most likely it isn't. I repeat that I think > that at least for Linux libasan should use the _Unwind* based backtrace > at least for the fatal functions (__asan_report* etc.), and perhaps for > these malloc wrappers like ::operator new, ::operator new[] and their > const std::nothrow_t& variants libasan could intercept them, call > malloc and if that returns NULL, call the original corresponding function > so that it deals with exceptions, new handler etc. and on: > 3) deep-thread-stack-1.C fails for me right now with some libasan assertion, > Kostya, can you please look at that? > AsanThread *t = asanThreadRegistry().GetCurrent(); > CHECK(t); > where it failed on the CHECK, because t was NULL. I've skipped the test for > now. [...] > --- gcc/testsuite/g++.dg/asan/deep-tail-call-1.C.jj 2012-12-04 20:24:10.000000000 +0100 > +++ gcc/testsuite/g++.dg/asan/deep-tail-call-1.C 2012-12-05 11:01:48.600443834 +0100 > @@ -1,21 +1,22 @@ > -// { dg-do run } > +// { dg-do run } > // { dg-options "-fno-omit-frame-pointer -fno-optimize-sibling-calls" } > // { dg-additional-options "-mno-omit-leaf-frame-pointer" { target { i?86-*-* x86_64-*-* } } } > -// { dg-shouldfail "asan" } > +// { dg-shouldfail "asan" } > > int global[10]; > void __attribute__((noinline)) call4(int i) { global[i+10]++; } > void __attribute__((noinline)) call3(int i) { call4(i); } > void __attribute__((noinline)) call2(int i) { call3(i); } > void __attribute__((noinline)) call1(int i) { call2(i); } > -int main(int argc, char **argv) { > - call1(argc); > +volatile int one = 1; Just curious, why do we need this variable to be volatile, especially since the test is compiled without optimization? > +int main() { > + call1(one); > return global[0]; > } [...] The patch looks OK to me in any case. Thanks. -- Dodji