From: mec.gnu@mindspring.com (Michael Elizabeth Chastain)
To: drow@mvista.com, gdb-patches@sources.redhat.com
Subject: Re: RFA: Don't use obsavestring in dwarf2read
Date: Thu, 15 Jan 2004 14:23:00 -0000 [thread overview]
Message-ID: <20040115142308.D20B24B104@berman.michael-chastain.com> (raw)
I proofread this. I didn't think it worthwhile to run the test suite,
because almost all tests are simple "load file / run / exit" that would
not catch memory lifetime bugs.
I have one concern. read_string and read_indirect_string return NULL to
indicate a zero-length string. obstack_savestring understands this and
copies an empty string "" into the obstack. In most of your changes,
the string pointer is protected against being NULL, but in other
changes, it is possible for the string pointer to be NULL. If the
string is NULL, then your code will produce slightly different results
than previously, which is a bit scary in the symtab reader.
So could you do this in two places:
SET_FIELD_PHYSNAME (*fp, physname ? physname : "");
fnp->physname = physname ? physname : "";
Other than that, it looks okay to me. I stared at it for a while to
check that everything is coming from psymbol_obstack and symbol_obstack,
not dwarf2_tmp_obstack or alloca'd memory.
Michael C
next reply other threads:[~2004-01-15 14:23 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-01-15 14:23 Michael Elizabeth Chastain [this message]
-- strict thread matches above, loose matches on Subject: below --
2004-02-10 10:08 Michael Elizabeth Chastain
2004-02-02 21:48 Michael Elizabeth Chastain
2004-01-12 1:57 Daniel Jacobowitz
2004-02-02 18:22 ` Daniel Jacobowitz
2004-02-05 19:29 ` Elena Zannoni
2004-02-05 19:48 ` Daniel Jacobowitz
2004-02-05 20:37 ` Elena Zannoni
2004-02-05 20:47 ` Daniel Jacobowitz
2004-02-05 23:20 ` Elena Zannoni
2004-02-08 4:41 ` Daniel Jacobowitz
2004-02-16 15:05 ` Elena Zannoni
2004-03-19 0:09 ` Daniel Jacobowitz
2004-03-05 3:31 ` 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=20040115142308.D20B24B104@berman.michael-chastain.com \
--to=mec.gnu@mindspring.com \
--cc=drow@mvista.com \
--cc=gdb-patches@sources.redhat.com \
/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