From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4517 invoked by alias); 15 May 2014 10:34:07 -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 4506 invoked by uid 89); 15 May 2014 10:34:06 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.8 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:34:06 +0000 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s4FAY4kP006349 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 15 May 2014 06:34:04 -0400 Received: from tucnak.zalov.cz (ovpn-116-116.ams2.redhat.com [10.36.116.116]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s4FAY27R026216 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Thu, 15 May 2014 06:34:04 -0400 Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.14.8/8.14.7) with ESMTP id s4FAY03G008179; Thu, 15 May 2014 12:34:00 +0200 Received: (from jakub@localhost) by tucnak.zalov.cz (8.14.8/8.14.8/Submit) id s4FAXwFh008178; Thu, 15 May 2014 12:33:58 +0200 Date: Thu, 15 May 2014 10:34:00 -0000 From: Jakub Jelinek To: Richard Biener , Marek Polacek , 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: <20140515103357.GL10386@tucnak.redhat.com> Reply-To: Jakub Jelinek References: <20140415101156.GB1817@tucnak.redhat.com> <87a9ajfi5r.fsf@talisman.default> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87a9ajfi5r.fsf@talisman.default> User-Agent: Mutt/1.5.21 (2010-09-15) X-IsSubscribed: yes X-SW-Source: 2014-05/txt/msg01172.txt.bz2 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. Jakub