From 0bbac7c6956215dec1d25ec1dab50a8f2f3643ce Mon Sep 17 00:00:00 2001 From: "Tobias C. Rittweiler" Date: Sun, 28 Mar 2010 20:08:38 +0000 Subject: [PATCH] 1.0.37.13: Make SIGNAL-SEMAPHORE interruptable. Although a SEMAPHORE's mutex is private to that SEMAPHORE, and the mutex is released during the wait in WAIT-ON-SEMAPHORE, it's still possible to starve in SIGNAL-SEMAPHORE while waiting to acquire the mutex because a deadline handler around WAIT-ON-SEMAPHORE could be running in the implicitly called CONDITION-WAIT which reacquires the mutex. Hence make sure that the call to GET-MUTEX in SIGNAL-SEMAPHORE is interruptable. --- NEWS | 1 + src/code/target-thread.lisp | 2 +- version.lisp-expr | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/NEWS b/NEWS index 9873b69..ebd870c 100644 --- a/NEWS +++ b/NEWS @@ -15,6 +15,7 @@ changes relative to sbcl-1.0.36: * bug fix: a rare case of startup-time page table corruption. * bug fix: a semaphore with multiple waiters and some of them unwinding due to timeouts could be left in an inconsistent state. + * bug fix: fix typo in "Reporting Bugs" section of the manual (lp#520366) changes in sbcl-1.0.37 relative to sbcl-1.0.36: * enhancement: Backtrace from THROW to uncaught tag on x86oids now shows diff --git a/src/code/target-thread.lisp b/src/code/target-thread.lisp index 48417e7..51e4c42 100644 --- a/src/code/target-thread.lisp +++ b/src/code/target-thread.lisp @@ -706,7 +706,7 @@ on this semaphore, then N of them is woken up." (declare (type (integer 1) n)) ;; Need to disable interrupts so that we don't lose a wakeup after ;; we have incremented the count. - (with-system-mutex ((semaphore-mutex semaphore)) + (with-system-mutex ((semaphore-mutex semaphore) :allow-with-interrupts t) (let ((waitcount (semaphore-waitcount semaphore)) (count (incf (semaphore-%count semaphore) n))) (when (plusp waitcount) diff --git a/version.lisp-expr b/version.lisp-expr index 62fe67e..12c3089 100644 --- a/version.lisp-expr +++ b/version.lisp-expr @@ -17,4 +17,4 @@ ;;; checkins which aren't released. (And occasionally for internal ;;; versions, especially for internal versions off the main CVS ;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".) -"1.0.37.12" +"1.0.37.13" -- 1.7.10.4