Date: Mon, 1 Dec 2008 22:39:49 +0100 From: Wilko Bulte <wb@freebie.xs4all.nl> To: Marcel Moolenaar <marcel@FreeBSD.org> Cc: svn-src-stable@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, svn-src-stable-7@FreeBSD.org Subject: Re: svn commit: r185526 - in stable/7/sys: . ia64/include Message-ID: <20081201213948.GI15094@freebie.xs4all.nl> In-Reply-To: <200812011740.mB1Hev1f032334@svn.freebsd.org> References: <200812011740.mB1Hev1f032334@svn.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Quoting Marcel Moolenaar, who wrote on Mon, Dec 01, 2008 at 05:40:57PM +0000 .. > Author: marcel > Date: Mon Dec 1 17:40:57 2008 > New Revision: 185526 > URL: http://svn.freebsd.org/changeset/base/185526 > > Log: > MFC rev 179382: > Work-around a compiler optimization bug, that broke libthr. Massive > inlining resulted in constant propagation to the extend that cmpval > was known to the compiler to be URWLOCK_WRITE_OWNER (= 0x80000000U). > Unfortunately, instead of zero-extending the unsigned constant, it > was sign-extended. As such, the cmpxchg instruction was comparing > 0x0000000080000000LU to 0xffffffff80000000LU and obviously didn't > perform the exchange. > But, since the value returned by cmpxhg equalled cmpval (when zero- > extended), the _thr_rtld_lock_release() function thought the exchange > did happen and as such returned as if having released the lock. This > was not the case. Subsequent locking requests found rw_state non-zero > and the thread in question entered the kernel and block indefinitely. > *WOW*... Wilko
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20081201213948.GI15094>