Opened 9 years ago

Last modified 17 months ago

#391 accepted defect

"bad place for a wild pathname" on EXT:PROBE-DIRECTORY for NAME containing #\*

Reported by: Mark Evenson Owned by: Mark Evenson
Priority: critical Milestone: 1.9.3
Component: interpreter Version: 1.5.0-dev
Keywords: cl:probe-file ext:probe-directory cl:directory Cc:
Parent Tickets:

Description

John Pallister on #abcl reported problems with configuring ASDF via (asdf:initialize-source-registry '(:source-registry (:tree (:home "src/synchromesh")) :inherit-configuration)) for which he later traced down to problems with a pathname NAME containing a #\* character:

<synchromesh> Ooh, that's interesting - EXTENSIONS:PROBE-DIRECTORY has found a filename in the specified directory tree that contains a "*".
<synchromesh> Then (much deeper) org.armedbear.lisp.probe_file$pf_probe_directory.execute(probe_file.java:88) throws the error.   

The exact error cases here still needs to be determined.

TBD: What does it mean to PROBE-{DIRECTORY,FILE} on a PATHNAME containing #\*?

Change History (21)

comment:1 Changed 9 years ago by Mark Evenson

From discussion in #lisp, it seems that PROBE-FILE cannot accept pathname designators which contain wildcards, so the #\* character should be treated as a literal #\* in our PROBE-{FILE,DIRECTORY} implementations.

comment:2 Changed 9 years ago by Mark Evenson

Milestone: 1.3.31.4.0

comment:3 Changed 8 years ago by Mark Evenson

Milestone: 1.4.01.5.0

Ticket retargeted after milestone closed

comment:4 in reply to:  1 Changed 8 years ago by Mark Evenson

Replying to mevenson:

From discussion in #lisp, it seems that PROBE-FILE cannot accept pathname designators which contain wildcards, so the #\* character should be treated as a literal #\* in our PROBE-{FILE,DIRECTORY} implementations.

The problem lies in that ABCL "overloads" the meaning of #\* characters in PATHNAME objects as both designating a wildcard for a string of zero or more characters, as well as a literal #\* object.

Surveying alisp, sbcl, and ccl reveal different strategies for dealing with this.

For alisp, #p"foo*" is not WILD-PATHNAME-P true.

sbcl replaces pathnames with wildcards with explicit objects

CL-USER> (describe #p"/tmp/foo*")
#P"/tmp/foo*"
  [structure-object]

Slots with :INSTANCE allocation:
  HOST       = #<SB-IMPL::UNIX-HOST {1000FDEC23}>
  DEVICE     = NIL
  DIRECTORY  = (:ABSOLUTE "tmp")
  NAME       = #<SB-IMPL::PATTERN "foo" :MULTI-CHAR-WILD>
  TYPE       = NIL
  VERSION    = :NEWEST
; No value

Lots of factors to consider here. Need to summarize issues more succinctly.

comment:5 Changed 8 years ago by Mark Evenson

Keywords: cl:directory added
Milestone: 1.5.01.4.1
Resolution: fixed
Status: newclosed
Version: 1.5.0-dev

Directory entries with asterisk characters no longer cause errors. Ambiguities remain for what an asterisk character means for various parts of our CL:PATHNAME implementation

comment:6 Changed 8 years ago by Mark Evenson

Resolution: fixed
Status: closedreopened

Apparently not addressed.

Recipe for failure.

1) Create a file with asterisk characters in a directory that ASDF will search

2) Attempt to load Quicklisp

CL-USER(1): (asdf:load-system :quicklisp-abcl)
#<THREAD "interpreter" {73C28A4A}>: Debugger invoked on condition of type FILE-ERROR
  Bad place for a wild pathname.
Restarts:
  0: RETRY                         Retry ASDF operation.
  1: CLEAR-CONFIGURATION-AND-RETRY Retry ASDF operation after resetting the configuration.
  2: TOP-LEVEL                     Return to top level.

