specialized-element-type slot in the ARRAY-TYPE structure be
*WILD-TYPE* for UNKNOWN-TYPE element types.
+166:
+ Compiling
+ (in-package :cl-user)
+ (defstruct uustk)
+ (defmethod permanentize ((uustk uustk))
+ (flet ((frob (hash-table test-for-deletion)
+ )
+ (obj-entry.stale? (oe)
+ (destructuring-bind (key . datum) oe
+ (declare (type simple-vector key))
+ (deny0 (void? datum))
+ (some #'stale? key))))
+ (declare (inline frob obj-entry.stale?))
+ (frob (uustk.args-hash->obj-alist uustk)
+ #'obj-entry.stale?)
+ (frob (uustk.hash->memoized-objs-list uustk)
+ #'objs.stale?))
+ (call-next-method))
+ in sbcl-0.7.3.11 causes an assertion failure,
+ failed AVER:
+ "(NOT
+(AND (NULL (BLOCK-SUCC B))
+ (NOT (BLOCK-DELETE-P B))
+ (NOT (EQ B (COMPONENT-HEAD #)))))"
+
+167:
+ In sbcl-0.7.3.11, compiling the (illegal) code
+ (in-package :cl-user)
+ (defmethod prove ((uustk uustk))
+ (zap ((frob () nil))
+ (frob)))
+ gives the (not terribly clear) error message
+ ; caught ERROR:
+ ; (during macroexpansion of (DEFMETHOD PROVE ...))
+ ; can't get template for (FROB NIL NIL)
+ The problem seems to be that the code walker used by the DEFMETHOD
+ macro is unhappy with the illegal syntax in the method body, and
+ is giving an unclear error message.
+
DEFUNCT CATEGORIES OF BUGS
IR1-#:
These labels were used for bugs related to the old IR1 interpreter.
* bug 147 fixed: The compiler preserves its block link/count
invariants more correctly now so that it doesn't crash. (thanks
to Alexey Dejneka)
+ * Dynamic loading of object files in OpenBSD is now supported. (thanks
+ to Pierre Mai)
+ * The fasl file format has changed again, because dynamic loading
+ on OpenBSD (which has non-ELF object files) motivated some cleanups
+ in the way that foreign symbols are transformed and passed around.
planned incompatible changes in 0.7.x:
* When the profiling interface settles down, maybe in 0.7.x, maybe
;;; versions which break binary compatibility. But it certainly should
;;; be incremented for release versions which break binary
;;; compatibility.
-(defconstant +fasl-file-version+ 27)
+(defconstant +fasl-file-version+ 28)
;;; (record of versions before 0.7.0 deleted in 0.7.1.41)
;;; 23 = sbcl-0.7.0.1 deleted no-longer-used EVAL-STACK stuff,
;;; causing changes in *STATIC-SYMBOLS*.
;;; 25 = sbcl-0.7.1.41 (and immediately preceding versions, actually)
;;; introduced new functions to check for control stack exhaustion
;;; 26 = sbcl-0.7.2.4 or so added :VARIABLE :MACRO-EXPANSION to INFO codes
-;;; 27 (2002-04-08) added MIGHT-CONTAIN-OTHER-TYPES? slot to CTYPE
+;;; 27: (2002-04-08) added MIGHT-CONTAIN-OTHER-TYPES? slot to CTYPE
+;;; 28: (2002-05-08) new convention for foreign symbols to support
+;;; dynamic loading in OpenBSD
;;; the conventional file extension for our fasl files
(declaim (type simple-string *fasl-file-type*))
;;; dlsym()-based implementation of GET-DYNAMIC-FOREIGN-SYMBOL-ADDRESS
;;; and functions (e.g. LOAD-FOREIGN) which affect it. This should
;;; work on any ELF system with dlopen(3) and dlsym(3)
-#-(or linux FreeBSD)
+;;; It also works on OpenBSD, which isn't ELF, but is otherwise modern
+;;; enough to have a fairly well working dlopen/dlsym implementation.
+#-(or linux FreeBSD OpenBSD)
(macrolet ((define-unsupported-fun (fun-name)
`(defun ,fun-name (&rest rest)
"unsupported on this system"
(error 'unsupported-operator :name ',fun-name))))
(define-unsupported-fun load-1-foreign)
(define-unsupported-fun load-foreign))
-#+(or linux FreeBSD)
+#+(or linux FreeBSD OpenBSD)
(progn
;;; flags for dlopen()
*after-save-initializations*)
(defvar *dso-linker* "/usr/bin/ld")
-(defvar *dso-linker-options* '("-G" "-o"))
+(defvar *dso-linker-options* '("-shared" "-o"))
(sb-alien:define-alien-routine dlopen system-area-pointer
(defun find-foreign-symbol-in-table (name table)
(let ((prefixes
#!+(or linux freebsd) #("" "ldso_stub__")
- #!+openbsd #("" "_")
+ #!+openbsd #("")
#!+sunos #("" "ldso_stub__")))
(declare (notinline some)) ; to suppress bug 117 bogowarning
(some (lambda (prefix)
sb!vm:fdefn-raw-addr-slot
(make-random-descriptor
(cold-foreign-symbol-address-as-integer
- "undefined_tramp"))))
+ (sb!vm:extern-alien-name "undefined_tramp")))))
fdefn))))
;;; Handle the at-cold-init-time, fset-for-static-linkage operation
(#.sb!vm:closure-header-widetag
(make-random-descriptor
(cold-foreign-symbol-address-as-integer
- "closure_tramp")))))
+ (sb!vm:extern-alien-name "closure_tramp"))))))
fdefn))
(defun initialize-static-fns ()
(immediate-constant "Immed")
(noise (symbol-name (sc-name sc))))))
;;; FIXME: Could this, and everything that uses it, be made #!+SB-SHOW?
+
\f
;;; The loader uses this to convert alien names to the form they need in
;;; the symbol table (for example, prepending an underscore).
(defun extern-alien-name (name)
(declare (type simple-string name))
- ;; On the X86 we don't do anything.
- name)
+ ;; OpenBSD is non-ELF, and needs a _ prefix
+ #!+openbsd (concatenate 'string "_" name)
+ ;; The other (ELF) ports currently don't need any prefix
+ #!-openbsd name)
testfilestem=${TMPDIR:-/tmp}/sbcl-foreign-test-$$
-# FIXME: At least on OpenBSD, the "make $testfilestem.o" puts the
-# output file into the current directory, instead of the
-# target directory. E.g. "make /tmp/foo.o" causes "./foo.o" to be
-# created (!). Since OpenBSD doesn't support LOAD-FOREIGN, this
-# doesn't matter much, since it punts with UNSUPPORTED-OPERATOR
-# instead of not finding the file. But it'd be nice to straighten
-# this out, if only so that sbcl-foreign-test-*.o clutter
-# doesn't pile up in this directory. Maybe some time when I have
-# several test machines at hand to check the behavior of different
-# versions of "make"...
+# Make a little shared object file to test with.
echo 'int summish(int x, int y) { return 1 + x + y; }' > $testfilestem.c
-make $testfilestem.o
+cc -c $testfilestem.c -o $testfilestem.o
ld -shared -o $testfilestem.so $testfilestem.o
+# Test interaction with the shared object file.
${SBCL:-sbcl} <<EOF
(handler-case
(load-foreign '("$testfilestem.so"))
;;; for internal versions, especially for internal versions off the
;;; main CVS branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".)
-"0.7.3.11"
+"0.7.3.12"