public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/103133] New: Binary built with -static using std::thread crashes
@ 2021-11-08 12:02 loximann at gmail dot com
  2021-11-08 12:17 ` [Bug libstdc++/103133] " redi at gcc dot gnu.org
                   ` (12 more replies)
  0 siblings, 13 replies; 14+ messages in thread
From: loximann at gmail dot com @ 2021-11-08 12:02 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103133

            Bug ID: 103133
           Summary: Binary built with -static using std::thread crashes
           Product: gcc
           Version: 11.2.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: loximann at gmail dot com
  Target Milestone: ---

The following program crashes when built with -static on Fedora 35:

    #include <thread>

    int main(int argc, char *argv[])
    {
        std::thread foo{[](){}};
        foo.join();

        return 0;
    }

Dynamic linking works fine though:

    $ g++ f35_thread_static_broken.cpp
    $ ./a.out 
    $ g++ -static f35_thread_static_broken.cpp
    $ ./a.out
    zsh: segmentation fault (core dumped)  ./a.out

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2022-08-03 13:33 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-08 12:02 [Bug c++/103133] New: Binary built with -static using std::thread crashes loximann at gmail dot com
2021-11-08 12:17 ` [Bug libstdc++/103133] " redi at gcc dot gnu.org
2021-11-08 12:31 ` fw at gcc dot gnu.org
2021-11-08 12:47 ` rguenth at gcc dot gnu.org
2021-11-08 12:50 ` redi at gcc dot gnu.org
2021-11-08 12:51 ` redi at gcc dot gnu.org
2021-11-08 13:02 ` redi at gcc dot gnu.org
2021-11-10 12:04 ` cvs-commit at gcc dot gnu.org
2021-11-10 12:09 ` redi at gcc dot gnu.org
2021-11-12 10:28 ` redi at gcc dot gnu.org
2021-11-24 11:52 ` cvs-commit at gcc dot gnu.org
2021-11-24 11:55 ` redi at gcc dot gnu.org
2022-08-03 12:30 ` cvs-commit at gcc dot gnu.org
2022-08-03 13:33 ` redi at gcc dot gnu.org

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).