[Bug jit/64721] SIBABRT becomes a SIGSEGV in jit testsuite
dmalcolm at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Jan 21 22:11:00 GMT 2015
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64721
David Malcolm <dmalcolm at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|SIBAGRT turns into SIGSEGV |SIBABRT becomes a SIGSEGV
|in jit testsuite |in jit testsuite
--- Comment #1 from David Malcolm <dmalcolm at gcc dot gnu.org> ---
Currently we unconditionally install crash_handler as a signal_handler, and
this itself (ironically) will crash if called after toplev::main cleans up the
global_diagnostic_context.
Three options:
(A) We could unregister the signal handlers in toplev::finalize immediately
before global_diagnostic_context has diagnostic_finish called on it,
potentially restoring whatever signal handlers were there before.
(B) Don't register signal-handlers at all when run from inside libgccjit.
(C) Make creation of global_diagnostic_context be idempotent, and don't
clean it up.
(B) seems best from the POV of a library that aims to be thread-safe: don't
touch signal-handlers when inside libgccjit. I have a patch for this.
More information about the Gcc-bugs
mailing list