[Bug libgcc/91737] On Alpine Linux (libmusl) a statically linked C++ program which throws the first exception in two threads at the same time can busy spin on shutdown after main().

bugdal at aerifal dot cx gcc-bugzilla@gcc.gnu.org
Tue Sep 17 14:01:00 GMT 2019


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

Rich Felker <bugdal at aerifal dot cx> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bugdal at aerifal dot cx

--- Comment #2 from Rich Felker <bugdal at aerifal dot cx> ---
This is absolutely a bug in libgcc, not musl. Weak references are not a valid
way to determine if a program is multithreaded. Some distros build all of
glibc's libpthread.a as a single object file to *work around* bugs in libgcc
and other software, which largely defeats the purpose of static linking and is
not an option for musl. If gcc refuses to fix this we can ship patches, but I'd
rather get it fixed correctly.


More information about the Gcc-bugs mailing list