This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug nptl/5780] OpenMP program linked with static libraries gets a runtime memory fault
- From: "hjl.tools at gmail dot com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sources dot redhat dot com
- Date: Thu, 06 Sep 2012 23:25:45 +0000
- Subject: [Bug nptl/5780] OpenMP program linked with static libraries gets a runtime memory fault
- Auto-submitted: auto-generated
- References: <bug-5780-131@http.sourceware.org/bugzilla/>
http://sourceware.org/bugzilla/show_bug.cgi?id=5780
H.J. Lu <hjl.tools at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |REOPENED
Resolution|DUPLICATE |
--- Comment #2 from H.J. Lu <hjl.tools at gmail dot com> 2012-09-06 23:25:45 UTC ---
The issue is GCC uses
1. Mark pthread_foo as weak.
2. Use a weak pthread_xxxx to check if thread is active.
3. It does
if (pthread_xxxx)
pthread_foo ();
With libpthread.a, there is no guarantee that linking in
archive member for pthread_xxxx will also include archive
member for pthread_foo. When it happens, static executable
crashes when calling pthread_foo. We can add
if (pthread_foo)
pthread_foo ();
But it may lead to bad static executable hehavior. The
list of pthread_foo is
pthread_attr_init
pthread_attr_setdetachstate
pthread_cond_broadcast
pthread_cond_destroy
pthread_cond_init
pthread_cond_signal
pthread_cond_wait
pthread_create
pthread_detach
pthread_exit
pthread_getschedparam
pthread_getspecific
pthread_join
pthread_key_create
pthread_key_delete
pthread_mutex_destroy
pthread_mutex_init
pthread_mutex_lock
pthread_mutex_trylock
pthread_mutex_unlock
pthread_once
pthread_self
pthread_setschedparam
pthread_setspecific
pthread_sigmask
__pthread_key_create
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.