From: Tom Tromey <tom@tromey.com>
To: Dan Robertson <danlrobertson89@gmail.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH] bug 23124: rust - Fix null deref when casting
Date: Sun, 29 Apr 2018 03:49:00 -0000 [thread overview]
Message-ID: <87fu3e7jtp.fsf@tromey.com> (raw)
In-Reply-To: <20180428032443.GA1869@tomyris> (Dan Robertson's message of "Sat, 28 Apr 2018 03:24:43 +0000")
>>>>> "Dan" == Dan Robertson <danlrobertson89@gmail.com> writes:
Dan> Attached a patch that fixes bug 23124.
Thanks for the patch.
This is the right fix, but there are a few nits. If you want to address
those, that would be nice. If you can't, I will do it on Monday.
It is missing a ChangeLog entry. It's normal to mention the bug in the
ChangeLog, see any of the ones mentioning "PR .../NNNN".
It needs a test, feel free to just drop the simplest thing possible into
gdb/testsuite/gdb.rust/expr.exp. The test suite, for some reason, has a
ChangeLog of its own.
Dan> - for (const rust_op *op : *params)
Dan> - result.push_back (convert_ast_to_type (state, op));
Dan> + if (params) {
Dan> + for (const rust_op *op : *params) {
Dan> + result.push_back (convert_ast_to_type (state, op));
Dan> + }
Dan> + }
In the gdb flavor of GNU style, one would format this as:
if (params != nullptr)
{
for (const rust_op *op : *params)
result.push_back (convert_ast_to_type (state, op));
}
Tom
next prev parent reply other threads:[~2018-04-29 3:49 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-28 3:27 Dan Robertson
2018-04-29 3:49 ` Tom Tromey [this message]
2018-04-29 16:18 ` Dan Robertson
2018-05-01 5:09 ` Tom Tromey
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=87fu3e7jtp.fsf@tromey.com \
--to=tom@tromey.com \
--cc=danlrobertson89@gmail.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