Bug 36242 - OpenMP multi-threading crashes
Summary: OpenMP multi-threading crashes
Status: RESOLVED INVALID
Alias: None
Product: gcc
Classification: Unclassified
Component: c++ (show other bugs)
Version: 4.2.1
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-05-15 08:11 UTC by Stefan Eilemann
Modified: 2009-04-08 10:46 UTC (History)
3 users (show)

See Also:
Host: Mac OS X 10.5.2, Intel Core 2 Duo 2.16GHZ, MacBook Pro
Target: Mac OS X 10.5.2, Intel Core 2 Duo 2.16GHZ, MacBook Pro
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments
the preprocessed file (*.i*) that triggers the bug, (2.87 KB, application/octet-stream)
2008-05-15 08:12 UTC, Stefan Eilemann
Details
Standalone test case - compile line within (562 bytes, text/plain)
2008-05-15 08:13 UTC, Stefan Eilemann
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Stefan Eilemann 2008-05-15 08:11:52 UTC
OpenMP crashes in gomp_resolve_num_threads when used concurrently from multiple threads.

% g++-4.2 -v
Using built-in specs.
Target: i686-apple-darwin9
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)
Comment 1 Stefan Eilemann 2008-05-15 08:12:55 UTC
Created attachment 15641 [details]
the preprocessed file (*.i*) that triggers the bug,
Comment 2 Stefan Eilemann 2008-05-15 08:13:44 UTC
Created attachment 15642 [details]
Standalone test case - compile line within
Comment 3 Steven Bosscher 2008-06-11 20:19:17 UTC
Jakub is the OpenMP guru.
Comment 4 Jakub Jelinek 2008-06-11 20:29:19 UTC
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.
Comment 5 Jascha Wetzel 2009-04-08 10:46:22 UTC
(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.