OpenMP crashes in gomp_resolve_num_threads when used concurrently from multiple threads.
% g++-4.2 -v
Using built-in specs.
Configured with: /var/tmp/gcc_42/gcc_42-5553~4/src/configure --disable-checking -enable-werror --prefix=/usr --mandir=/usr/share/man --enable-languages=c,objc,c++,obj-c++ --program-transform-name=/^[cg][^.-]*$/s/$/-4.2/ --with-gxx-include-dir=/usr/include/c++/4.0.0 --with-slibdir=/usr/lib --build=powerpc-apple-darwin9 --program-prefix= --host=i686-apple-darwin9 --target=i686-apple-darwin9
Thread model: posix
gcc version 4.2.1 (Apple Inc. build 5553)
Created attachment 15641 [details]
the preprocessed file (*.i*) that triggers the bug,
Created attachment 15642 [details]
Standalone test case - compile line within
Jakub is the OpenMP guru.
Using OpenMP pragmas in multiple pthread_create created threads concurrently isn't supported in 4.2/4.3.
There is a support for it on the trunk since a few days ago though.
(In reply to comment #4)
> Using OpenMP pragmas in multiple pthread_create created threads concurrently
It also crashes when using omp pragmas from a single pthread if it is not the main thread.