public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libgcc/56101] New: pthread program abort
@ 2013-01-24 21:54 ryang at synopsys dot com
2013-01-25 12:38 ` [Bug libgcc/56101] " redi at gcc dot gnu.org
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: ryang at synopsys dot com @ 2013-01-24 21:54 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56101
Bug #: 56101
Summary: pthread program abort
Classification: Unclassified
Product: gcc
Version: 4.7.2
Status: UNCONFIRMED
Severity: major
Priority: P3
Component: libgcc
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: ryang@synopsys.com
Created attachment 29269
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=29269
The preprocessed file
-Compiler informations:
g++ -v
Using built-in specs.
COLLECT_GCC=/remote/depotsrc/depotsrc/amd64-2.6/local_install/gcc-4.7.2_test2/bin/g++
COLLECT_LTO_WRAPPER=/remote/depotsrc/depotsrc/amd64-2.6/local_install/gcc-4.7.2_test2/libexec/gcc/x86_64-redhat-linux/4.7.2/lto-wrapper
Target: x86_64-redhat-linux
Configured with: ../../src/gcc-4.7.2/configure
--prefix=/remote/depotsrc/depotsrc/amd64-2.6/local_install/gcc-4.7.2_test2
--enable-bootstrap --enable-threads=posix --enable-checking=release
--with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions
--enable-languages=c,c++,fortran --disable-libgcj --with-cpu=generic
--build=x86_64-redhat-linux
Thread model: posix
gcc version 4.7.2 (GCC)
- Command line triggers the bug:
ryang@sderh7 test2> mtest
Abort
- compiler outout:
/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
- the preprocessed file (*.i*)
see the attachment
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug libgcc/56101] pthread program abort
2013-01-24 21:54 [Bug libgcc/56101] New: pthread program abort ryang at synopsys dot com
@ 2013-01-25 12:38 ` redi at gcc dot gnu.org
2013-05-18 12:53 ` siddhesh at redhat dot com
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: redi at gcc dot gnu.org @ 2013-01-25 12:38 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56101
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2013-01-25
Ever Confirmed|0 |1
--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> 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
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug libgcc/56101] pthread program abort
2013-01-24 21:54 [Bug libgcc/56101] New: pthread program abort ryang at synopsys dot com
2013-01-25 12:38 ` [Bug libgcc/56101] " redi at gcc dot gnu.org
@ 2013-05-18 12:53 ` siddhesh at redhat dot com
2013-05-18 13:04 ` siddhesh at redhat dot com
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: siddhesh at redhat dot com @ 2013-05-18 12:53 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56101
Siddhesh Poyarekar <siddhesh at redhat dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |siddhesh at redhat dot com
--- Comment #2 from Siddhesh Poyarekar <siddhesh at redhat dot com> ---
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.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug libgcc/56101] pthread program abort
2013-01-24 21:54 [Bug libgcc/56101] New: pthread program abort ryang at synopsys dot com
2013-01-25 12:38 ` [Bug libgcc/56101] " redi at gcc dot gnu.org
2013-05-18 12:53 ` siddhesh at redhat dot com
@ 2013-05-18 13:04 ` siddhesh at redhat dot com
2013-05-18 15:27 ` pinskia at gcc dot gnu.org
2022-07-04 3:56 ` masahiko.kimoto at miraclelinux dot com
4 siblings, 0 replies; 6+ messages in thread
From: siddhesh at redhat dot com @ 2013-05-18 13:04 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56101
--- Comment #3 from Siddhesh Poyarekar <siddhesh at redhat dot com> ---
Here's the simplified non-preprocessed test, since it's not a problem with the
compiler proper:
$ cat > tmain.C
#include <pthread.h>
#include <stdlib.h>
#include <stdio.h>
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));
}
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug libgcc/56101] pthread program abort
2013-01-24 21:54 [Bug libgcc/56101] New: pthread program abort ryang at synopsys dot com
` (2 preceding siblings ...)
2013-05-18 13:04 ` siddhesh at redhat dot com
@ 2013-05-18 15:27 ` pinskia at gcc dot gnu.org
2022-07-04 3:56 ` masahiko.kimoto at miraclelinux dot com
4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu.org @ 2013-05-18 15:27 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56101
--- Comment #5 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
*** Bug 55779 has been marked as a duplicate of this bug. ***
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug libgcc/56101] pthread program abort
2013-01-24 21:54 [Bug libgcc/56101] New: pthread program abort ryang at synopsys dot com
` (3 preceding siblings ...)
2013-05-18 15:27 ` pinskia at gcc dot gnu.org
@ 2022-07-04 3:56 ` masahiko.kimoto at miraclelinux dot com
4 siblings, 0 replies; 6+ messages in thread
From: masahiko.kimoto at miraclelinux dot com @ 2022-07-04 3:56 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56101
Masahiko Kimoto <masahiko.kimoto at miraclelinux dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |masahiko.kimoto@miraclelinu
| |x.com
--- Comment #6 from Masahiko Kimoto <masahiko.kimoto at miraclelinux dot com> ---
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.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2022-07-04 3:56 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-01-24 21:54 [Bug libgcc/56101] New: pthread program abort ryang at synopsys dot com
2013-01-25 12:38 ` [Bug libgcc/56101] " redi at gcc dot gnu.org
2013-05-18 12:53 ` siddhesh at redhat dot com
2013-05-18 13:04 ` siddhesh at redhat dot com
2013-05-18 15:27 ` pinskia at gcc dot gnu.org
2022-07-04 3:56 ` masahiko.kimoto at miraclelinux dot com
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).