X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcode%2Ffloat-trap.lisp;h=4bf0429e50f2a7a71ead1d57c7c4c7b75c4d3951;hb=7f1e94ae961a198e00daf281eb1dc858e5b2dcc7;hp=6a021397486de60ffb3a4a0a448425dcaea5f22d;hpb=182a7b8391d0abea3f08e06c263b1db25edbf526;p=sbcl.git diff --git a/src/code/float-trap.lisp b/src/code/float-trap.lisp index 6a02139..4bf0429 100644 --- a/src/code/float-trap.lisp +++ b/src/code/float-trap.lisp @@ -195,8 +195,12 @@ sets the floating point modes to their current values (and thus is a no-op)." (declare (type system-area-pointer info)) (let ((code (sb!unix::siginfo-code info))) (with-interrupts - (error (or (cdr (assoc code *sigfpe-code-error-alist*)) - 'floating-point-exception))))) + ;; Reset the accumulated exceptions, may be needed on other + ;; platforms too, at least Linux doesn't seem to require it. + #!+sunos + (setf (ldb sb!vm::float-sticky-bits (floating-point-modes)) 0) + (error (or (cdr (assoc code *sigfpe-code-error-alist*)) + 'floating-point-exception))))) ;;; Execute BODY with the floating point exceptions listed in TRAPS ;;; masked (disabled). TRAPS should be a list of possible exceptions