Skip to content

Commit

Permalink
0.9.15.20: MERGE-PATHNAMES is not unsafely-flushable
Browse files Browse the repository at this point in the history
 * 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.
  • Loading branch information
nikodemus committed Aug 10, 2006
1 parent bb8121b commit 58806bb
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 7 deletions.
3 changes: 2 additions & 1 deletion NEWS
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion src/compiler/fndb.lisp
Expand Up @@ -1182,7 +1182,7 @@
(defknown merge-pathnames
(pathname-designator &optional pathname-designator pathname-version)
pathname
(unsafely-flushable))
())

(defknown make-pathname
(&key (:defaults pathname-designator)
Expand Down
4 changes: 2 additions & 2 deletions tests/mop-22.impure-cload.lisp
Expand Up @@ -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))
14 changes: 12 additions & 2 deletions tests/pathnames.impure.lisp
Expand Up @@ -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
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.9.15.19"
"0.9.15.20"

0 comments on commit 58806bb

Please sign in to comment.