0.9.3.60:
authorJuho Snellman <jsnell@iki.fi>
Tue, 16 Aug 2005 17:09:49 +0000 (17:09 +0000)
committerJuho Snellman <jsnell@iki.fi>
Tue, 16 Aug 2005 17:09:49 +0000 (17:09 +0000)
* Bump +FASL-FILE-VERSION+.
* Add a couple of useful restarts for ENSURE-DIRECTORIES-EXIST.
          (patch from sbcl-devel "Proposed patch to ensure-directories-exist"
          2005-06-06 by Alan Shields)
        * Fix empty hash slot marker on 64-bit systems.
          (patch from sbcl-devel "Bug in hash tables on 64-bit systems and fix"
          2005-08-11 by Lutz Euler)
        * Clear the signal mask in the child process after run-program
          has forked. (patch from sbcl-devel "Blocked signals and run-program"
          2005-08-14 by Benedikt Schmidt).

src/code/early-fasl.lisp
src/code/filesys.lisp
src/code/hash-table.lisp
src/code/target-hash-table.lisp
src/compiler/generic/genesis.lisp
src/runtime/gencgc.c
src/runtime/run-program.c
tests/hash.pure.lisp [new file with mode: 0644]
version.lisp-expr

index a5aff3d..6d40380 100644 (file)
@@ -76,7 +76,7 @@
 ;;; versions which break binary compatibility. But it certainly should
 ;;; be incremented for release versions which break binary
 ;;; compatibility.
-(def!constant +fasl-file-version+ 57)
+(def!constant +fasl-file-version+ 58)
 ;;; (record of versions before 2003 deleted in 2003-04-26/0.pre8.107 or so)
 ;;; 38: (2003-01-05) changed names of internal SORT machinery
 ;;; 39: (2003-02-20) in 0.7.12.1 a slot was added to
 ;;; 56: (2005-05-22) Something between 0.9.0.1 and 0.9.0.14. My money is
 ;;;     on 0.9.0.6 (MORE CASE CONSISTENCY).
 ;;; 57: (2005-06-12) Raw slot rearrangement in 0.9.1.38
+;;; 58: (2005-08-16) Multiple incompatible changes between 0.9.3 and 0.9.3.60
 
 ;;; the conventional file extension for our fasl files
 (declaim (type simple-string *fasl-file-type*))
index f00eace..f916cce 100644 (file)
                                namestring))
                      (sb!unix:unix-mkdir namestring mode)
                      (unless (probe-file namestring)
-                       (error 'simple-file-error
-                              :pathname pathspec
-                              :format-control "can't create directory ~A"
-                              :format-arguments (list namestring)))
+                       (restart-case (error 'simple-file-error
+                                            :pathname pathspec
+                                            :format-control "can't create directory ~A"
+                                            :format-arguments (list namestring))
+                         (retry ()
+                           :report "Retry directory creation."
+                           (ensure-directories-exist pathspec :verbose verbose :mode mode))
+                         (continue ()
+                           :report "Continue as if directory creation was successful."
+                           nil)))
                      (setf created-p t)))))
       (values pathname created-p))))
 
index d8f5e13..b17a17a 100644 (file)
   ;; This table parallels the KV table, and can be used to store the
   ;; hash associated with the key, saving recalculation. Could be
   ;; useful for EQL, and EQUAL hash tables. This table is not needed
