From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29472 invoked by alias); 7 Nov 2011 15:44:16 -0000 Received: (qmail 29461 invoked by uid 22791); 7 Nov 2011 15:44:14 -0000 X-SWARE-Spam-Status: No, hits=-7.5 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,SPF_HELO_PASS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 07 Nov 2011 15:43:40 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id pA7FhdvX009664 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 7 Nov 2011 10:43:39 -0500 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id pA7FhdFJ009223; Mon, 7 Nov 2011 10:43:39 -0500 Received: from [10.3.113.8] ([10.3.113.8]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id pA7FhcHS012386; Mon, 7 Nov 2011 10:43:38 -0500 Message-ID: <4EB7FCAA.10100@redhat.com> Date: Mon, 07 Nov 2011 15:54:00 -0000 From: Jeff Law User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:7.0) Gecko/20110927 Thunderbird/7.0 MIME-Version: 1.0 To: Tom Tromey CC: gcc-patches Subject: Re: RFA: New pass to delete unexecutable paths in the CFG References: <4EB7AAF6.6060702@redhat.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes 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 X-SW-Source: 2011-11/txt/msg00963.txt.bz2 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 11/07/11 06:53, Tom Tromey wrote: >>>>>> "Jeff" == Jeff Law writes: > > Jeff> First, it's perfectly fine to have a NULL pointer dereference > in a Jeff> program as long as that code is never executed. Once > the code is Jeff> executed, we've entered the realm of undefined > behavior. > > Jeff> Thus in a conforming program we can safely assume that a > provable NULL Jeff> pointer dereference can never be executed at > runtime. This implies Jeff> there is a path through the CFG that > is unexecutable. > > IIUC, then this isn't true for Java. In Java the attempt to > dereference NULL throws a NullPointerException, which can be > caught, etc. It isn't undefined. So, presumably there's no way to know we're throwing to NullPointerException from the exception information attached to the statement or BB? If not I could disable if the statement with the memory op throws anywhere. It's not ideal, but conservatively correct. jeff -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQEcBAEBAgAGBQJOt/ypAAoJEBRtltQi2kC7uhIH/jpk2jx7mn7i/RVA9jqiR3BU tz4KRL1+giqWj8B2gG+y6vn8tBOFrruymIP4ewRjO1Q6IIvlDr6dyWSIXAw/TQ8g p0V7Cfk+cxOkMJ6m6T/qpHjdtJsfx9FYQF6JSHPpalzh7FxlSIVJ9vGejmNqjHHG ZxqDZd8emz0e7C4KtrX5mkMSZDHXo2+vWulwf8lwCJBjDLLR0nylv5GFREIuSDDR BEkosWYfgJfngjmiwiXu8re9kEBpdRlnzDh+416VkSKTwjqHvqnb1Ux3rlBKHR7U /DAQVcFNYdjwHFmTjvc50NPgOMf1fMEw9wCaMtL1THJlRMwpyaR5R8Gc+PiQjLk= =bdeT -----END PGP SIGNATURE-----