From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 41451 invoked by alias); 28 Apr 2016 14:15:51 -0000 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 Received: (qmail 40592 invoked by uid 89); 28 Apr 2016 14:15:50 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=dunno X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Thu, 28 Apr 2016 14:15:47 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 5C987C049D52 for ; Thu, 28 Apr 2016 14:15:46 +0000 (UTC) Received: from tucnak.zalov.cz (ovpn-113-135.phx2.redhat.com [10.3.113.135]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u3SEFiSZ028699 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Thu, 28 Apr 2016 10:15:45 -0400 Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.15.2/8.15.2) with ESMTP id u3SEFgKD005951; Thu, 28 Apr 2016 16:15:43 +0200 Received: (from jakub@localhost) by tucnak.zalov.cz (8.15.2/8.15.2/Submit) id u3SEFggk004836; Thu, 28 Apr 2016 16:15:42 +0200 Date: Thu, 28 Apr 2016 14:15:00 -0000 From: Jakub Jelinek To: Marek Polacek Cc: GCC Patches Subject: Re: [ubsan PATCH] Fix compile-time hog with &TARGET_EXPRs (PR sanitizer/70342) Message-ID: <20160428141541.GQ26501@tucnak.zalov.cz> Reply-To: Jakub Jelinek References: <20160427170325.GK28445@redhat.com> <20160428090730.GK26501@tucnak.zalov.cz> <20160428141001.GP28445@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160428141001.GP28445@redhat.com> User-Agent: Mutt/1.5.24 (2015-08-30) X-IsSubscribed: yes X-SW-Source: 2016-04/txt/msg01840.txt.bz2 On Thu, Apr 28, 2016 at 04:10:01PM +0200, Marek Polacek wrote: > That works too, though it of course affects all users, not just ubsan. Here's Of course, but I think that is a good thing ;) > the patch with your suggested change. > > Bootstrapped/regtested on x86_64-linux, ok for trunk? > > 2016-04-28 Marek Polacek > Jakub Jelinek > > PR sanitizer/70342 > * fold-const.c (tree_single_nonzero_warnv_p): For TARGET_EXPR, use > TARGET_EXPR_SLOT as a base. > > * g++.dg/ubsan/null-7.C: New test. Ok for trunk. For 6.2 dunno, either the same patch after a while, or perhaps your original patch is safer (though, wonder if e.g. one can construct a testcase where it will use instrument &(TARGET_EXPR <...>.field) nested many times and still trigger the compile time hog with your patch). Jakub