From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1962 invoked by alias); 15 May 2014 10:30: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 1898 invoked by uid 89); 15 May 2014 10:30:50 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.3 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-wg0-f52.google.com Received: from mail-wg0-f52.google.com (HELO mail-wg0-f52.google.com) (74.125.82.52) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Thu, 15 May 2014 10:30:49 +0000 Received: by mail-wg0-f52.google.com with SMTP id l18so3172913wgh.23 for ; Thu, 15 May 2014 03:30:46 -0700 (PDT) X-Received: by 10.180.103.5 with SMTP id fs5mr7899080wib.33.1400149846207; Thu, 15 May 2014 03:30:46 -0700 (PDT) Received: from localhost ([2.26.169.52]) by mx.google.com with ESMTPSA id ht5sm6223556wjb.49.2014.05.15.03.30.44 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 15 May 2014 03:30:45 -0700 (PDT) From: Richard Sandiford To: Jakub Jelinek Mail-Followup-To: Jakub Jelinek ,Richard Biener , Marek Polacek , Dodji Seketeli , Konstantin Serebryany , Tobias Burnus , gcc-patches@gcc.gnu.org, rdsandiford@googlemail.com Cc: Richard Biener , Marek Polacek , Dodji Seketeli , Konstantin Serebryany , Tobias Burnus , gcc-patches@gcc.gnu.org Subject: Re: [PATCH] Add support for -fno-sanitize-recover and -fsanitize-undefined-trap-on-error (PR sanitizer/60275) References: <20140415101156.GB1817@tucnak.redhat.com> Date: Thu, 15 May 2014 10:30:00 -0000 In-Reply-To: <20140415101156.GB1817@tucnak.redhat.com> (Jakub Jelinek's message of "Tue, 15 Apr 2014 12:11:56 +0200") Message-ID: <87a9ajfi5r.fsf@talisman.default> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SW-Source: 2014-05/txt/msg01171.txt.bz2 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? Thanks, Richard