From 1dc58ed504bd2de24fd87f9267c97c4a7d90ba3c Mon Sep 17 00:00:00 2001 From: William Harold Newman Date: Sun, 30 Dec 2001 19:22:29 +0000 Subject: [PATCH] 0.pre7.107: messed around with xc bug 138 tried and rejected CR sbcl-devel 2001-12-30 patch for bug 139 --- BUGS | 54 +++++++++++++++++++++++++++++++++++++++++++++++ src/code/condition.lisp | 4 ++-- src/code/filesys.lisp | 7 +++--- src/compiler/vop.lisp | 2 +- tests/filesys.pure.lisp | 4 ++-- tests/filesys.test.sh | 4 ++-- version.lisp-expr | 2 +- 7 files changed, 66 insertions(+), 11 deletions(-) diff --git a/BUGS b/BUGS index 534c999..9bec3d3 100644 --- a/BUGS +++ b/BUGS @@ -1324,6 +1324,60 @@ Error in function C::GET-LAMBDA-TO-COMPILE: But please do fix some or all of the problem, I'm tired of messing with it. -- WHN 2001-12-22 +138: + a cross-compiler bug in sbcl-0.pre7.107 + + $ cat > /tmp/bug139.lisp << EOF + (in-package "SB!KERNEL") + (defun f-c-l (name parent-types) + (let* ((cpl (mapcar (lambda (x) + (condition-class-cpl x)) + parent-types)) + (new-inherits + (concatenate 'simple-vector + (layout-inherits cond-layout)))) + (if (not (mismatch (layout-inherits olayout) new-inherits)) + olayout + (make-layout)))) + EOF + $ sbcl --core output/after-xc.core + ... + * (target-compile-file "/tmp/bug139.lisp") + ... + internal error, failed AVER: + "(COMMON-LISP:MEMBER SB!C::FUN (SB!C::COMPONENT-LAMBDAS SB!C:COMPONENT))" + + It seems as though this xc bug is likely to correspond to a bug in the + ordinary compiler, but I haven't yet found a test case which causes + this problem in the ordinary compiler. + + related weirdness: Using #'(LAMBDA (X) ...) instead of (LAMBDA (X) ...) + makes the assertion failure go away. + +139: + In sbcl-0.pre7.107, (DIRECTORY "*.*") is broken, as reported by + Nathan Froyd sbcl-devel 2001-12-28. + + Christophe Rhodes suggested (sbcl-devel 2001-12-30) converting + the MERGED-PATHNAME expression in DEFUN DIRECTORY to + (merged-pathname (merge-pathnames pathname + *default-pathname-defaults*)) + This looks right, and fixes this bug, but it interacts with the NODES + logic in %ENUMERATE-PATHNAMES to create a new bug, so that + (DIRECTORY "../**/*.*") no longer shows files in the current working + directory. Probably %ENUMERATE-PATHNAMES (or related logic like + %ENUMERATE-MATCHES) needs to be patched as well. + + Note: The MERGED-PATHNAME change changes behavior incompatibly, + making e.g. (DIRECTORY "*") no longer equivalent to (DIRECTORY "*.*"), + so deserves a NEWS entry. E.g. +* minor incompatible change (part of a bug fix by Christophe Rhodes + to DIRECTORY behavior): DIRECTORY no longer implicitly promotes + NIL slots of its pathname argument to :WILD, and in particular + asking for the contents of a directory, which you used to be able + to do without explicit wildcards, e.g. (DIRECTORY "/tmp/"), + now needs explicit wildcards, e.g. (DIRECTORY "/tmp/*.*"). + KNOWN BUGS RELATED TO THE IR1 INTERPRETER diff --git a/src/code/condition.lisp b/src/code/condition.lisp index 43d9366..d52aecc 100644 --- a/src/code/condition.lisp +++ b/src/code/condition.lisp @@ -90,7 +90,7 @@ (eval-when (:compile-toplevel :load-toplevel :execute) (/show0 "condition.lisp 103") (let ((condition-class (locally - ;; KLUDGE: There's a FIND-CLASS DEFTRANSFORM for + ;; KLUDGE: There's a DEFTRANSFORM FIND-CLASS for ;; constant class names which creates fast but ;; non-cold-loadable, non-compact code. In this ;; context, we'd rather have compact, cold-loadable @@ -102,7 +102,7 @@ (/show0 "condition.lisp 103")) (setf (condition-class-report (locally - ;; KLUDGE: There's a FIND-CLASS DEFTRANSFORM + ;; KLUDGE: There's a DEFTRANSFORM FIND-CLASS ;; for constant class names which creates fast ;; but non-cold-loadable, non-compact code. In ;; this context, we'd rather have compact, diff --git a/src/code/filesys.lisp b/src/code/filesys.lisp index 214e585..1440777 100644 --- a/src/code/filesys.lisp +++ b/src/code/filesys.lisp @@ -531,15 +531,15 @@ (let ((directory (pathname-directory pathname))) (/noshow0 "computed DIRECTORY") (if directory - (ecase (car directory) + (ecase (first directory) (:absolute (/noshow0 "absolute directory") - (%enumerate-directories "/" (cdr directory) pathname + (%enumerate-directories "/" (rest directory) pathname verify-existence follow-links nil function)) (:relative (/noshow0 "relative directory") - (%enumerate-directories "" (cdr directory) pathname + (%enumerate-directories "" (rest directory) pathname verify-existence follow-links nil function))) (%enumerate-files "" pathname verify-existence function)))) @@ -909,6 +909,7 @@ ;; can arise when e.g. multiple symlinks map to the same ;; truename). (truenames (make-hash-table :test #'equal)) + ;; FIXME: not really right, as per bug 139 (merged-pathname (merge-pathnames pathname (make-pathname :name :wild :type :wild diff --git a/src/compiler/vop.lisp b/src/compiler/vop.lisp index 2929961..29d1a49 100644 --- a/src/compiler/vop.lisp +++ b/src/compiler/vop.lisp @@ -368,7 +368,7 @@ ;; function as far as the debugger is concerned. (environment-start nil :type (or label null))) (defprinter (ir2-physenv) - environment + closure old-fp return-pc return-pc-pass) diff --git a/tests/filesys.pure.lisp b/tests/filesys.pure.lisp index 09e770b..559e0fd 100644 --- a/tests/filesys.pure.lisp +++ b/tests/filesys.pure.lisp @@ -28,7 +28,7 @@ ;;; In sbcl-0.6.9 DIRECTORY failed on paths with :WILD or ;;; :WILD-INFERIORS in their directory components. -(let ((dir (directory "../**/*"))) +(let ((dir (directory "../**/*.*"))) ;; We know a little bit about the structure of this result; ;; let's test to make sure that this test file is in it. (assert (find-if (lambda (pathname) @@ -37,7 +37,7 @@ dir))) ;;; ANSI: FILE-LENGTH should signal an error of type TYPE-ERROR if -;;; stream is not a stream associated with a file. +;;; STREAM is not a stream associated with a file. ;;; ;;; (Peter Van Eynde's ansi-test suite caught this, and Eric Marsden ;;; reported a fix for CMU CL, which was ported to sbcl-0.6.12.35.) diff --git a/tests/filesys.test.sh b/tests/filesys.test.sh index d944cf2..37c0e0b 100644 --- a/tests/filesys.test.sh +++ b/tests/filesys.test.sh @@ -32,7 +32,7 @@ expected_truenames=\ #p\"$testdir/test-2.tmp\")" $SBCL <