From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24007 invoked by alias); 17 Sep 2007 12:04:53 -0000 Received: (qmail 23995 invoked by uid 22791); 17 Sep 2007 12:04:52 -0000 X-Spam-Check-By: sourceware.org Received: from province.act-europe.fr (HELO province.act-europe.fr) (212.157.227.214) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 17 Sep 2007 12:04:45 +0000 Received: by province.act-europe.fr (Postfix, from userid 560) id 79E0E164908; Mon, 17 Sep 2007 14:04:43 +0200 (CEST) Date: Mon, 17 Sep 2007 12:04:00 -0000 From: Jerome Guitton To: gdb-patches@sourceware.org Subject: [RFA] dwarf2loc, guard against null Message-ID: <20070917120443.GA21276@adacore.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="ikeVEW9yuYc//A+q" Content-Disposition: inline User-Agent: Mutt/1.4.2.2i Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2007-09/txt/msg00210.txt.bz2 --ikeVEW9yuYc//A+q Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-length: 189 get_frame_function can return null; in this case, crash... OK to apply? 2007-09-17 Jerome Guitton * dwarf2loc.c (dwarf_expr_frame_base): Guard against NULL. --ikeVEW9yuYc//A+q Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="dwarf2loc.c.diff" Content-length: 436 Index: dwarf2loc.c =================================================================== --- dwarf2loc.c (revision 14570) +++ dwarf2loc.c (working copy) @@ -151,6 +151,9 @@ dwarf_expr_frame_base (void *baton, gdb_ framefunc = get_frame_function (debaton->frame); + if (!framefunc) + error (_("No frame function.")); + if (SYMBOL_OPS (framefunc) == &dwarf2_loclist_funcs) { struct dwarf2_loclist_baton *symbaton; --ikeVEW9yuYc//A+q--