Unix pathnames with directory starting in :ABSOLUTE followed by a symbol don't unparse.

Bug #1738775 reported by Richard M Kreuter
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
SBCL
Fix Released
High
Unassigned

Bug Description

Unix pathnames whose directories start with :ABSOLUTE followed by one of symbols :WILD, :WILD-INFERIORS, or :UP no longer have a namestring syntax, despite being valid products of PARSE-NAMESTRING:

--
$ sh ./run-sbcl.sh --no-userinit --no-sysinit
(running SBCL from: .)
This is SBCL 1.3.2.69-aff4a0f, an implementation of ANSI Common Lisp.
More information about SBCL is available at <http://www.sbcl.org/>.

SBCL is free software, provided as is, with absolutely no warranty.
It is mostly in the public domain; some portions are provided under
BSD-style licenses. See the CREDITS and COPYING files in the
distribution for more information.
* (make-pathname :directory '(:absolute :wild-inferiors))

#<PATHNAME (with no namestring)
           :HOST #<SB-IMPL::UNIX-HOST {1000406CF3}>
           :DEVICE NIL
           :DIRECTORY (:ABSOLUTE :WILD-INFERIORS)
           :NAME NIL
           :TYPE NIL
           :VERSION NIL>
* (make-pathname :directory '(:absolute :wild))

#<PATHNAME (with no namestring)
           :HOST #<SB-IMPL::UNIX-HOST {1000406CF3}>
           :DEVICE NIL
           :DIRECTORY (:ABSOLUTE :WILD)
           :NAME NIL
           :TYPE NIL
           :VERSION NIL>
* (make-pathname :directory '(:absolute :up))

#<PATHNAME (with no namestring)
           :HOST #<SB-IMPL::UNIX-HOST {1000406CF3}>
           :DEVICE NIL
           :DIRECTORY (:ABSOLUTE :UP)
           :NAME NIL
           :TYPE NIL
           :VERSION NIL>
* (pathname "/**/")

#<PATHNAME (with no namestring)
           :HOST #<SB-IMPL::UNIX-HOST {1000406CF3}>
           :DEVICE NIL
           :DIRECTORY (:ABSOLUTE :WILD-INFERIORS)
           :NAME NIL
           :TYPE NIL
           :VERSION NIL>
* (pathname "/*/")

#<PATHNAME (with no namestring)
           :HOST #<SB-IMPL::UNIX-HOST {1000406CF3}>
           :DEVICE NIL
           :DIRECTORY (:ABSOLUTE :WILD)
           :NAME NIL
           :TYPE NIL
           :VERSION NIL>
* (pathname "/../")

#<PATHNAME (with no namestring)
           :HOST #<SB-IMPL::UNIX-HOST {1000406CF3}>
           :DEVICE NIL
           :DIRECTORY (:ABSOLUTE :UP)
           :NAME NIL
           :TYPE NIL
           :VERSION NIL>
--

The attached patch rectifies, I believe.

(Aside: 19.2.2.4.3 requires :ABSOLUTE :UP to signal a FILE-ERROR, but since that is a valid thing to have on Unix, please continue not conforming to ANSI on this detail.)

Other requested info:

--
$ uname -a
Darwin m5.localdomain 14.5.0 Darwin Kernel Version 14.5.0: Wed Jul 29 02:26:53 PDT 2015; root:xnu-2782.40.9~1/RELEASE_X86_64 x86_64

* *features*

(:64-BIT :64-BIT-REGISTERS :ALIEN-CALLBACKS :ANSI-CL :ASH-RIGHT-VOPS :BSD
 :C-STACK-IS-CONTROL-STACK :COMMON-LISP :COMPARE-AND-SWAP-VOPS
 :COMPLEX-FLOAT-VOPS :CYCLE-COUNTER :DARWIN :DARWIN9-OR-BETTER :FLOAT-EQL-VOPS
 :FP-AND-PC-STANDARD-SAVE :GENCGC :IEEE-FLOATING-POINT :INLINE-CONSTANTS
 :INODE64 :INTEGER-EQL-VOP :INTERLEAVED-RAW-SLOTS :LINKAGE-TABLE :LITTLE-ENDIAN
 :MACH-EXCEPTION-HANDLER :MACH-O :MEMORY-BARRIER-VOPS :MULTIPLY-HIGH-VOPS
 :OS-PROVIDES-BLKSIZE-T :OS-PROVIDES-DLADDR :OS-PROVIDES-DLOPEN
 :OS-PROVIDES-PUTWC :OS-PROVIDES-SUSECONDS-T :PACKAGE-LOCAL-NICKNAMES
 :PRECISE-ARG-COUNT-ERROR :RAW-INSTANCE-INIT-VOPS :SB-DOC :SB-EVAL :SB-LDB
 :SB-PACKAGE-LOCKS :SB-SIMD-PACK :SB-SOURCE-LOCATIONS :SB-TEST :SB-UNICODE
 :SBCL :STACK-ALLOCATABLE-CLOSURES :STACK-ALLOCATABLE-FIXED-OBJECTS
 :STACK-ALLOCATABLE-LISTS :STACK-ALLOCATABLE-VECTORS
 :STACK-GROWS-DOWNWARD-NOT-UPWARD :SYMBOL-INFO-VOPS :UD2-BREAKPOINTS :UNIX
 :UNWIND-TO-FRAME-AND-CALL-VOP :X86-64)
--

Revision history for this message
Richard M Kreuter (kreuter) wrote :
Jan Moringen (scymtym)
Changed in sbcl:
assignee: nobody → Jan Moringen (scymtym)
importance: Undecided → High
status: New → Confirmed
Jan Moringen (scymtym)
Changed in sbcl:
assignee: Jan Moringen (scymtym) → nobody
status: Confirmed → Fix Committed
Changed in sbcl:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.