Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [RFA] mdebugread.c (psymtab_to_symtab_1): assert that 'fh' is not null
@ 2011-03-04 22:15 Michael Snyder
  2011-03-06 16:17 ` Jan Kratochvil
  0 siblings, 1 reply; 6+ messages in thread
From: Michael Snyder @ 2011-03-04 22:15 UTC (permalink / raw)
  To: gdb-patches

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

This occurs along a path where fh *could* be null, and then we 
dereference it.

OK?


[-- Attachment #2: null3.txt --]
[-- Type: text/plain, Size: 741 bytes --]

2011-03-04  Michael Snyder  <msnyder@msnyder-server.eng.vmware.com>

	* mdebugread.c (psymtab_to_symtab_1): Assert fh is not null.

Index: mdebugread.c
===================================================================
RCS file: /cvs/src/src/gdb/mdebugread.c,v
retrieving revision 1.120
diff -u -p -r1.120 mdebugread.c
--- mdebugread.c	2 Mar 2011 23:54:16 -0000	1.120
+++ mdebugread.c	4 Mar 2011 22:10:46 -0000
@@ -4323,6 +4323,7 @@ psymtab_to_symtab_1 (struct partial_symt
       top_stack->blocktype = stFile;
 
       ext_ptr = PST_PRIVATE (pst)->extern_tab;
+      gdb_assert (fh);
       for (i = PST_PRIVATE (pst)->extern_count; --i >= 0; ext_ptr++)
 	parse_external (ext_ptr, fh->fBigendian,
 			pst->section_offsets, pst->objfile);

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2011-03-07 16:53 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-03-04 22:15 [RFA] mdebugread.c (psymtab_to_symtab_1): assert that 'fh' is not null Michael Snyder
2011-03-06 16:17 ` Jan Kratochvil
2011-03-06 18:54   ` Michael Snyder
2011-03-06 19:05     ` Jan Kratochvil
2011-03-07 16:53       ` Tom Tromey
2011-03-07 17:21         ` Jan Kratochvil

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox