This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/51906] thread lock test failures on darwin11 under Xcode 4.2
- From: "gparker at apple dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 31 Jan 2012 22:19:56 +0000
- Subject: [Bug libstdc++/51906] thread lock test failures on darwin11 under Xcode 4.2
- Auto-submitted: auto-generated
- References: <bug-51906-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51906
Greg Parker <gparker at apple dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |gparker at apple dot com
--- Comment #34 from Greg Parker <gparker at apple dot com> 2012-01-31 22:19:56 UTC ---
There's an OS X bug here. The problem is that pthread_mutex_trylock() does not
recognize PTHREAD_RECURSIVE_MUTEX_INITIALIZER. If you use that static
initializer and the first operation on the mutex is pthread_mutex_trylock()
then it will fail with EINVAL.
A recursive mutex using pthread_mutex_init() works. A recursive mutex for which
the first operation is pthread_mutex_lock() also works.
I filed rdar://10784745 in Apple's bug reporter.