1.0.17.27: delete aborted fasls in _all_ cases
authorNikodemus Siivola <nikodemus@random-state.net>
Thu, 5 Jun 2008 08:47:39 +0000 (08:47 +0000)
committerNikodemus Siivola <nikodemus@random-state.net>
Thu, 5 Jun 2008 08:47:39 +0000 (08:47 +0000)
 * Unwinding from the compiler with a non-compiler error used to
   leave the fasl lying around.

 * Reported by Attila Lendvai.

NEWS
src/compiler/dump.lisp
src/compiler/main.lisp
version.lisp-expr

diff --git a/NEWS b/NEWS
index ecd853e..9f9e052 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -21,6 +21,8 @@ changes in sbcl-1.0.18 relative to 1.0.17:
     are never referenced through SYMBOL-VALUE at runtime.
   * bug fix: EAI_NODATA is deprecated since RFC 3493. Stop using it
     in sb-bsd-sockets.
+  * bug fix: if COMPILE-FILE aborts due to an unwind, the partial
+    fasl is now deleted. (reported by Attila Lendvai)
   * fixed some bugs revealed by Paul Dietz' test suite:
     ** NIL is a valid function name (regression at 1.0.13.38)
     ** FILL on lists was missing its return value (regression at 1.0.12.27)
index c6c5eb1..1b51237 100644 (file)
 (defun close-fasl-output (fasl-output abort-p)
   (declare (type fasl-output fasl-output))
 
-  ;; sanity checks
-  (aver (zerop (hash-table-count (fasl-output-patch-table fasl-output))))
-
-  ;; End the group.
-  (dump-fop 'fop-verify-empty-stack fasl-output)
-  (dump-fop 'fop-verify-table-size fasl-output)
-  (dump-word (fasl-output-table-free fasl-output)
-                    fasl-output)
-  (dump-fop 'fop-end-group fasl-output)
+  (unless abort-p
+    ;; sanity checks
+    (aver (zerop (hash-table-count (fasl-output-patch-table fasl-output))))
+    ;; End the group.
+    (dump-fop 'fop-verify-empty-stack fasl-output)
+    (dump-fop 'fop-verify-table-size fasl-output)
+    (dump-word (fasl-output-table-free fasl-output)
+               fasl-output)
+    (dump-fop 'fop-end-group fasl-output))
 
   ;; That's all, folks.
   (close (fasl-output-stream fasl-output) :abort abort-p)
index 9bdf959..576b188 100644 (file)
@@ -1666,7 +1666,7 @@ SPEED and COMPILATION-SPEED optimization values, and the
 |#
   (let* ((fasl-output nil)
          (output-file-name nil)
-         (abort-p nil)
+         (abort-p t)
          (warnings-p nil)
          (failure-p t) ; T in case error keeps this from being set later
          (input-pathname (verify-source-file input-file))
index 82ec7ef..5affd46 100644 (file)
@@ -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.17.26"
+"1.0.17.27"