From: Tom Tromey <tom@tromey.com>
To: Simon Marchi <simon.marchi@polymtl.ca>
Cc: Simon Marchi <simon.marchi@ericsson.com>,
gdb-patches@sourceware.org, Tom Tromey <tom@tromey.com>
Subject: Re: [PATCH] compile-loc2c: Fix uninitialized variable error
Date: Sun, 09 Jul 2017 16:44:00 -0000 [thread overview]
Message-ID: <8760f1o8zm.fsf@tromey.com> (raw)
In-Reply-To: <3ec2d2df8170bea2b43c095996ad7278@polymtl.ca> (Simon Marchi's message of "Sun, 25 Jun 2017 19:24:06 +0200")
>>>>> "Simon" == Simon Marchi <simon.marchi@polymtl.ca> writes:
Sorry about the delay on this. I've been away.
>> * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
>> address when op is DW_OP_addr.
Simon> As you are the original author of that code, would it be possible for
Simon> you to take a quick look, if you remember any of this :) ?
This patch looks correct to me. I'm sure the earlier state was just an
oversight.
FWIW in gimli's DWARF expression code, I separated the format decoder
from the evaluator to avoid this sort of problem. Each operation is
decoded to an object; and then evaluation is done using the object.
This isn't perfect, as different users of the decoded objects can still
disagree about the semantics of the operation, but an approach like this
would have caught this bug.
Tom
next prev parent reply other threads:[~2017-07-09 16:44 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-10 19:49 Simon Marchi
2017-06-25 17:24 ` Simon Marchi
2017-07-09 16:44 ` Tom Tromey [this message]
2017-07-09 18:28 ` Simon Marchi
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=8760f1o8zm.fsf@tromey.com \
--to=tom@tromey.com \
--cc=gdb-patches@sourceware.org \
--cc=simon.marchi@ericsson.com \
--cc=simon.marchi@polymtl.ca \
/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