This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA] Fix type_stack leaks in c expression parsing.
- From: Kevin Buettner <kevinb at redhat dot com>
- To: Philippe Waroquiers <philippe dot waroquiers at skynet dot be>
- Cc: gdb-patches at sourceware dot org
- Date: Sat, 9 Feb 2019 17:31:34 -0700
- Subject: Re: [RFA] Fix type_stack leaks in c expression parsing.
- References: <20190209195000.23057-1-philippe.waroquiers@skynet.be>
On Sat, 9 Feb 2019 20:50:00 +0100
Philippe Waroquiers <philippe.waroquiers@skynet.be> wrote:
> Fix these by storing the allocated type_stack in the cpstate->type_stacks
> vector.
>
> Tested on debian/amd64, natively and under valgrind.
>
> gdb/ChangeLog
> 2019-02-09 Philippe Waroquiers <philippe.waroquiers@skynet.be>
>
> * c-exp.y (direct_abs_decl): emplace_back type_stack.
The actual changes in your patch look good to me.
One nit regarding the ChangeLog entry though - I think we strive to
make our ChangeLog remarks look like sentences where the first word
is capitalized. So... maybe something like:
* c-exp.y (direct_abs_decl): Use emplace_back to record the
type_stack.
If you can think of a better ChangeLog comment, that's fine too.
Kevin