public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "dmalcolm at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug jit/64721] SIBABRT becomes a SIGSEGV in jit testsuite
Date: Wed, 21 Jan 2015 22:11:00 -0000	[thread overview]
Message-ID: <bug-64721-4-n2budwiEyl@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-64721-4@http.gcc.gnu.org/bugzilla/>

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.


  reply	other threads:[~2015-01-21 22:11 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-21 22:06 [Bug jit/64721] New: SIBAGRT turns into " dmalcolm at gcc dot gnu.org
2015-01-21 22:11 ` dmalcolm at gcc dot gnu.org [this message]
2015-01-21 22:12 ` [Bug jit/64721] SIBABRT becomes a " dmalcolm at gcc dot gnu.org
2015-01-21 22:18 ` [Bug jit/64721] SIGABRT becomes a SIGSEGV after invoking gcc_jit_context_compile[_to_file] within a process dmalcolm at gcc dot gnu.org
2015-01-22 21:19 ` dmalcolm at gcc dot gnu.org
2015-01-23 16:31 ` dmalcolm at gcc dot gnu.org
2015-01-23 16:31 ` dmalcolm at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-64721-4-n2budwiEyl@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).