public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "yshuiv7 at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug libstdc++/96817] __cxa_guard_acquire unsafe against dynamically loaded pthread
Date: Fri, 25 Sep 2020 20:37:56 +0000 [thread overview]
Message-ID: <bug-96817-4-krO9tjhU7c@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-96817-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96817
--- Comment #15 from Yuxuan Shui <yshuiv7 at gmail dot com> ---
(In reply to Jonathan Wakely from comment #13)
> (In reply to Yuxuan Shui from comment #1)
> > Example:
> >
> > This program normally deadlocks when using linked pthread:
> >
> > https://godbolt.org/z/Yrza4e
> >
> > But it will throw recursive_init_error when using dlopen'd pthread:
> >
> > https://godbolt.org/z/afMe5d
>
> I'm not sure what these examples are very helpful. Throwing
> recursive_init_error is the correct behaviour here, it's a bug that we fail
> to detect the recursion when it happens in the same thread.
This is just to demonstrate the difference in the behavior. It's easy to
imagine this happen in a legitimate use case (and we indeed have one).
next prev parent reply other threads:[~2020-09-25 20:37 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-27 12:32 [Bug libstdc++/96817] New: " yshuiv7 at gmail dot com
2020-08-27 12:48 ` [Bug libstdc++/96817] " yshuiv7 at gmail dot com
2020-08-27 12:48 ` redi at gcc dot gnu.org
2020-08-27 12:53 ` yshuiv7 at gmail dot com
2020-08-27 12:58 ` rguenth at gcc dot gnu.org
2020-08-27 13:05 ` yshuiv7 at gmail dot com
2020-08-27 13:06 ` yshuiv7 at gmail dot com
2020-08-27 13:15 ` redi at gcc dot gnu.org
2020-08-27 13:23 ` redi at gcc dot gnu.org
2020-08-27 13:26 ` yshuiv7 at gmail dot com
2020-08-27 13:34 ` redi at gcc dot gnu.org
2020-08-27 14:02 ` redi at gcc dot gnu.org
2020-08-27 14:04 ` redi at gcc dot gnu.org
2020-09-25 18:11 ` redi at gcc dot gnu.org
2020-09-25 19:55 ` redi at gcc dot gnu.org
2020-09-25 20:37 ` yshuiv7 at gmail dot com [this message]
2020-09-25 20:40 ` yshuiv7 at gmail dot com
2020-09-26 19:41 ` cvs-commit at gcc dot gnu.org
2020-10-25 9:27 ` rimvydas.jas at gmail dot com
2020-10-25 22:08 ` redi at gcc dot gnu.org
2020-11-04 15:34 ` cvs-commit at gcc dot gnu.org
2020-11-04 15:36 ` redi 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-96817-4-krO9tjhU7c@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).