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 1/2] Fix regressions for multi breakpoints command line setting/clearing


On 08/10/2018 04:13 AM, Tom Tromey wrote:
> commit aea20ede47dfca4156f19c0b41e3a1b11e724c20
> Author: Tom Tromey <tom@tromey.com>
> Date:   Sat Jul 28 11:03:09 2018 -0600
> 
>     Fix use-after-free in number_or_range_parser
>     
>     -fsanitize=address showed a use-after-free in number_or_range_parser.
>     
>     The cause was that handle_line_of_input could stash the input into
>     "saved_command_line", and then this could be freed by reentrant calls.

But why is handle_line_of_input freeing saved_command_line on reentrant calls?
"repeat" is only supposed to be set for top-level commands, I'd think?

Thanks,
Pedro Alves


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