[Bug libgcc/56101] pthread program abort
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56101 Masahiko Kimoto changed: What|Removed |Added CC||masahiko.kimoto@miraclelinu ||x.com --- Comment #6 from Masahiko Kimoto --- In case of removing GCC runtime libraries(libgcc_s.so, libstdc++.so) from root filesystem, especially required in embedded environment, this constrainti annoys us. Is there any workaround without using dlopen(libgcc_s) ? According to our examination, it does not abort when all libraries are linked statically by -static option of GCC.
[Bug libgcc/56101] pthread program abort
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56101 --- Comment #5 from Andrew Pinski --- *** Bug 55779 has been marked as a duplicate of this bug. ***
[Bug libgcc/56101] pthread program abort
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56101 Andrew Pinski changed: What|Removed |Added Status|NEW |RESOLVED Resolution|--- |WONTFIX --- Comment #4 from Andrew Pinski --- This is the reason for a shared libgcc. Not a bug.
[Bug libgcc/56101] pthread program abort
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56101 --- Comment #3 from Siddhesh Poyarekar --- Here's the simplified non-preprocessed test, since it's not a problem with the compiler proper: $ cat > tmain.C #include #include #include extern "C" void *worker_thread(void *tap) { int j[1] = { 0 }; j[0] += *(int *)tap; pthread_exit(NULL); return NULL; } int main(void) { pthread_t t; int targs; if (pthread_create(&t, NULL, worker_thread, &targs) != 0) exit(-1); return(pthread_join(t, NULL)); }
[Bug libgcc/56101] pthread program abort
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56101 Siddhesh Poyarekar changed: What|Removed |Added CC||siddhesh at redhat dot com --- Comment #2 from Siddhesh Poyarekar --- It's because libpthread dynamically loads libgcc_s.so.1. As a result there are two copies of dwarf_reg_size_table, where one (the dynamic one) is initialized and the other (the static one) is used, resulting in this crash.
[Bug libgcc/56101] pthread program abort
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56101 Jonathan Wakely changed: What|Removed |Added Status|UNCONFIRMED |NEW Last reconfirmed||2013-01-25 Ever Confirmed|0 |1 --- Comment #1 from Jonathan Wakely 2013-01-25 12:38:31 UTC --- (In reply to comment #0) > /remote/depotsrc/depotsrc/amd64-2.6/local_install/gcc-4.7.2_test2/bin/g++ -I. > -Wall -Wextra -fno-strict-aliasing -fwrapv -m64 -c -msse2 -mfpmath=sse > -fno-omit-frame-pointer -fno-dollars-in-identifiers -save-temps -pthread -o > tmain.o tmain.C > /remote/depotsrc/depotsrc/amd64-2.6/local_install/gcc-4.7.2_test2/bin/g++ > -static-libgcc -static-libstdc++ -o mtest tmain.o -pthread -lm -ldl Most of these flags are irrelevant, only these are needed to reproduce it: -static-libgcc -static-libstdc++ -pthread If either libgcc or libstdc++ is dynamically linked it doesn't abort