From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10944 invoked by alias); 15 May 2014 10:38:36 -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 10931 invoked by uid 89); 15 May 2014 10:38:35 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.1 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 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 ESMTP; Thu, 15 May 2014 10:38:34 +0000 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s4FAcX4A023923 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 15 May 2014 06:38:33 -0400 Received: from redhat.com (ovpn-116-22.ams2.redhat.com [10.36.116.22]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s4FAcSnZ009323 (version=TLSv1/SSLv3 cipher=AES128-GCM-SHA256 bits=128 verify=NO); Thu, 15 May 2014 06:38:31 -0400 Date: Thu, 15 May 2014 10:38:00 -0000 From: Marek Polacek To: Jakub Jelinek Cc: Richard Biener , Dodji Seketeli , Konstantin Serebryany , Tobias Burnus , gcc-patches@gcc.gnu.org, rdsandiford@googlemail.com Subject: Re: [PATCH] Add support for -fno-sanitize-recover and -fsanitize-undefined-trap-on-error (PR sanitizer/60275) Message-ID: <20140515103828.GA8173@redhat.com> References: <20140415101156.GB1817@tucnak.redhat.com> <87a9ajfi5r.fsf@talisman.default> <20140515103357.GL10386@tucnak.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20140515103357.GL10386@tucnak.redhat.com> User-Agent: Mutt/1.5.23 (2014-03-12) X-SW-Source: 2014-05/txt/msg01175.txt.bz2 On Thu, May 15, 2014 at 12:33:57PM +0200, Jakub Jelinek wrote: > On Thu, May 15, 2014 at 11:30:40AM +0100, Richard Sandiford wrote: > > Jakub Jelinek writes: > > > This patch adds two new options (compatible with clang) which allow > > > users to choose the behavior of undefined behavior sanitization. > > > > > > By default as before, all undefined behaviors (except for > > > __builtin_unreachable and missing return in C++) continue after reporting > > > which means that you can get lots of runtime errors from a single program > > > run and the exit code will not reflect the failure in that case. > > > > > > With this patch, one can use -fsanitize=undefined -fno-sanitize-recover, > > > which will report just the first undefined behavior and then exit with > > > non-zero code. > > > > Would it make sense for this to be the default for bootstrap-ubsan, > > so that the bootstrap fails on undefined behaviour? > > Perhaps eventually, but is current bootstrap-ubsan really ubsan error free > on at least the major targets? I've made some efforts towards that goal on > x86_64-linux, but haven't tried bootstrap-ubsan recently. It's not, I'm seeing many /home/marek/src/gcc/gcc/wide-int.h:1734:7: runtime error: shift exponent 64 is too large for 64-bit type 'long unsigned int' plus I think I remember some other fails. Marek