0.9.15.20: MERGE-PATHNAMES is not unsafely-flushable
authorNikodemus Siivola <nikodemus@random-state.net>
Thu, 10 Aug 2006 05:55:23 +0000 (05:55 +0000)
committerNikodemus Siivola <nikodemus@random-state.net>
Thu, 10 Aug 2006 05:55:23 +0000 (05:55 +0000)
 * Analogous to 0.9.15.13.
 * Fix the test from 0.9.15.13 to actually test a failing case.
 * Add an explanatory comment with the test-cases.

NEWS
src/compiler/fndb.lisp
tests/mop-22.impure-cload.lisp
tests/pathnames.impure.lisp
version.lisp-expr

diff --git a/NEWS b/NEWS
index 6e3cb20..d1912e8 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -14,7 +14,8 @@ changes in sbcl-0.9.16 relative to sbcl-0.9.15:
   * bug fix: improved the handling of type declarations and the
     detection of violations for keyword arguments with non-constant
     defaults.
-  * bug fix: erronous calls to PATHNAME were being optimized away.
+  * bug fix: potentially erronous calls to PATHNAME and
+    MERGE-PATHNAMES were being flushed in some cases.
     (reported by Richard Kreuter)
   * bug fix: compiled calls to TYPEP were mishandling obsolete
     instances.  (reported by James Bielman and Attila Lendvai)
index d5e465b..7414ebc 100644 (file)
 (defknown merge-pathnames
   (pathname-designator &optional pathname-designator pathname-version)
   pathname
-  (unsafely-flushable))
+  ())
 
 (defknown make-pathname
  (&key (:defaults pathname-designator)
index 75d9577..0fe9377 100644 (file)
@@ -48,8 +48,8 @@
 
 (assert (eq (incomplete/1 (make-instance 'incomplete)) 'incomplete))
 (assert (eq (forward/1 (make-instance 'forward)) 'forward))
-(assert (eq (incomplete/7 (make-instance 'incomplete) 
+(assert (eq (incomplete/7 (make-instance 'incomplete)
                           (make-instance 'incomplete)
-                          t 1 (make-condition 'error) 
+                          t 1 (make-condition 'error)
                           (find-class 'incomplete) 3)
             t))
\ No newline at end of file
index 1365bba..e6b5d10 100644 (file)
                                            (assert (not (pathname-directory p)))
                                            p))))
 
-;;; reported by Richard Kreuter: PATHNAME used to be unsafely-flushable
-(assert (eq :false (if (ignore-errors (pathname nil)) :true :false)))
+;;; reported by Richard Kreuter: PATHNAME and MERGE-PATHNAMES used to
+;;; be unsafely-flushable. Since they are known to return non-nil values
+;;; only, the test-node of the IF is flushed, and since the function
+;;; is unsafely-flushable, out it goes, and bad pathname designators
+;;; breeze through.
+;;;
+;;; These tests rely on using a stream that appears as a file-stream
+;;; but isn't a valid pathname-designator.
+(assert (eq :false
+            (if (ignore-errors (pathname sb-sys::*tty*)) :true :false)))
+(assert (eq :false
+            (if (ignore-errors (merge-pathnames sb-sys::*tty*)) :true :false)))
 
 \f
 ;;;; success
index 31edb6d..d747eb3 100644 (file)
@@ -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.9.15.19"
+"0.9.15.20"