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
;;; 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
(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)
(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)
lispobj
load_core_file(char *file)
{
+ u32 *header, val, len, *ptr, remaining_len;
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) {
#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
#else LANGUAGE_ASSEMBLY
-/* These are needed by assem.S. */
-
#ifdef mips
#define EXTERN(name,bytes) .extern name bytes
#endif
+/**/
#ifdef sparc
#ifdef SVR4
#define EXTERN(name,bytes) .global name
#define EXTERN(name,bytes) .global _ ## name
#endif
#endif
+/**/
#ifdef ibmrt
#define EXTERN(name,bytes) .globl _/**/name
#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__
+/* 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
*
* 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
#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)
{
#include <string.h>
#include <unistd.h>
+#include "runtime.h"
+#include "sbcl.h"
#include "util.h"
\f
/*
* 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 {
* 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 */
- 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 */
;;; 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"