Date: Fri, 17 Mar 2000 14:16:17 +0000 From: mirko.viviani@rccr.cremona.it To: FreeBSD-gnats-submit@freebsd.org Subject: gnu/17433: libobjc locks mutex before deallocating it Message-ID: <200003171316.OAA05556@rccr1.rccr.cremona.it>
next in thread | raw e-mail | index | archive | help
>Number: 17433 >Category: gnu >Synopsis: libobjc locks mutex before deallocating it >Confidential: no >Severity: serious >Priority: high >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Fri Mar 17 05:20:00 PST 2000 >Closed-Date: >Last-Modified: >Originator: Mirko Viviani >Release: FreeBSD 3.4-STABLE i386 >Organization: >Environment: >Description: In the 4.0-RELEASE (and lower) libobjc there is a but in the posix thread implementation. It locks the mutex before deallocating it. Anyway in 4.0 is libobjc compiled with thr-posix.c ? I haven't tested 4.0 yet, but I hope yes. >How-To-Repeat: Run any of the GNUstep application that uses threads linked with libobjc compiled with thr-posix support. >Fix: src/contrib/gcc/objc/thr.c - objc_mutex_deallocate() should be changed to: int objc_mutex_deallocate(objc_mutex_t mutex) { int depth; /* Valid mutex? */ if (!mutex) return -1; #if 0 /* Acquire lock on mutex */ depth = objc_mutex_lock(mutex); #endif depth = 1; /* Call backend to destroy mutex */ if (__objc_mutex_deallocate(mutex)) return -1; /* Free the mutex structure */ objc_free(mutex); /* Return last depth */ return depth; } >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200003171316.OAA05556>