-  ;; for EQ hash tables, and when present the value of #x80000000
-  ;; represents EQ-based hashing on the respective key.
+  ;; for EQ hash tables, and when present the value of
+  ;; +MAGIC-HASH-VECTOR-VALUE+ represents EQ-based hashing on the
+  ;; respective key.
   (hash-vector nil :type (or null (simple-array (unsigned-byte
                                                  #.sb!vm:n-word-bits) (*)))))
+
+;; as explained by pmai on openprojects #lisp IRC 2002-07-30: #x80000000
+;; is bigger than any possible nonEQ hash value, and thus indicates an
+;; empty slot; and EQ hash tables don't use HASH-TABLE-HASH-VECTOR.
+;; The previous sentence was written when SBCL was 32-bit only. The value
+;; now depends on the word size. It is propagated to C in genesis because
+;; the generational garbage collector needs to know it.
+(defconstant +magic-hash-vector-value+ (ash 1 (1- sb!vm:n-word-bits)))
+
 \f
 (defmacro-mundanely with-hash-table-iterator ((function hash-table) &body body)
   #!+sb-doc
index 67ef677..138d39e 100644 (file)
 
 (defconstant +min-hash-table-size+ 16)
 (defconstant +min-hash-table-rehash-threshold+ (float 1/16 1.0))
-;; as explained by pmai on openprojects #lisp IRC 2002-07-30: #x80000000
-;; is bigger than any possible nonEQ hash value, and thus indicates an
-;; empty slot; and EQ hash tables don't use HASH-TABLE-HASH-VECTOR
-(defconstant +magic-hash-vector-value+ #x80000000)
 
 (defun make-hash-table (&key (test 'eql)
                              (size +min-hash-table-size+)
index fa3c971..fc8fed2 100644 (file)
@@ -2699,6 +2699,15 @@ core and return a descriptor to it."
                   (symbol-value c)
                   nil)
             constants))
+    ;; One more symbol that doesn't fit into the code above.
+    (flet ((translate (name)
+             (delete #\+ (substitute #\_ #\- name))))
+      (let ((c 'sb!impl::+magic-hash-vector-value+))
+        (push (list (translate (symbol-name c))
+                    9
+                    (symbol-value c)
+                    nil)
+              constants)))
 
     (setf constants
           (sort constants
index e6ed1e2..76d93aa 100644 (file)
@@ -1864,7 +1864,8 @@ scav_vector(lispobj *where, lispobj object)
 #endif
 
                 if ((old_index != new_index) &&
-                    ((!hash_vector) || (hash_vector[i] == 0x80000000)) &&
+                    ((!hash_vector) ||
+                     (hash_vector[i] == MAGIC_HASH_VECTOR_VALUE)) &&
                     ((new_key != empty_symbol) ||
                      (kv_vector[2*i] != empty_symbol))) {
 
index 7052fe5..64e4797 100644 (file)
@@ -16,6 +16,7 @@
 #include <stdlib.h>
 #include <sys/file.h>
 #include <sys/types.h>
+#include <signal.h>
 #include <sys/stat.h>
 #include <fcntl.h>
 #include <sys/ioctl.h>
@@ -54,6 +55,7 @@ int spawn(char *program, char *argv[], char *envp[], char *pty_name,
 {
     int pid = fork();
     int fd;
+    sigset_t sset;
 
     if (pid != 0)
         return pid;
@@ -67,6 +69,10 @@ int spawn(char *program, char *argv[], char *envp[], char *pty_name,
     setpgrp(0, getpid());
 #endif
 
+    /* unblock signals */
+    sigemptyset(&sset);
+    sigprocmask(SIG_SETMASK, &sset, NULL);
+
     /* If we are supposed to be part of some other pty, go for it. */
     if (pty_name) {
 #if !defined(hpux) && !defined(SVR4)
diff --git a/tests/hash.pure.lisp b/tests/hash.pure.lisp
new file mode 100644 (file)
index 0000000..afbf227
--- /dev/null
@@ -0,0 +1,21 @@
+;;;; This software is part of the SBCL system. See the README file for
+;;;; more information.
+;;;;
+;;;; While most of SBCL is derived from the CMU CL system, the test
+;;;; files (like this one) were written from scratch after the fork
+;;;; from CMU CL.
+;;;;
+;;;; This software is in the public domain and is provided with
+;;;; absolutely no warranty. See the COPYING and CREDITS files for
+;;;; more information.
+
+(in-package :cl-user)
+
+;;; +MAGIC-HASH-VECTOR-VALUE+ is used to mark empty entries in the slot
+;;; HASH-VECTOR of hash tables. It must be a value outside of the range
+;;; of SXHASH. The range of SXHASH is the non-negative fixnums.
+(assert (not (typep sb-impl::+magic-hash-vector-value+
+                    '(and fixnum unsigned-byte))))
+
+;;; success
+(quit :unix-status 104)
index f9a4a07..91d0194 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".)
-"0.9.3.59"
+"0.9.3.60"