[1] CL-USER(3): :bt 50

  0: (SYSTEM:BACKTRACE)
  1: (INVOKE-DEBUGGER #<FILE-ERROR {7A02CBCD}>)
  2: org.armedbear.lisp.Lisp.error(Lisp.java:382)
  3: org.armedbear.lisp.probe_file$pf_probe_directory.execute(probe_file.java:88)
  4: org.armedbear.lisp.Symbol.execute(Symbol.java:803)
  5: org.armedbear.lisp.LispThread.execute(LispThread.java:814)
  6: org.armedbear.lisp.asdf_252.execute(asdf.lisp:2862)
  7: org.armedbear.lisp.Symbol.execute(Symbol.java:803)
  8: org.armedbear.lisp.LispThread.execute(LispThread.java:814)
  9: org.armedbear.lisp.asdf_254.execute(asdf.lisp:2862)
 10: org.armedbear.lisp.Symbol.execute(Symbol.java:838)
 11: org.armedbear.lisp.LispThread.execute(LispThread.java:872)
 12: org.armedbear.lisp.asdf_1611.execute(asdf.lisp:11614)
 13: org.armedbear.lisp.CompiledClosure.execute(CompiledClosure.java:150)
 14: org.armedbear.lisp.Symbol.execute(Symbol.java:852)
 15: org.armedbear.lisp.LispThread.execute(LispThread.java:894)
 16: org.armedbear.lisp.asdf_1621.execute(asdf.lisp:11614)
 17: org.armedbear.lisp.CompiledClosure.execute(CompiledClosure.java:185)
 18: org.armedbear.lisp.Symbol.execute(Symbol.java:883)
 19: org.armedbear.lisp.LispThread.execute(LispThread.java:943)
 20: org.armedbear.lisp.asdf_1648.execute(asdf.lisp:11614)
 21: org.armedbear.lisp.CompiledClosure.execute(CompiledClosure.java:98)
 22: org.armedbear.lisp.Symbol.execute(Symbol.java:803)
 23: org.armedbear.lisp.LispThread.execute(LispThread.java:814)
 24: org.armedbear.lisp.asdf_1650.execute(asdf.lisp:11614)
 25: org.armedbear.lisp.CompiledClosure.execute(CompiledClosure.java:98)
 26: org.armedbear.lisp.Symbol.execute(Symbol.java:803)
 27: org.armedbear.lisp.LispThread.execute(LispThread.java:814)
 28: org.armedbear.lisp.asdf_1651.execute(asdf.lisp:11614)
 29: org.armedbear.lisp.CompiledClosure.execute(CompiledClosure.java:89)
 30: org.armedbear.lisp.Symbol.execute(Symbol.java:793)
 31: org.armedbear.lisp.LispThread.execute(LispThread.java:798)
 32: org.armedbear.lisp.asdf_1652.execute(asdf.lisp:11614)
 33: org.armedbear.lisp.Symbol.execute(Symbol.java:803)
 34: org.armedbear.lisp.LispThread.execute(LispThread.java:814)
 35: org.armedbear.lisp.asdf_819.execute(asdf.lisp:7967)
 36: org.armedbear.lisp.LispThread.execute(LispThread.java:814)
 37: org.armedbear.lisp.Primitives$pf_apply.execute(Primitives.java:2794)
 38: (PROBE-DIRECTORY #P"/Users/evenson/work/abcl/xx*xx")
 39: (UIOP/FILESYSTEM:SUBDIRECTORIES #P"/Users/evenson/work/abcl/")
 40: (UIOP/FILESYSTEM:COLLECT-SUB*DIRECTORIES

comment:7 Changed 8 years ago by Mark Evenson

Milestone: 1.4.11.5.0

Ticket retargeted after milestone closed

comment:8 Changed 8 years ago by Mark Evenson

Owner: set to Mark Evenson
Priority: majorcritical
Status: reopenedaccepted

comment:9 Changed 7 years ago by Mark Evenson

Milestone: 1.5.01.6.0

Ticket retargeted after milestone closed

comment:10 Changed 5 years ago by Mark Evenson

Milestone: 1.6.01.6.1

Ticket retargeted after milestone closed

comment:11 Changed 5 years ago by Mark Evenson

Milestone: 1.6.11.6.2

Ticket retargeted after milestone closed

comment:12 Changed 4 years ago by Mark Evenson

Milestone: 1.6.21.7.0

comment:13 Changed 4 years ago by Mark Evenson

Milestone: 1.7.01.7.1

Ticket retargeted after milestone closed

comment:14 Changed 4 years ago by Mark Evenson

Milestone: 1.7.11.7.2

Ticket retargeted after milestone closed

comment:15 Changed 4 years ago by Mark Evenson

Milestone: 1.7.21.8.0

Milestone renamed

comment:16 Changed 4 years ago by Mark Evenson

Milestone: 1.8.01.8.1

Ticket retargeted after milestone closed

comment:17 Changed 3 years ago by Mark Evenson

Don Morrison notes in <https://mailman.common-lisp.net/pipermail/armedbear-devel/2021-May/004197.html>

I don’t think I have the ability to comment on bugs in the issue tracker, or, if I do, I’ve not figured out how to do it. I hope sending mail to this list for the purpose is acceptable; apologies if not.

I note that #391 was opened six years ago, but remains unfixed, and, apart from apparently being pushed off from release to release, seems not to have received any love for four years.

I just wanted to add a note to it that it is still being encountered in the wild, and is, at least in one user’s case, causing some pain. File names containing asterisks may not be a good idea, but sometimes we have no control over the names of files we are given.

It also means at least one (uiop:subdirectories), and probably many, UIOP functions sometimes fail in what can appear to be mysterious ways on ABCL, but not other implementations. 

comment:18 Changed 3 years ago by Mark Evenson

Milestone: 1.8.11.9.0

comment:19 Changed 22 months ago by Mark Evenson

Milestone: 1.9.01.9.1

comment:20 Changed 21 months ago by Mark Evenson

Milestone: 1.9.11.9.2

comment:21 Changed 17 months ago by Mark Evenson

Milestone: 1.9.21.9.3
Note: See TracTickets for help on using tickets.