FORMAT should not silently accept "~<~@>"
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
SBCL |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
What I do:
> (format nil "~<~@>")
What happens:
Returns ""
What I expected to happen:
Signals an error about the format string being invalid.
What I do:
> (compile nil (lambda () (format nil "~<~@>")))
What happens:
Compiles without warnings or errors.
What I expected to happen:
Signals a warning or an error about the format string being invalid.
Clisp and ECL accept this format string sliently.
CCL signals an error for this format string:
$ opt/ccl/lx86cl -e '(format nil "~<~@>")'
> Error:
> Atsign flag not allowed
> "~<~@>"
> ^
>
> While executing: CCL::DO-SUB-FORMAT, in process listener(1).
> Type :GO to continue, :POP to abort, :R for a list of available restarts.
> If continued: Skip evaluation of (format nil "~<~@>")
> Type :? for other options.
1 >
$ sbcl --version
SBCL 1.1.5
$ uname -a
Linux ferberit 3.5.0-25-generic #38-Ubuntu SMP Mon Feb 18 23:28:26 UTC 2013 i686 i686 i686 GNU/Linux
$ sbcl --eval '(print *features*)' --quit
(:QUICKLISP :SB-BSD-
:ALIEN-CALLBACKS :ANSI-CL :C-STACK-
:COMPARE-
:INLINE-CONSTANTS :LARGEFILE :LINKAGE-TABLE :LINUX :LITTLE-ENDIAN
:MEMORY-
:OS-PROVIDES-
:OS-PROVIDES-POLL :OS-PROVIDES-PUTWC :OS-PROVIDES-
:PACKAGE-
:SB-EVAL :SB-FUTEX :SB-LDB :SB-PACKAGE-LOCKS :SB-SAFEPOINT
:SB-SOURCE-
:STACK-
:STACK-
:STACK-
Changed in sbcl: | |
status: | Fix Committed → Fix Released |
The attached patch causes the above FORMAT directive to signal an error when interpreted or compiled. A test case is included.