From 58806bb0d72678f9068646819be2e4009a7a816c Mon Sep 17 00:00:00 2001 From: Nikodemus Siivola Date: Thu, 10 Aug 2006 05:55:23 +0000 Subject: [PATCH] 0.9.15.20: MERGE-PATHNAMES is not unsafely-flushable * 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 | 3 ++- src/compiler/fndb.lisp | 2 +- tests/mop-22.impure-cload.lisp | 4 ++-- tests/pathnames.impure.lisp | 14 ++++++++++++-- version.lisp-expr | 2 +- 5 files changed, 18 insertions(+), 7 deletions(-) diff --git a/NEWS b/NEWS index 6e3cb20..d1912e8 100644 --- 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) diff --git a/src/compiler/fndb.lisp b/src/compiler/fndb.lisp index d5e465b..7414ebc 100644 --- a/src/compiler/fndb.lisp +++ b/src/compiler/fndb.lisp @@ -1182,7 +1182,7 @@ (defknown merge-pathnames (pathname-designator &optional pathname-designator pathname-version) pathname - (unsafely-flushable)) + ()) (defknown make-pathname (&key (:defaults pathname-designator) diff --git a/tests/mop-22.impure-cload.lisp b/tests/mop-22.impure-cload.lisp index 75d9577..0fe9377 100644 --- a/tests/mop-22.impure-cload.lisp +++ b/tests/mop-22.impure-cload.lisp @@ -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 diff --git a/tests/pathnames.impure.lisp b/tests/pathnames.impure.lisp index 1365bba..e6b5d10 100644 --- a/tests/pathnames.impure.lisp +++ b/tests/pathnames.impure.lisp @@ -387,8 +387,18 @@ (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))) ;;;; success diff --git a/version.lisp-expr b/version.lisp-expr index 31edb6d..d747eb3 100644 --- a/version.lisp-expr +++ b/version.lisp-expr @@ -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" -- 1.7.10.4