Update of /cvsroot/sbcl/sbcl
In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv15547
188.8.131.52: fix with-pinned-objects stack corruption potential
* In the old WITH-PINNED-OBJECTS implementation we pushed pointers
onto stack explicitly (without telling the compiler), executed
the body, and _prior_to_returning_values_of_body_ popped the pointers.
If the values from the body were in progress of being returned via
unknown-values convention we would (try to) pop the pointers while
the last callee stack frame (where the values to be returned are)
is still on the stack. In many cases this was harmless, as the correct
SP was restored soon enough, but there were bad interactions as well.
* Solution: instead of explicitly pushing pointers, use a LET to
add binding to the current stack frame for the objects, and further
use a magic TOUCH-OBJECT function implemented with an empty VOP
to trick the compiler into keeping the variables live till the end
of the body.
Probably not perfect, but seems to do the job. Of the added test-case,
the MULTIPLE variants used to fail prior to this.
RCS file: /cvsroot/sbcl/sbcl/NEWS,v
retrieving revision 1.1261
retrieving revision 1.1262
diff -u -d -r1.1261 -r1.1262
--- NEWS 7 Nov 2007 06:34:26 -0000 1.1261
+++ NEWS 9 Nov 2007 17:38:14 -0000 1.1262
@@ -1,5 +1,9 @@
;;;; -*- coding: utf-8; -*-
changes in sbcl-1.0.12 relative to sbcl-1.0.11:
+ * bug fix: SB-SYS:WITH-PINNED-OBJECTS could cause garbage values to
+ be returned from its body when the values were being returned
+ using unknown-values return convection and the W-P-O was wrapped
+ inside an UNWIND-PROTECT.
* bug fix: sb-posix should now compile again under Windows, enabling
slime to work again.
RCS file: /cvsroot/sbcl/sbcl/version.lisp-expr,v
retrieving revision 1.3714
retrieving revision 1.3715
diff -u -d -r1.3714 -r1.3715
--- version.lisp-expr 9 Nov 2007 14:57:01 -0000 1.3714
+++ version.lisp-expr 9 Nov 2007 17:38:14 -0000 1.3715
@@ -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".)