This is the mail archive of the gdb-cvs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[binutils-gdb] Frame static link: Handle null pointer.


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=2091da296fd563f62d856dcb5a049a63484ed65e

commit 2091da296fd563f62d856dcb5a049a63484ed65e
Author: Bernhard Heckel <bernhard.heckel@intel.com>
Date:   Tue Jun 7 13:36:05 2016 +0200

    Frame static link: Handle null pointer.
    
    2016-06-07  Bernhard Heckel  <bernhard.heckel@intel.com>
    
    gdb/Changelog:
    	* findvar.c (follow_static_link): Check for valid pointer.

Diff:
---
 gdb/ChangeLog | 4 ++++
 gdb/findvar.c | 1 +
 2 files changed, 5 insertions(+)

diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 01cc770..bd2d5d2 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,7 @@
+2016-06-07  Bernhard Heckel  <bernhard.heckel@intel.com>
+
+	* findvar.c (follow_static_link): Check for valid pointer.
+
 2016-06-06  Simon Marchi  <simon.marchi@ericsson.com>
 
 	* NEWS: Mention the new fields in =record-started.
diff --git a/gdb/findvar.c b/gdb/findvar.c
index a39d897..cfb3e38 100644
--- a/gdb/findvar.c
+++ b/gdb/findvar.c
@@ -435,6 +435,7 @@ follow_static_link (struct frame_info *frame,
       /* If we don't know how to compute FRAME's base address, don't give up:
 	 maybe the frame we are looking for is upper in the stace frame.  */
       if (framefunc != NULL
+	  && SYMBOL_BLOCK_OPS (framefunc) != NULL
 	  && SYMBOL_BLOCK_OPS (framefunc)->get_frame_base != NULL
 	  && (SYMBOL_BLOCK_OPS (framefunc)->get_frame_base (framefunc, frame)
 	      == upper_frame_base))


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]