From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12495 invoked by alias); 15 May 2014 10:39:31 -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 12481 invoked by uid 89); 15 May 2014 10:39:30 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.1 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-qg0-f41.google.com Received: from mail-qg0-f41.google.com (HELO mail-qg0-f41.google.com) (209.85.192.41) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Thu, 15 May 2014 10:39:28 +0000 Received: by mail-qg0-f41.google.com with SMTP id j5so1396058qga.0 for ; Thu, 15 May 2014 03:39:26 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.224.162.200 with SMTP id w8mr11507960qax.21.1400150366524; Thu, 15 May 2014 03:39:26 -0700 (PDT) Received: by 10.224.4.3 with HTTP; Thu, 15 May 2014 03:39:26 -0700 (PDT) Reply-To: ramrad01@arm.com In-Reply-To: <20140515103357.GL10386@tucnak.redhat.com> References: <20140415101156.GB1817@tucnak.redhat.com> <87a9ajfi5r.fsf@talisman.default> <20140515103357.GL10386@tucnak.redhat.com> Date: Thu, 15 May 2014 10:39:00 -0000 Message-ID: Subject: Re: [PATCH] Add support for -fno-sanitize-recover and -fsanitize-undefined-trap-on-error (PR sanitizer/60275) From: Ramana Radhakrishnan To: Jakub Jelinek Cc: Richard Biener , Marek Polacek , Dodji Seketeli , Konstantin Serebryany , Tobias Burnus , gcc-patches , Richard Sandiford Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes X-SW-Source: 2014-05/txt/msg01176.txt.bz2 On Thu, May 15, 2014 at 11:33 AM, 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. What's the overhead with bootstrap-ubsan ? Ramana > > Jakub