threads/69020: pthreads library leaks _gc_mutex

Joe Mistachkin joe at
Tue Jul 13 16:10:25 PDT 2004

>Number:         69020
>Category:       threads
>Synopsis:       pthreads library leaks _gc_mutex
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-threads
>State:          open
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Jul 13 23:10:18 GMT 2004
>Originator:     Joe Mistachkin
>Release:        4.10-STABLE
The file "/usr/src/lib/libc_r/uthread/uthread_init.c" initializes a mutex named "_gc_mutex".  This mutex is never freed via pthread_mutex_destroy (at least not anywhere I have found).  I believe this is a bug.  Since this mutex is process wide, I believe it could be freed relatively easily using an atexit handler or similar mechanism.



More information about the freebsd-threads mailing list