This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libgomp/28468] OpenMP-parallelized program crashes when OMP_NUM_THREADS > 1
- From: "bruno at clisp dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 15 Nov 2006 13:38:55 -0000
- Subject: [Bug libgomp/28468] OpenMP-parallelized program crashes when OMP_NUM_THREADS > 1
- References: <bug-28468-128@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #3 from bruno at clisp dot org 2006-11-15 13:38 -------
> Was LinuxThreads built at least --with-tls support or without?
The glibc was built with LinuxThreads without TLS. (I gave --without-tls
explicitly to the glibc build.)
> If without and libgomp has been built without --disable-tls and your
> assembler/linker support TLS, libgomp might be using __thread eventhough
> glibc doesn't support that.
Yes, this is exactly the problem; see the analysis and patch in
http://gcc.gnu.org/ml/gcc/2006-11/msg00244.html
> There have been some patches added recently to improve gcc configure checks
> for the runtime support of TLS.
The only patch that has been committed is this one from Daniel Jacobowitz
http://gcc.gnu.org/viewcvs/trunk/config/tls.m4?r1=117049&r2=118777
It has no effect on this bug, since it applies only to the cross-compiling
case.
For the native compile, I posted a patch that is known to fix this bug:
http://gcc.gnu.org/ml/gcc/2006-11/msg00244.html
It has been approved by Richard Henderson:
http://gcc.gnu.org/ml/gcc/2006-11/msg00255.html
But noone has committed it to the GCC SVN.
Could someone please commit this patch on the HEAD and possibly on the 4.2
branch? (It is not a regression, if you argue that libgomp and -fopenmp is a
new feature. But it is a regression if you argue that there are packages out
there, such as GNU gettext 0.16, which use -fopenmp if available, and this
bug turns a program that would run unparallelized but correctly with gcc-4.1
into a program that runs parallelized but crashes with gcc-4.2.)
--
bruno at clisp dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jakub at gcc dot gnu dot org
Status|WAITING |UNCONFIRMED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28468