Opened 2 years ago

Last modified 2 weeks ago

#391 accepted defect

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

Reported by: mevenson Owned by: mevenson
Priority: critical Milestone: 1.6.0
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 #\*?

Subtickets (add)

Change History (9)

comment:1 follow-up: Changed 2 years ago by 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.

comment:2 Changed 22 months ago by mevenson

  • Milestone changed from 1.3.3 to 1.4.0

comment:3 Changed 9 months ago by mevenson

  • Milestone changed from 1.4.0 to 1.5.0

Ticket retargeted after milestone closed

comment:4 in reply to: ↑ 1 Changed 7 months ago by mevenson

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 7 months ago by mevenson

  • Keywords cl:directory added
  • Milestone changed from 1.5.0 to 1.4.1
  • Resolution set to fixed
  • Status changed from new to closed
  • Version set to 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 7 months ago by mevenson

  • Resolution fixed deleted
  • Status changed from closed to reopened

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 4 months ago by mevenson

  • Milestone changed from 1.4.1 to 1.5.0

Ticket retargeted after milestone closed

comment:8 Changed 2 months ago by mevenson

  • Owner set to mevenson
  • Priority changed from major to critical
  • Status changed from reopened to accepted

comment:9 Changed 2 weeks ago by mevenson

  • Milestone changed from 1.5.0 to 1.6.0

Ticket retargeted after milestone closed

Note: See TracTickets for help on using tickets.