This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libstdc++/36801] config/cpu/generic/atomicity_mutex/atomicity.h incorrectly relies on global constructor ordering



------- Comment #1 from jifl-bugzilla at jifvik dot org  2008-07-11 13:03 -------
On thinking about this a bit more, I think this would be a regression for the
case where __GTHREAD_MUTEX_INIT is used. In the case of
__GTHREAD_MUTEX_INIT_FUNCTION, I believe the previous implementation was also
susceptible to this issue, although in practice, I don't recall ever seeing it
- maybe just luck of link order.

So the __GTHREAD_MUTEX_INIT case can probably be addressed by bringing the
implementation back to the way it was before. I haven't so far thought of a way
to address the __GTHREAD_MUTEX_INIT_FUNCTION case other than the use of
__gthread_once().

I would be tempted to provide a patch, but I don't have a copyright assignment
for GCC (and of course it takes weeks to sort that out).


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36801


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]