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 0/2 v3] Demangler crash handler


On Wed, Jun 4, 2014 at 7:53 AM, Andrew Burgess <aburgess@broadcom.com> wrote:
>> "Should" is the operative word here.  It *should* not be necessary
>> because the demangler *should* never crash.  But this isn't utopia.
>> The demangler is code, and code has bugs.  People make mistakes.
>> Things are valid now that may not be valid in the future.  And GDB
>> should not just crash if some symbol in the inferior isn't handled
>> or doesn't make sense or whatever.
>
> By this logic should / would we not extend the SIGSEGV handler to cover
> all gdb code?  If the target is running in synchronous mode we'd
> install our SEGV handler when the target stops and remove it when the
> target restarts (asynchronous mode would need more thought), then any
> bugs in gdb that cause a SEGV would result in a core dump ...
>
> I'm just not sure why the demangler should get special treatment.

It has a very specific entry point, and thus adding one here is easy
(setting aside the technicalities of the implementation).

I'd say this is ok if only to provide a proving ground for whether
this is useful in practice.


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