From 1b64697e4e8a85ff8f11f5c05de71687dc5ad2e2 Mon Sep 17 00:00:00 2001 From: Daniel Barlow Date: Tue, 17 Sep 2002 19:52:29 +0000 Subject: [PATCH] 0.7.7.29 Fix bug 200: (translate-logical-pathname "/") is now #p"/" Fix x86 save-lisp-and-die problem (reported by CSR in sbcl-devel Message-ID: <20020916083642.GA3374@cam.ac.uk> - turns out to be ugly gencgc/purify interaction --- BUGS | 2 ++ src/code/target-pathname.lisp | 3 +-- src/runtime/gencgc-internal.h | 4 ++++ src/runtime/save.c | 8 ++++++++ tests/pathnames.impure.lisp | 8 +++++++- version.lisp-expr | 2 +- 6 files changed, 23 insertions(+), 4 deletions(-) diff --git a/BUGS b/BUGS index afe5c22..fb974ca 100644 --- a/BUGS +++ b/BUGS @@ -1361,6 +1361,8 @@ WORKAROUND: (TRANSLATE-LOGICAL-PATHNAME "/") should simply return #P"/", but signals an error in sbcl-0.7.7.28 + Fixed in sbcl-0.7.7.29: bug temporarily left here in BUGS to avoid + its number being accidentally reallocated DEFUNCT CATEGORIES OF BUGS IR1-#: diff --git a/src/code/target-pathname.lisp b/src/code/target-pathname.lisp index 9df17c6..7089003 100644 --- a/src/code/target-pathname.lisp +++ b/src/code/target-pathname.lisp @@ -1494,8 +1494,7 @@ a host-structure or string." (return (translate-logical-pathname (translate-pathname pathname from to))))))) (pathname pathname) - (stream (translate-logical-pathname (pathname pathname))) - (t (translate-logical-pathname (logical-pathname pathname))))) + (t (translate-logical-pathname (pathname pathname))))) (defun translate-logical-pathname (pathname &key) #!+sb-doc diff --git a/src/runtime/gencgc-internal.h b/src/runtime/gencgc-internal.h index 6f75ae1..18dc9fb 100644 --- a/src/runtime/gencgc-internal.h +++ b/src/runtime/gencgc-internal.h @@ -94,6 +94,10 @@ extern struct alloc_region boxed_region; extern struct alloc_region unboxed_region; extern int from_space, new_space; extern struct weak_pointer *weak_pointers; + +extern void *current_region_free_pointer; +extern void *current_region_end_addr; + void gencgc_pickup_dynamic(void); diff --git a/src/runtime/save.c b/src/runtime/save.c index 8069141..4fd98e7 100644 --- a/src/runtime/save.c +++ b/src/runtime/save.c @@ -132,6 +132,14 @@ save(char *filename, lispobj init_function) dynamic_space_free_pointer); #else #ifdef LISP_FEATURE_GENCGC + /* I don't know too much about the circumstances in which we could + * end up here. It may be that current_region_free_pointer is + * guaranteed to be relevant and we could skip these slightly + * paranoid checks. TRT would be to rid the code of + * current_region_foo completely - dan 2002.09.17 */ + if((boxed_region.free_pointer < current_region_free_pointer) && + (boxed_region.end_addr == current_region_end_addr)) + boxed_region.free_pointer = current_region_free_pointer; /* Flush the current_region, updating the tables. */ gc_alloc_update_page_tables(0,&boxed_region); gc_alloc_update_page_tables(1,&unboxed_region); diff --git a/tests/pathnames.impure.lisp b/tests/pathnames.impure.lisp index 7898a29..2219012 100644 --- a/tests/pathnames.impure.lisp +++ b/tests/pathnames.impure.lisp @@ -25,7 +25,7 @@ ;;; CL:PARSE-ERROR (or more specifically, of type ;;; SB-KERNEL:NAMESTRING-PARSE-ERROR). (assert - (typep (grab-condition (translate-logical-pathname "demo0::bla;file.lisp")) + (typep (grab-condition (logical-pathname "demo0::bla;file.lisp")) 'parse-error)) ;;; some things SBCL-0.6.9 used not to parse correctly: @@ -275,6 +275,12 @@ (setf (logical-pathname-translations "") (list '("**;*.*.*" "/**/*.*"))))) +;;; Bug 200: translate-logical-pathname is according to the spec supposed +;;; not to give errors if asked to translate a namestring for a valid +;;; physical pathname. Failed in 0.7.7.28 and before +(assert (string= (namestring (translate-logical-pathname "/")) "/")) + + ;;; Not strictly pathname logic testing, but until sbcl-0.7.6.19 we ;;; had difficulty with non-FILE-STREAM stream arguments to pathname ;;; functions (they would cause memory protection errors). Make sure diff --git a/version.lisp-expr b/version.lisp-expr index 328dd71..6d18da2 100644 --- a/version.lisp-expr +++ b/version.lisp-expr @@ -18,4 +18,4 @@ ;;; internal versions off the main CVS branch, it gets hairier, e.g. ;;; "0.pre7.14.flaky4.13".) -"0.7.7.28" +"0.7.7.29" -- 1.7.10.4