0.6.12.12:
authorWilliam Harold Newman <william.newman@airmail.net>
Tue, 22 May 2001 16:10:46 +0000 (16:10 +0000)
committerWilliam Harold Newman <william.newman@airmail.net>
Tue, 22 May 2001 16:10:46 +0000 (16:10 +0000)
(I went hunting unsuccessfully OpenBSD GC problems, didn't
find them, and made small cleanups instead.)
Dan Barlow's way of dealing with 64-bit slots in wrapped_stat
is better than mine, and it's possible that mine is
even responsible for my OpenBSD memory corruption
problems, so convert the wrapped_st_size slot to
32 bits.
also renamed DB's my_dev_t to more-explicit ffi_dev_t

BUGS
src/code/unix.lisp
src/compiler/generic/genesis.lisp
src/runtime/coreparse.c
src/runtime/globals.h
src/runtime/interrupt.c
src/runtime/wrap.c
version.lisp-expr

diff --git a/BUGS b/BUGS
index 9e31673..e728c3e 100644 (file)
--- a/BUGS
+++ b/BUGS
@@ -930,6 +930,16 @@ Error in function C::GET-LAMBDA-TO-COMPILE:
   the first time around, until regression tests are written I'm not 
   comfortable merging the patches in the CVS version of SBCL.
 
   the first time around, until regression tests are written I'm not 
   comfortable merging the patches in the CVS version of SBCL.
 
+101:
+  The error message for calls to structure accessors with the
+  wrong number of arguments is confusing and of the wrong
+  condition class (TYPE-ERROR instead of PROGRAM-ERROR):
+    * (defstruct foo x y)
+    * (foo-x)
+    debugger invoked on condition of type SIMPLE-TYPE-ERROR:
+    Structure for accessor FOO-X is not a FOO:
+    301988783
+
 
 KNOWN BUGS RELATED TO THE IR1 INTERPRETER
 
 
 KNOWN BUGS RELATED TO THE IR1 INTERPRETER
 
index ec20fb0..b2a99e3 100644 (file)
 ;;; Note that st-dev is a long, not a dev-t. This is because dev-t on
 ;;; linux 32 bit archs is a 64 bit quantity, but alien doesn's support
 ;;; those. We don't actually access that field anywhere, though, so
 ;;; Note that st-dev is a long, not a dev-t. This is because dev-t on
 ;;; linux 32 bit archs is a 64 bit quantity, but alien doesn's support
 ;;; those. We don't actually access that field anywhere, though, so
