This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH/7.6] Fix wrong release (maybe crash GDB) in build_target_command_list
- From: Hui Zhu <teawater at gmail dot com>
- To: Tom Tromey <tromey at redhat dot com>
- Cc: Yao Qi <yao at codesourcery dot com>, gdb-patches ml <gdb-patches at sourceware dot org>, Joel Brobecker <brobecker at adacore dot com>
- Date: Thu, 25 Apr 2013 07:15:23 +0800
- Subject: Re: [PATCH/7.6] Fix wrong release (maybe crash GDB) in build_target_command_list
- References: <CANFwon0RCwi1CQepWnZuuPvXUNVHXJU-UbknXaR_U3h8shUc8g at mail dot gmail dot com> <87haiwngpr dot fsf at fleche dot redhat dot com> <CANFwon1pQsGrSc-jW=083V0xfJkDOJB8b459baoU-aoHjy1-UA at mail dot gmail dot com> <877gjsndpv dot fsf at fleche dot redhat dot com>
On Wed, Apr 24, 2013 at 11:35 PM, Tom Tromey <tromey@redhat.com> wrote:
>>>>>> "Hui" == Hui Zhu <teawater@gmail.com> writes:
>
> Hui> I tried but looks free conditions cannot crash GDB. :(
>
> I was wondering if there could be a non-crashing reproducer.
> It seems a little tricky.
>
> I think this particular patch is ok without a test though.
> Please check it in.
Checked in http://www.sourceware.org/ml/gdb-cvs/2013-04/msg00230.html
Can I check in it to 7.6 branch?
>
>>> The "continue" seems to mean that null_command_or_parse_error will not
>>> be set in the "parse error" case.
>
> Hui> I think it is right, because even if one of breakpoint loc doesn't
> Hui> have commands. GDB still need send other commands to target.
>
> I think that would be an argument for removing the "break" -- but not
> necessarily for keeping the "continue".
>
> The "return" in the null_command_or_parse_error case also seems weird to
> me, but I didn't think hard about it.
Because current function is hard to handle two or more breakpoints in
same address with different commands and conditions. So maybe I will
rewrite this function.
Please keep help me with that when I post patch for them.
Thanks,
Hui
>
> Tom