* [Bug libgomp/42616] OMP'ed loop inside pthread leads to crash.
[not found] <bug-42616-4@http.gcc.gnu.org/bugzilla/>
@ 2011-01-05 18:34 ` vityan at vityan dot sytes.net
2011-01-05 18:36 ` zlogic at gmail dot com
` (9 subsequent siblings)
10 siblings, 0 replies; 18+ messages in thread
From: vityan at vityan dot sytes.net @ 2011-01-05 18:34 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42616
Victor K. <vityan at vityan dot sytes.net> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |vityan at vityan dot
| |sytes.net
--- Comment #8 from Victor K. <vityan at vityan dot sytes.net> 2011-01-05 18:20:35 UTC ---
Testsuite works just fine with MingW-W64(GCC 4.6.0) + WinPthreads:
/mw64src
$ g++ -m32 omp_test.c -o ./omptst.exe -D_OPENMP -lgomp -lpthread
/mw64src
$ ./omptst
OMP : All looks good
/mw64src
$ g++ -m64 -static omp_test.c -o ./omptst64.exe -D_OPENMP -lgomp -lpthread
/mw64src
$ ./omptst64
OMP : All looks good
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug libgomp/42616] OMP'ed loop inside pthread leads to crash.
[not found] <bug-42616-4@http.gcc.gnu.org/bugzilla/>
2011-01-05 18:34 ` [Bug libgomp/42616] OMP'ed loop inside pthread leads to crash vityan at vityan dot sytes.net
@ 2011-01-05 18:36 ` zlogic at gmail dot com
2011-03-16 17:45 ` nightstrike at gmail dot com
` (8 subsequent siblings)
10 siblings, 0 replies; 18+ messages in thread
From: zlogic at gmail dot com @ 2011-01-05 18:36 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42616
--- Comment #9 from Dmitri Zolotukhin <zlogic at gmail dot com> 2011-01-05 18:30:46 UTC ---
@Victor K.
Are you using the MinGW or TDM version of GCC?
TDM 4.5.0 passes the test cases on my machine. Seems the problem existed only
in the 4.4.* branch of gcc.
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug libgomp/42616] OMP'ed loop inside pthread leads to crash.
[not found] <bug-42616-4@http.gcc.gnu.org/bugzilla/>
2011-01-05 18:34 ` [Bug libgomp/42616] OMP'ed loop inside pthread leads to crash vityan at vityan dot sytes.net
2011-01-05 18:36 ` zlogic at gmail dot com
@ 2011-03-16 17:45 ` nightstrike at gmail dot com
2011-05-04 18:00 ` gcc.20.cwilson at spamgourmet dot com
` (7 subsequent siblings)
10 siblings, 0 replies; 18+ messages in thread
From: nightstrike at gmail dot com @ 2011-03-16 17:45 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42616
nightstrike <nightstrike at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |nightstrike at gmail dot
| |com
--- Comment #10 from nightstrike <nightstrike at gmail dot com> 2011-03-16 17:44:06 UTC ---
Is this using mingw.org based GCC or mingw-w64 based GCC?
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug libgomp/42616] OMP'ed loop inside pthread leads to crash.
[not found] <bug-42616-4@http.gcc.gnu.org/bugzilla/>
` (2 preceding siblings ...)
2011-03-16 17:45 ` nightstrike at gmail dot com
@ 2011-05-04 18:00 ` gcc.20.cwilson at spamgourmet dot com
2011-07-10 10:04 ` xunxun1982 at gmail dot com
` (6 subsequent siblings)
10 siblings, 0 replies; 18+ messages in thread
From: gcc.20.cwilson at spamgourmet dot com @ 2011-05-04 18:00 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42616
Charles Wilson <gcc.20.cwilson at spamgourmet dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |gcc.20.cwilson at
| |spamgourmet dot com
--- Comment #11 from Charles Wilson <gcc.20.cwilson at spamgourmet dot com> 2011-05-04 17:48:14 UTC ---
FWIW, using mingw.org's gcc-4.5.2 release, the test passes:
$ g++ -fopenmp omp_test.c -o omp_test -lpthread
$ ./omp_test.exe
OMP : All looks good
Relevant installation data:
gcc-core-4.5.2-1-mingw32-bin
gcc-c++-4.5.2-1-mingw32-bin
libgcc-4.5.2-1-mingw32-dll-1
libstdc++-4.5.2-1-mingw32-dll-6
libgomp-4.5.2-1-mingw32-dll-1
mingwrt-3.18-mingw32-dll
mingwrt-3.18-mingw32-dev
w32api-3.17-2-mingw32-dev
pthreads-w32-2.8.0-3-mingw32-dev
libpthread-2.8.0-3-mingw32-dll-2
I believe this is because TLS support was added to the mingw(32) runtime in
late Jan 2010, thanks to Kai's work:
http://thread.gmane.org/gmane.comp.gnu.mingw.devel/3550
(Although a full compiler suite, and mingw runtime, with TLS support was not
officially released until March 2010)
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug libgomp/42616] OMP'ed loop inside pthread leads to crash.
[not found] <bug-42616-4@http.gcc.gnu.org/bugzilla/>
` (3 preceding siblings ...)
2011-05-04 18:00 ` gcc.20.cwilson at spamgourmet dot com
@ 2011-07-10 10:04 ` xunxun1982 at gmail dot com
2014-07-17 11:27 ` varvara.s.rainchik at gmail dot com
` (5 subsequent siblings)
10 siblings, 0 replies; 18+ messages in thread
From: xunxun1982 at gmail dot com @ 2011-07-10 10:04 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42616
PcX <xunxun1982 at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |xunxun1982 at gmail dot com
--- Comment #12 from PcX <xunxun1982 at gmail dot com> 2011-07-10 10:03:48 UTC ---
(In reply to comment #11)
> FWIW, using mingw.org's gcc-4.5.2 release, the test passes:
>
> $ g++ -fopenmp omp_test.c -o omp_test -lpthread
> $ ./omp_test.exe
> OMP : All looks good
>
> Relevant installation data:
> gcc-core-4.5.2-1-mingw32-bin
> gcc-c++-4.5.2-1-mingw32-bin
> libgcc-4.5.2-1-mingw32-dll-1
> libstdc++-4.5.2-1-mingw32-dll-6
> libgomp-4.5.2-1-mingw32-dll-1
> mingwrt-3.18-mingw32-dll
> mingwrt-3.18-mingw32-dev
> w32api-3.17-2-mingw32-dev
> pthreads-w32-2.8.0-3-mingw32-dev
> libpthread-2.8.0-3-mingw32-dll-2
>
> I believe this is because TLS support was added to the mingw(32) runtime in
> late Jan 2010, thanks to Kai's work:
> http://thread.gmane.org/gmane.comp.gnu.mingw.devel/3550
>
> (Although a full compiler suite, and mingw runtime, with TLS support was not
> officially released until March 2010)
I don't thinks so.
Because mingw64 crt also contains TLS support written by Kai, but mingw64 crt
also use the code to crash.
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug libgomp/42616] OMP'ed loop inside pthread leads to crash.
[not found] <bug-42616-4@http.gcc.gnu.org/bugzilla/>
` (4 preceding siblings ...)
2011-07-10 10:04 ` xunxun1982 at gmail dot com
@ 2014-07-17 11:27 ` varvara.s.rainchik at gmail dot com
2014-07-17 11:29 ` varvara.s.rainchik at gmail dot com
` (4 subsequent siblings)
10 siblings, 0 replies; 18+ messages in thread
From: varvara.s.rainchik at gmail dot com @ 2014-07-17 11:27 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=42616
Varvara Rainchik <varvara.s.rainchik at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |varvara.s.rainchik at gmail dot co
| |m
--- Comment #13 from Varvara Rainchik <varvara.s.rainchik at gmail dot com> ---
I experience the same problem with Android NDK. TLS is not supported into
Android, so I observe the similar test crash:
[New LWP 18636]
Program received signal SIGSEGV, Segmentation fault.
[Switching to LWP 18636]
(gdb) bt
#0 gomp_icv (write=<optimized out>) at
/s/ndk-toolchain/src/build/../gcc/gcc-4.8/libgomp/libgomp.h:393
#1 0x0804a3d7 in omp_set_num_threads (n=4) at
/s/ndk-toolchain/src/build/../gcc/gcc-4.8/libgomp/env.c:657
#2 0x08049e70 in _thread (Id=0x1) at omp_test.c:19
#3 0x0804d119 in __pthread_start (arg=0x8087270) at
bionic/libc/bionic/pthread_create.cpp:153
#4 0x08055e1a in __start_thread (fn=0x804d0e0 <__pthread_start(void*)>,
arg=0x8087270) at bionic/libc/bionic/clone.cpp:39
#5 0x0806b9b7 in __bionic_clone () at
bionic/libc/arch-x86/bionic/__bionic_clone.S:42
I use android-ndk-r9d for x86 arch, gcc 4.8. Modified patch solves this issue.
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug libgomp/42616] OMP'ed loop inside pthread leads to crash.
[not found] <bug-42616-4@http.gcc.gnu.org/bugzilla/>
` (5 preceding siblings ...)
2014-07-17 11:27 ` varvara.s.rainchik at gmail dot com
@ 2014-07-17 11:29 ` varvara.s.rainchik at gmail dot com
2014-07-17 11:35 ` varvara.s.rainchik at gmail dot com
` (3 subsequent siblings)
10 siblings, 0 replies; 18+ messages in thread
From: varvara.s.rainchik at gmail dot com @ 2014-07-17 11:29 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=42616
--- Comment #14 from Varvara Rainchik <varvara.s.rainchik at gmail dot com> ---
Created attachment 33130
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=33130&action=edit
Modified patch
I will send this patch to gcc patches.
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug libgomp/42616] OMP'ed loop inside pthread leads to crash.
[not found] <bug-42616-4@http.gcc.gnu.org/bugzilla/>
` (6 preceding siblings ...)
2014-07-17 11:29 ` varvara.s.rainchik at gmail dot com
@ 2014-07-17 11:35 ` varvara.s.rainchik at gmail dot com
2014-11-28 6:41 ` java4ada at yahoo dot com
` (2 subsequent siblings)
10 siblings, 0 replies; 18+ messages in thread
From: varvara.s.rainchik at gmail dot com @ 2014-07-17 11:35 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=42616
--- Comment #15 from Varvara Rainchik <varvara.s.rainchik at gmail dot com> ---
Created attachment 33131
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=33131&action=edit
Correct patch
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug libgomp/42616] OMP'ed loop inside pthread leads to crash.
[not found] <bug-42616-4@http.gcc.gnu.org/bugzilla/>
` (7 preceding siblings ...)
2014-07-17 11:35 ` varvara.s.rainchik at gmail dot com
@ 2014-11-28 6:41 ` java4ada at yahoo dot com
2014-12-24 8:49 ` java4ada at yahoo dot com
2021-12-29 7:10 ` pinskia at gcc dot gnu.org
10 siblings, 0 replies; 18+ messages in thread
From: java4ada at yahoo dot com @ 2014-11-28 6:41 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=42616
java4ada at yahoo dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |java4ada at yahoo dot com
--- Comment #16 from java4ada at yahoo dot com ---
Question: There are ~98 calls to gomp_thread() which allocates struct
gomp_thread when HAVE_TLS isn't defined, but only gomp_free_thread() frees this
instance. Possible memory leak?
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug libgomp/42616] OMP'ed loop inside pthread leads to crash.
[not found] <bug-42616-4@http.gcc.gnu.org/bugzilla/>
` (8 preceding siblings ...)
2014-11-28 6:41 ` java4ada at yahoo dot com
@ 2014-12-24 8:49 ` java4ada at yahoo dot com
2021-12-29 7:10 ` pinskia at gcc dot gnu.org
10 siblings, 0 replies; 18+ messages in thread
From: java4ada at yahoo dot com @ 2014-12-24 8:49 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=42616
--- Comment #17 from java4ada at yahoo dot com ---
Is this fixed by https://gcc.gnu.org/viewcvs/gcc?view=revision&revision=218576
?
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug libgomp/42616] OMP'ed loop inside pthread leads to crash.
[not found] <bug-42616-4@http.gcc.gnu.org/bugzilla/>
` (9 preceding siblings ...)
2014-12-24 8:49 ` java4ada at yahoo dot com
@ 2021-12-29 7:10 ` pinskia at gcc dot gnu.org
10 siblings, 0 replies; 18+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-12-29 7:10 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=42616
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Severity|blocker |normal
^ permalink raw reply [flat|nested] 18+ messages in thread