-;;; until we can get 64 bit alien support it'll do.
+;;; until we can get 64 bit alien support it'll do. Also note that
+;;; st_size is a long, not an off-t, because off-t is a 64-bit
+;;; quantity on Alpha. And FIXME: "No one would want a file length
+;;; longer than 32 bits anyway, right?":-|
 (def-alien-type nil
   (struct wrapped_stat
     (st-dev unsigned-long)              ; would be dev-t in a real stat
 (def-alien-type nil
   (struct wrapped_stat
     (st-dev unsigned-long)              ; would be dev-t in a real stat
     (st-uid  uid-t)
     (st-gid  gid-t)
     (st-rdev unsigned-long)             ; would be dev-t in a real stat
     (st-uid  uid-t)
     (st-gid  gid-t)
     (st-rdev unsigned-long)             ; would be dev-t in a real stat
-    (st-size off-t)
+    (st-size unsigned-long)            ; would be off-t in a real stat
     (st-blksize unsigned-long)
     (st-blocks unsigned-long)
     (st-atime time-t)
     (st-blksize unsigned-long)
     (st-blocks unsigned-long)
     (st-atime time-t)
index 241717d..c50f246 100644 (file)
@@ -2772,10 +2772,6 @@ initially undefined function references:~2%")
     (write-long *data-page*)
     (multiple-value-bind (floor rem)
        (floor (gspace-byte-address gspace) sb!c:*backend-page-size*)
     (write-long *data-page*)
     (multiple-value-bind (floor rem)
        (floor (gspace-byte-address gspace) sb!c:*backend-page-size*)
-      ;; FIXME: Define an INSIST macro which does like ASSERT, but
-      ;; less expensively (ERROR, not CERROR), and which reports
-      ;; "internal error" on failure. Use it here and elsewhere in the
-      ;; system.
       (aver (zerop rem))
       (write-long floor))
     (write-long pages)
       (aver (zerop rem))
       (write-long floor))
     (write-long pages)
index 75a32df..a016ced 100644 (file)
@@ -117,20 +117,9 @@ process_directory(int fd, long *ptr, int count)
 lispobj
 load_core_file(char *file)
 {
 lispobj
 load_core_file(char *file)
 {
+    u32 *header, val, len, *ptr, remaining_len;
     int fd = open(file, O_RDONLY), count;
 
     int fd = open(file, O_RDONLY), count;
 
-    /* KLUDGE: This kind of conditionalization everywhere that 32-bit
-     * ints are used is really nasty. It would be much nicer to define
-     * a typedef like addr_as_int once and for all in each
-     * architecture file, then use that everywhere. -- WHN 19990904 */
-#ifndef alpha
-    long *header,  val, len, *ptr;
-    long remaining_len;
-#else
-    u32 *header, val, len, *ptr;
-    u32 remaining_len;
-#endif
-
     lispobj initial_function = NIL;
     FSHOW((stderr, "/entering load_core_file(%s)\n", file));
     if (fd < 0) {
     lispobj initial_function = NIL;
     FSHOW((stderr, "/entering load_core_file(%s)\n", file));
     if (fd < 0) {
index 2ed255f..5b45181 100644 (file)
@@ -25,7 +25,7 @@ extern lispobj *current_binding_stack_pointer;
 #endif
 
 #if !defined(ibmrt) && !defined(__i386__)
 #endif
 
 #if !defined(ibmrt) && !defined(__i386__)
-/* FIXME: why doesn't the x86 need this? */
+/* FIXME: Why doesn't the x86 need this? */
 extern lispobj *dynamic_space_free_pointer;
 extern lispobj *current_auto_gc_trigger;
 #endif
 extern lispobj *dynamic_space_free_pointer;
 extern lispobj *current_auto_gc_trigger;
 #endif
@@ -36,11 +36,10 @@ extern void globals_init(void);
 
 #else  LANGUAGE_ASSEMBLY
 
 
 #else  LANGUAGE_ASSEMBLY
 
-/* These are needed by assem.S. */
-
 #ifdef mips
 #define EXTERN(name,bytes) .extern name bytes
 #endif
 #ifdef mips
 #define EXTERN(name,bytes) .extern name bytes
 #endif
+/**/
 #ifdef sparc
 #ifdef SVR4
 #define EXTERN(name,bytes) .global name
 #ifdef sparc
 #ifdef SVR4
 #define EXTERN(name,bytes) .global name
@@ -48,20 +47,20 @@ extern void globals_init(void);
 #define EXTERN(name,bytes) .global _ ## name
 #endif
 #endif
 #define EXTERN(name,bytes) .global _ ## name
 #endif
 #endif
+/**/
 #ifdef ibmrt
 #define EXTERN(name,bytes) .globl _/**/name
 #endif
 #ifdef ibmrt
 #define EXTERN(name,bytes) .globl _/**/name
 #endif
-
+/**/
 #ifdef alpha
 #ifdef linux
 #define EXTERN(name,bytes) .globl name 
 #endif
 #endif
 #ifdef alpha
 #ifdef linux
 #define EXTERN(name,bytes) .globl name 
 #endif
 #endif
-
-/* I'm very dubious about this.  Linux hasn't used _ on external names
- * since ELF became prevalent - i.e. about 1996, on x86    -dan 20010125 */
 #ifdef __i386__
 #ifdef __linux__
 #ifdef __i386__
 #ifdef __linux__
+/* I'm very dubious about this.  Linux hasn't used _ on external names
+ * since ELF became prevalent - i.e. about 1996, on x86    -dan 20010125 */
 #define EXTERN(name,bytes) .globl _/**/name
 #else
 #define EXTERN(name,bytes) .global _ ## name
 #define EXTERN(name,bytes) .globl _/**/name
 #else
 #define EXTERN(name,bytes) .global _ ## name
index 8a31cb6..ecc3b84 100644 (file)
@@ -75,7 +75,7 @@ os_context_t *lisp_interrupt_contexts[MAX_INTERRUPTS];
  *
  * However, some signals need special handling, e.g. 
  *
  *
  * However, some signals need special handling, e.g. 
  *
- * o the SIGSEGV (for Linux) or SIGBUS (for FreeBSD) used by the
+ * o the SIGSEGV (for e.g. Linux) or SIGBUS (for e.g. FreeBSD) used by the
  *   garbage collector to detect violations of write protection,
  *   because some cases of such signals (e.g. GC-related violations of
  *   write protection) are handled at C level and never passed on to
  *   garbage collector to detect violations of write protection,
  *   because some cases of such signals (e.g. GC-related violations of
  *   write protection) are handled at C level and never passed on to
@@ -513,10 +513,10 @@ gc_trigger_hit(int signal, siginfo_t *info, os_context_t *context)
 #endif
 
 #ifndef __i386__
 #endif
 
 #ifndef __i386__
-/* This function gets called from the SIGSEGV (Linux) or SIGBUS (BSD)
- * handler.  Here we check whether the signal was due to treading on
- * the mprotect()ed zone - and if so, arrange for a GC to happen.
- */
+/* This function gets called from the SIGSEGV (for e.g. Linux or
+ * OpenBSD) or SIGBUS (for e.g. FreeBSD) handler. Here we check
+ * whether the signal was due to treading on the mprotect()ed zone -
+ * and if so, arrange for a GC to happen. */
 boolean
 interrupt_maybe_gc(int signal, siginfo_t *info, void *void_context)
 {
 boolean
 interrupt_maybe_gc(int signal, siginfo_t *info, void *void_context)
 {
index d8b47ae..272a6f9 100644 (file)
@@ -29,6 +29,8 @@
 #include <string.h>
 #include <unistd.h>
 
 #include <string.h>
 #include <unistd.h>
 
+#include "runtime.h"
+#include "sbcl.h"
 #include "util.h"
 \f   
 /*
 #include "util.h"
 \f   
 /*
@@ -107,7 +109,15 @@ free_directory_lispy_filenames(char** directory_lispy_filenames)
  * stat(2) stuff
  */
 
  * stat(2) stuff
  */
 
-typedef long my_dev_t;
+/* As of 0.6.12, the FFI can't handle 64-bit values. For now, we use
+ * these munged-to-32-bits values for might-be-64-bit slots of
+ * stat_wrapper as a workaround, so that at least we can still work
+ * when values are small.
+ *
+ * FIXME: But of course we should fix the FFI so that we can use the
+ * actual 64-bit values instead. */
+typedef long ffi_dev_t; /* since Linux dev_t can be 64 bits */
+typedef u32 ffi_off_t; /* since OpenBSD 2.8 st_size is 64 bits */
 
 /* a representation of stat(2) results which doesn't depend on CPU or OS */
 struct stat_wrapper {
 
 /* a representation of stat(2) results which doesn't depend on CPU or OS */
 struct stat_wrapper {
@@ -121,14 +131,14 @@ struct stat_wrapper {
      * happen, and I nodded sagely. But now I know better.:-| This is
      * another entry for Dan Barlow's ongoing episodic rant about C
      * header files, I guess.. -- WHN 2001-05-10 */
      * happen, and I nodded sagely. But now I know better.:-| This is
      * another entry for Dan Barlow's ongoing episodic rant about C
      * header files, I guess.. -- WHN 2001-05-10 */
-    my_dev_t      wrapped_st_dev;         /* device */
+    ffi_dev_t     wrapped_st_dev;         /* device */
     ino_t         wrapped_st_ino;         /* inode */
     mode_t        wrapped_st_mode;        /* protection */
     nlink_t       wrapped_st_nlink;       /* number of hard links */
     uid_t         wrapped_st_uid;         /* user ID of owner */
     gid_t         wrapped_st_gid;         /* group ID of owner */
     ino_t         wrapped_st_ino;         /* inode */
     mode_t        wrapped_st_mode;        /* protection */
     nlink_t       wrapped_st_nlink;       /* number of hard links */
     uid_t         wrapped_st_uid;         /* user ID of owner */
     gid_t         wrapped_st_gid;         /* group ID of owner */
-    my_dev_t      wrapped_st_rdev;        /* device type (if inode device) */
-    off_t         wrapped_st_size;        /* total size, in bytes */
+    ffi_dev_t     wrapped_st_rdev;        /* device type (if inode device) */
+    ffi_off_t     wrapped_st_size;        /* total size, in bytes */
     unsigned long wrapped_st_blksize;     /* blocksize for filesystem I/O */
     unsigned long wrapped_st_blocks;      /* number of blocks allocated */
     time_t        wrapped_st_atime;       /* time_t of last access */
     unsigned long wrapped_st_blksize;     /* blocksize for filesystem I/O */
     unsigned long wrapped_st_blocks;      /* number of blocks allocated */
     time_t        wrapped_st_atime;       /* time_t of last access */
index 1b6b905..bccfa8f 100644 (file)
@@ -15,4 +15,4 @@
 ;;; versions, and a string like "0.6.5.12" is used for versions which
 ;;; aren't released but correspond only to CVS tags or snapshots.
 
 ;;; versions, and a string like "0.6.5.12" is used for versions which
 ;;; aren't released but correspond only to CVS tags or snapshots.
 
-"0.6.12.11"
+"0.6.12.12"