public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libgomp/45240]  New: parallel.c: GOMP_parallel_end locks a mutex but fails to unlock it after atomic operation complete
@ 2010-08-09 17:40 shreyasp at ti dot com
  0 siblings, 0 replies; only message in thread
From: shreyasp at ti dot com @ 2010-08-09 17:40 UTC (permalink / raw)
  To: gcc-bugs

In parallel.c, if HAVE_SYNC_BUILTINS is #undef'ed, then GOMP_parallel_end uses
a mutex to atomically modify the team->nthreads field.  The mutex that is used
to atomically write to nthreads is locked but never unlocked.

parallel.c, GOMP_parallel_end:

#ifdef HAVE_SYNC_BUILTINS
          __sync_fetch_and_add (&gomp_remaining_threads_count,
                                1UL - team->nthreads);
#else
          gomp_mutex_lock (&gomp_remaining_threads_lock);
          gomp_remaining_threads_count -= team->nthreads - 1;
#endif


-- 
           Summary: parallel.c: GOMP_parallel_end locks a mutex but fails to
                    unlock it after atomic operation complete
           Product: gcc
           Version: 4.5.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libgomp
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: shreyasp at ti dot com


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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2010-08-09 17:40 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-08-09 17:40 [Bug libgomp/45240] New: parallel.c: GOMP_parallel_end locks a mutex but fails to unlock it after atomic operation complete shreyasp at ti dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).