public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "redi at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/63614] With gcc-4.8.3 and -stdgnu++0x call to std::this_thread::get_id() creates SIGSEV Date: Wed, 22 Oct 2014 14:41:00 -0000 [thread overview] Message-ID: <bug-63614-4-eHkbupfxwM@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-63614-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63614 --- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> --- (In reply to dyle from comment #0) > Is this a gcc bug? Is it possible that std::this_thread::get_id() SIGSEVs? Yes it's possible if you don't use -pthread to link to libpthread. > (Yes, there's a race condition on std::cout. But this is not the point.) Is > there a drawback by creating a threads that way and could there be any > correlation to my sigsev? No, it's unlikely. You can rule that out by using std::thread(&A::foo, this) (In reply to dyle from comment #1) > Huh. It ain't std::this_thread::get_id(), it is the assignment! > Because this > > auto nThread = 1; > > as first statement in the thread crashes also. o.O Then that's unlikely to be a GCC bug, are you running out of stack, or scribbling on the stack from another function? Have you tried using valgrind, or asan, or -fstack-protector ?
next prev parent reply other threads:[~2014-10-22 14:23 UTC|newest] Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top 2014-10-22 12:09 [Bug libstdc++/63614] New: " dyle at dyle dot org 2014-10-22 14:41 ` redi at gcc dot gnu.org [this message] 2014-10-22 15:04 ` [Bug libstdc++/63614] " dyle at dyle dot 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-63614-4-eHkbupfxwM@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).