Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Jerome Guitton <guitton@adacore.com>
To: gdb-patches@sourceware.org
Subject: [RFA] dwarf2loc, guard against null
Date: Mon, 17 Sep 2007 12:04:00 -0000	[thread overview]
Message-ID: <20070917120443.GA21276@adacore.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 189 bytes --]


get_frame_function can return null; in this case, crash...

OK to apply?

2007-09-17  Jerome Guitton  <guitton@adacore.com>

	* dwarf2loc.c (dwarf_expr_frame_base): Guard against NULL.




[-- Attachment #2: dwarf2loc.c.diff --]
[-- Type: text/x-diff, Size: 436 bytes --]

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;

             reply	other threads:[~2007-09-17 12:04 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-09-17 12:04 Jerome Guitton [this message]
2007-09-17 12:15 ` Daniel Jacobowitz
2007-09-17 12:27   ` Jerome Guitton
2007-09-17 12:30     ` Daniel Jacobowitz
2007-09-17 13:10       ` Jerome Guitton
2007-09-17 13:20         ` Daniel Jacobowitz
2007-09-17 13:42           ` Jerome Guitton
2007-09-17 13:52             ` Daniel Jacobowitz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070917120443.GA21276@adacore.com \
    --to=guitton@adacore.com \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox