From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6633 invoked by alias); 13 Sep 2013 10:53:06 -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 6582 invoked by uid 89); 13 Sep 2013 10:53:06 -0000 Received: from mel.act-europe.fr (HELO smtp.eu.adacore.com) (194.98.77.210) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Fri, 13 Sep 2013 10:53:06 +0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.5 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00,KHOP_THREADED autolearn=ham version=3.3.2 X-HELO: smtp.eu.adacore.com Received: from localhost (localhost [127.0.0.1]) by filtered-smtp.eu.adacore.com (Postfix) with ESMTP id 071062681E33; Fri, 13 Sep 2013 12:53:03 +0200 (CEST) Received: from smtp.eu.adacore.com ([127.0.0.1]) by localhost (smtp.eu.adacore.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id BNRf5AdeCIvu; Fri, 13 Sep 2013 12:53:02 +0200 (CEST) Received: from polaris.localnet (bon31-6-88-161-99-133.fbx.proxad.net [88.161.99.133]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.eu.adacore.com (Postfix) with ESMTPSA id D421E2681DB0; Fri, 13 Sep 2013 12:53:02 +0200 (CEST) From: Eric Botcazou To: Marek Polacek Cc: gcc-patches@gcc.gnu.org, "Joseph S. Myers" , Jakub Jelinek , Jason Merrill Subject: Re: [PATCH][ubsan] Add VLA bound instrumentation Date: Fri, 13 Sep 2013 11:23:00 -0000 Message-ID: <2617895.LPJnfBXDzq@polaris> User-Agent: KMail/4.7.2 (Linux/3.1.10-1.29-desktop; KDE/4.7.2; x86_64; ; ) In-Reply-To: <20130913095030.GS23899@redhat.com> References: <20130912122655.GN23899@redhat.com> <20130913095030.GS23899@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-SW-Source: 2013-09/txt/msg01024.txt.bz2 > Well, I have a patch for that, but I no longer think that ubsan should > imply -fstack-check, since e.g. > > int > main (void) > { > int x = -1; > int b[x - 4]; > /* ... */ > return 0; > } > > segfaults at runtime on int b[x - 4]; line when -fstack-check is used > (even without sanitizing), so we wouldn't give proper diagnostics > for stmts following that line... In Ada we catch the sigsegv, turn it into an exception and unwind. -- Eric Botcazou