From: Michael Snyder <msnyder@vmware.com>
To: "gdb-patches@sourceware.org" <gdb-patches@sourceware.org>
Subject: [RFA] mdebugread.c (psymtab_to_symtab_1): assert that 'fh' is not null
Date: Fri, 04 Mar 2011 22:15:00 -0000 [thread overview]
Message-ID: <4D71648B.1090101@vmware.com> (raw)
[-- 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);
next reply other threads:[~2011-03-04 22:15 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-04 22:15 Michael Snyder [this message]
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
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=4D71648B.1090101@vmware.com \
--to=msnyder@vmware.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