public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "keith.marshall at mailinator dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug jit/98586] libgccjit crashes with segmentation fault on failed gcc_assert Date: Fri, 08 Jan 2021 11:18:27 +0000 [thread overview] Message-ID: <bug-98586-4-4o4i3yqQ9r@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-98586-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98586 --- Comment #2 from Keith Marshall <keith.marshall at mailinator dot com> --- (In reply to David Malcolm from comment #1) > I looked at calling diagnostic_initialize. > > Unfortunately, libgccjit supports being linked into multithreaded processes, > and it guards all of the regular compiler state with a single big mutex, > including the diagnostic subsystem (and the "global_dc" pointer implicitly > used by fancy_abort). This failure is happening before the mutex is > acquired. Indeed, yes. I actually patched the mutex acquisition/release code, to use a native MS-Windows critical section, in preference to the alien pthreads mutex: https://osdn.net/ticket/download.php?group_id=3917&tid=41070&file_id=5791 I thought that, maybe, it was my modification which led to the crash; I was surprised to find that execution never reached my modified code. > I'm not sure yet what the best fix is. I don't know the GCC internals well enough, to advise on this, but I'm willing to assist with testing, in any way that I can. In the meantime, I've patched around the flawed assumption, which leads to the failing assertion, in the first place: https://osdn.net/ticket/download.php?group_id=3917&tid=41070&file_id=5799 Thanks for your attention.
next prev parent reply other threads:[~2021-01-08 11:18 UTC|newest] Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-01-07 18:12 [Bug jit/98586] New: " keith.marshall at mailinator dot com 2021-01-07 23:35 ` [Bug jit/98586] " dmalcolm at gcc dot gnu.org 2021-01-08 11:18 ` keith.marshall at mailinator dot com [this message] 2021-01-11 22:09 ` dmalcolm at gcc dot gnu.org 2021-01-14 22:03 ` cvs-commit at gcc dot gnu.org 2021-01-14 22:04 ` dmalcolm at gcc dot gnu.org 2021-01-16 14:16 ` keith.marshall at mailinator dot com
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-98586-4-4o4i3yqQ9r@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: linkBe 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).