This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFA] Fix type_stack leaks in c expression parsing.


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]