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: [PATCH] gdbserver: Fix crash when QTinit is handled with no inferior process attached


On 02/05/2015 11:53 AM, Antoine Tremblay wrote:
Hi,
    I'm quite new to gdb, but in general I would argue that it's better
to make a program resilient to wrong input then to sanitize the input,
let's say someday something else then gdb would use gdbserver....?

It is certainly a valid concern.


    But I sure would like to take a look at your patch if you have it
handy ?

I just need to extract it from the tree and do a bit of an update. We could probably merge both to robustify the tracepoint mechanism.

On 02/05/2015 08:44 AM, Luis Machado wrote:
On 02/05/2015 11:37 AM, Luis Machado wrote:
On 02/05/2015 11:30 AM, Antoine Tremblay wrote:
ping

On 01/27/2015 02:35 PM, Antoine Tremblay wrote:
When gdbserver is called with --multi and attach has not been
called yet
and tstart is called on the gdb client, gdbserver would crash.
This patch fixes gdbserver so that it returns E01 to the gdb client.

Wouldn't it make more sense to prevent GDB from sending any tracepoint
packets that require a running inferior if there is none?

I remember fixing this in a local tree but on GDB's side. I think it is
remote.c:remote_trace_init and other related functions.

What do you think?

I've looked around and found the patch in a local tree of mine. It
fixes more cases of tracepoint commands that require a running inferior.

I could revive and submit it if it makes things easier.




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