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]

[PATCH] logic error in async event-top/gdb_readline2


OK, this function is the asynchronous version of top.c/gdb_readline
(of which it is also a copy).  The main difference is that wherever
the original (gdb_readline) returns a pointer to an input string,
this versino (gdb_readline2) passes the pointer to a callback called
'input_handler'.

And the problem is that the author neglected to make sure that
gdb_readline2 also returns after calling the callback.

As a result, we will enter code that was not ment to execute at
this time, and will access a pointer to memory that has already
been freed.

Attachment: 218.txt
Description: Text document


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