public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH 0/3 v4] Demangler crash handler
@ 2014-06-05 13:01 Gary Benson
  2014-06-05 13:02 ` [PATCH 1/3 v4] Add new internal problem for demangler warnings Gary Benson
                   ` (3 more replies)
  0 siblings, 4 replies; 15+ messages in thread
From: Gary Benson @ 2014-06-05 13:01 UTC (permalink / raw)
  To: gdb-patches
  Cc: Andrew Burgess, Doug Evans, Eli Zaretskii, Florian Weimer,
	Mark Kettenis, Pedro Alves, Tom Tromey

Hi all,

This patch is an updated version of the demangler crash handler I
posted yesterday.  The main changes from the previous version are:

 1) All #ifdef SIGSEGV conditionals have been removed.

 2) If the user set "ulimit -c 0" then no core file will be
    created and a warning will be printed.  This mirrors what
    internal_error and internal_warning currently do.
    
 3) A separate signal stack is created for the SIGSEGV handler
    to allow it to function correctly if the normal process
    stack overflows.  This signal stack is currently only used
    by the SIGSEGV handler--all other signal handlers use the
    normal process stack as before.

Doug requested that I change the patch to emit warnings for every
demangler crash, not just the first.  I've not done this, my reason
being that subsequent failures could have been caused by the first,
by memory corruption or some leftover state: they could be bogus,
and could lead to us chasing bugs that don't exist.  I prefer this
way, but I'm not hung up on it and if it's a blocker for Doug or
anyone else I will add the extra warnings.

I've split the patches as follows:

 1/3 - adds a new category of internal problem for demangler
       warnings.  This patch is unchanged from the previous
       version (PATCH 1/2 v3):
       https://sourceware.org/ml/gdb-patches/2014-06/msg00142.html

 2/3 - refactors and exposes the core-dumping functions in utils.c.
       This is a completely new patch.

 3/3 - the crash catcher itself.  This patch differs from the
       previous version by the removal of the #ifdef SIGSEGV
       conditionals, the addition of a check to see if a core
       dump should be performed, and the creation of a separate
       stack to allow the signal handler to function when the
       normal stack is exhausted.

I would push all three patches as one commit.  The news file entries
for the commit would be:

  * New options
  
  maint set catch-demangler-crashes (on|off)
  maint show catch-demangler-crashes
    Control whether GDB should attempt to catch crashes in the
    symbol name demangler.

  maint set demangler-warning quit (yes|no|ask)
  maint show demangler-warning quit
    Control whether GDB should exit if it catches a crash in the
    symbol name demangler.
  
  * New commands
  
  maint demangler-warning
    Cause GDB to call the internal function demangler_warning and
    hence behave as though an internal error in the demangler has
    been detected.

Is this ok to commit?

Thanks,
Gary

-- 
http://gbenson.net/

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2014-06-09 11:48 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-06-05 13:01 [PATCH 0/3 v4] Demangler crash handler Gary Benson
2014-06-05 13:02 ` [PATCH 1/3 v4] Add new internal problem for demangler warnings Gary Benson
2014-06-05 13:03 ` [PATCH 2/3 v4] Refactor and expose core-dumping functionality Gary Benson
2014-06-05 16:28   ` Doug Evans
2014-06-06  9:09     ` Gary Benson
2014-06-05 13:04 ` [PATCH 3/3 v4] Demangler crash handler Gary Benson
2014-06-06 18:16   ` Florian Weimer
2014-06-06 19:27     ` Gary Benson
2014-06-06 19:42       ` Florian Weimer
2014-06-06 21:12   ` Andrew Burgess
2014-06-09  9:01     ` Gary Benson
2014-06-09 10:26       ` Andrew Burgess
2014-06-09 11:48         ` Gary Benson
2014-06-05 16:19 ` [PATCH 0/3 " Doug Evans
2014-06-06  9:19   ` Gary Benson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).