public inbox for gdb-prs@sourceware.org help / color / mirror / Atom feed
From: tromey@redhat.com To: gdb-prs@sources.redhat.com, nobody@sources.redhat.com, pedro@codesourcery.com, tromey@redhat.com Subject: Re: macros/2564: 'p siginfo->si_addr' doesn't work anymore Date: Thu, 11 Dec 2008 01:14:00 -0000 [thread overview] Message-ID: <20081211011414.784.qmail@sourceware.org> (raw) Synopsis: 'p siginfo->si_addr' doesn't work anymore Responsible-Changed-From-To: unassigned->tromey Responsible-Changed-By: tromey Responsible-Changed-When: Thu Dec 11 01:14:13 2008 Responsible-Changed-Why: I'll fix this. State-Changed-From-To: open->analyzed State-Changed-By: tromey State-Changed-When: Thu Dec 11 01:14:13 2008 State-Changed-Why: Thanks for the valgrind trace. I've looked into it a bit more. I believe the problem is due to yacc lookahead. In particular, while expanding "si_addr", the lexer returns a NAME token for the final "si_addr". Then the lexer calls finished_macro_expansion, which frees the expansion string; then it returns an EOF token. This causes the parser to reduce the final rule, resulting in a call to write_exp_string, which reads from the freed memory. My first thought is that the simplest thing to do would be to make an obstack during parsing, and simply push all the intermediate macro expansions onto it. I suspect this is a latent bug in 6.8, but I don't know how to trigger it. This example does not work, perhaps because the parser decides to reduce at different times (I didn't check that theory). http://sourceware.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gdb&pr=2564
next reply other threads:[~2008-12-11 1:14 UTC|newest] Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top 2008-12-11 1:14 tromey [this message] -- strict thread matches above, loose matches on Subject: below -- 2008-12-11 18:31 tromey 2008-12-10 21:18 Pedro Alves 2008-12-10 19:28 Tom Tromey 2008-12-10 16:58 Pedro Alves 2008-12-10 15:48 pedro
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=20081211011414.784.qmail@sourceware.org \ --to=tromey@redhat.com \ --cc=gdb-gnats@sources.redhat.com \ --cc=gdb-prs@sources.redhat.com \ --cc=nobody@sources.redhat.com \ --cc=pedro@codesourcery.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: linkBe 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; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).