Skip to content

Commit

Permalink
0.8.19.28: fix loading of multiply forward-refrenced layouts
Browse files Browse the repository at this point in the history
           Bug orginally reported and fix provided by Cheuksan Wang,
           basis for test-case provided by Jason Dagit.
  • Loading branch information
nikodemus committed Feb 16, 2005
1 parent 55895fd commit 412fb51
Show file tree
Hide file tree
Showing 6 changed files with 41 additions and 2 deletions.
2 changes: 2 additions & 0 deletions NEWS
@@ -1,6 +1,8 @@
changes in sbcl-0.8.20 (0.9alpha.0?) relative to sbcl-0.8.19:
* fixed disassembly of SHLD and SHRD on x86. (thanks to David
Lichteblau)
* fixed loading of multiply forward-referenced layouts.
(thanks to Cheuksan Wang)
* fixed bugs 19 and 317: fixed-format floating point printing is
more accurate. This also fixes a bug reported by Adam Warner
related to the ~@F format directive.
Expand Down
2 changes: 1 addition & 1 deletion src/code/class.lisp
Expand Up @@ -431,7 +431,7 @@
(let ((layout (find-layout name)))
(init-or-check-layout layout
(or (find-classoid name nil)
(make-undefined-classoid name))
(layout-classoid layout))
length
inherits
depthoid)))
Expand Down
5 changes: 5 additions & 0 deletions tests/undefined-classoid-bug-1.lisp
@@ -0,0 +1,5 @@
(in-package "CL-USER")

(defun a-struct-referencer-1 (struct)
(a-struct-slot struct))

6 changes: 6 additions & 0 deletions tests/undefined-classoid-bug-2.lisp
@@ -0,0 +1,6 @@
(in-package "CL-USER")

(defun a-struct-referencer-2 (struct)
(a-struct-slot struct))

(defstruct a-struct slot)
26 changes: 26 additions & 0 deletions tests/undefined-classoid-bug.test.sh
@@ -0,0 +1,26 @@
# This file run a regression test for a bug in loading
# forward-referenced layouts.

FILES='"undefined-classoid-bug-1.lisp" "undefined-classoid-bug-2.lisp"'
FASLS='"undefined-classoid-bug-1.fasl" "undefined-classoid-bug-2.fasl"'

${SBCL:-sbcl} <<EOF
(let ((files (list $FILES)))
(mapc #'load files)
(mapc #'compile-file files))
(quit :unix-status 52)
EOF

${SBCL:-sbcl} <<EOF
(mapc #'load (list $FASLS))
(quit :unix-status 52)
EOF

if [ $? != 52 ]; then
rm $FASLS
echo undefined-classoid-bug test failed: $?
exit 1 # Failure
fi

# success convention for script
exit 104
2 changes: 1 addition & 1 deletion version.lisp-expr
Expand Up @@ -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.8.19.27"
"0.8.19.28"

0 comments on commit 412fb51

Please sign in to comment.