#p"\\\\" gives SB-KERNEL:BOUNDING-INDICES-BAD-ERROR
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
SBCL |
Fix Released
|
Undecided
|
Alastair Bridgewater |
Bug Description
0] #p"\\\\"
debugger invoked on a SB-KERNEL:
The bounding indices 3 and 2 are bad for a sequence of length 2.
See also:
The ANSI Standard, Glossary entry for "bounding index designator"
The ANSI Standard, writeup for Issue SUBSEQ-
Type HELP for debugger help, or (SB-EXT:QUIT) to exit from SBCL.
restarts (invokable by number or by possibly-
0: [ABORT] Exit debugger, returning to top level.
(SB-INT:
0[2] backtrace
0: (SB-INT:
1: (SB-KERNEL:
#\\
"\\\\"
NIL
3
2
#<FUNCTION IDENTITY>
#<FUNCTION EQL>)
2: (SB-IMPL:
3: (SB-IMPL:
4: (SB-IMPL:
"\\\\"
NIL
#P"
0
NIL
NIL)
5: (PARSE-NAMESTRING
"\\\\"
NIL
#P"
:START
0
:END
NIL
:JUNK-ALLOWED
NIL)
6: (SB-IMPL:
#<SYNONYM-
NIL
(NIL)
T)
description: | updated |
summary: |
- (PATHNAME-NAME "\\\\") gives SB-KERNEL:BOUNDING-INDICES-BAD-ERROR + #p"\\\\" gives SB-KERNEL:BOUNDING-INDICES-BAD-ERROR |
Changed in sbcl: | |
status: | Fix Committed → Fix Released |
Confirmed on 1.0.32.28 Win32.
The second branch of the COND in EXTRACT-DEVICE (src;code; win32-pathname. lisp) calls POSITION passing (+ START 3) as the start but only verifies (>= END (+ START 2)), causing an error for the specific case of (extract-device "\\\\").
Adding a test that there are at least three characters in the range to the AND in the test for the branch in question is sufficient to cause the function to indicate that there is no device component.
After this change, we have:
* (describe #p"\\\\")
#P"\\" object]
[structure-
Slots with :INSTANCE allocation: :WIN32- HOST {22423411}>
HOST = #<SB-IMPL:
DEVICE = NIL
DIRECTORY = (:ABSOLUTE)
NAME = NIL
TYPE = NIL
VERSION = NIL
, which is presumably correct.