From: Alastair Bridgewater Date: Sat, 7 Aug 2010 15:23:10 +0000 (+0000) Subject: 1.0.41.28: ppc: Fix race conditions in use of pseudo-atomic in ppc-assem.S. X-Git-Url: http://repo.macrolet.net/gitweb/?a=commitdiff_plain;h=204cfb6439544007d8a39e8e4127facbe6b0a899;p=sbcl.git 1.0.41.28: ppc: Fix race conditions in use of pseudo-atomic in ppc-assem.S. * Originally, ppc-assem.S was saving the pseudo-atomic-interrupted bit before clearing the pseduo-atomc-atomic bit in reg_ALLOC. This introduces a single-instruction window wherein an interrupt could occur, be deferred, and the setting of pseudo-atomic-interrupted be ignored. * Fixed, in the four places it occurs, by reordering instructions. --- diff --git a/src/runtime/ppc-assem.S b/src/runtime/ppc-assem.S index 318d576..ec19ad5 100644 --- a/src/runtime/ppc-assem.S +++ b/src/runtime/ppc-assem.S @@ -321,8 +321,8 @@ x: load(reg_OCFP,CSYMBOL(current_control_frame_pointer)) /* No longer atomic, and check for interrupt */ - andi. reg_NL3, reg_ALLOC, 1 subi reg_ALLOC,reg_ALLOC,4 + andi. reg_NL3, reg_ALLOC, 1 twnei reg_NL3, 0 /* Pass in the arguments */ @@ -380,8 +380,8 @@ lra: store(reg_NL1,reg_NL2,CSYMBOL(foreign_function_call_active)) /* Check for interrupt */ - andi. reg_NL3, reg_ALLOC, 1 subi reg_ALLOC, reg_ALLOC, 4 + andi. reg_NL3, reg_ALLOC, 1 twnei reg_NL3,0 /* Back to C */ @@ -432,8 +432,8 @@ lra: store(reg_CSP,reg_CFUNC,CSYMBOL(foreign_function_call_active)) /* load(reg_POLL,saver2) */ /* Disable pseudo-atomic; check pending interrupt */ - andi. reg_NL3, reg_ALLOC, 1 subi reg_ALLOC, reg_ALLOC, 4 + andi. reg_NL3, reg_ALLOC, 1 twnei reg_NL3, 0 mr reg_NL3,reg_NARGS @@ -499,8 +499,8 @@ lra: la reg_LIP,-OTHER_POINTER_LOWTAG(reg_LIP) /* No longer atomic */ - andi. reg_NL3, reg_ALLOC, 1 subi reg_ALLOC, reg_ALLOC, 4 + andi. reg_NL3, reg_ALLOC, 1 twnei reg_NL3, 0 mtlr reg_LIP diff --git a/version.lisp-expr b/version.lisp-expr index 7c0e02e..7860e46 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.41.27" +"1.0.41.28"