[asdf-devel] Possible problem with check-compile-results
Faré
fahree at gmail.com
Sat Aug 24 02:44:10 UTC 2013
That sounds like a problem with Babel and/or a library it uses — and
indeed reminds me of a previous bug in Alexandria — is your Alexandria
up to date? It's using a symbol as a format string, which happens to
work on some implementations at some (un)safety levels.
—♯ƒ • François-René ÐVB Rideau •Reflection&Cybernethics• http://fare.tunes.org
Don't expect coherence from a loosely-defined group of people. Even
individuals have trouble with coherence. Argue issues. Change incentives.
On Fri, Aug 23, 2013 at 8:40 PM, Robert Goldman <rpgoldman at sift.net> wrote:
> I would be grateful if someone could confirm this for me.
>
> I see this in quickloading BABEL on a relatively recent SBCL
> 1.1.7.112.master.104-d62278d
>
> Babel crashes on compiling:
>
> caught ERROR:
> ; (during macroexpansion of (DEFINE-UCS :UCS-2LE ...))
> ; #:~A-CODE-POINT-COUNTER fell through ETYPECASE expression.
> ; Wanted one of (STRING SIMPLE-STRING).
>
> ; in: DEFINE-UCS :UCS-2BE
> ; (BABEL-ENCODINGS::DEFINE-UCS :UCS-2BE 2 :BE 65536)
>
> After that, some logic in UIOP'S CHECK-LISP-COMPILE-RESULTS goes
> pear-shaped.
>
> I believe the problem starts here:
>
> (with-upgradability ()
> (defmacro define-convenience-action-methods
> (function formals &key if-no-operation if-no-component
> operation-initargs)
> (let* ((rest (gensym "REST"))
> (found (gensym "FOUND"))
> (keyp (equal (last formals) '(&key)))
> (formals-no-key (if keyp (butlast formals) formals))
> (len (length formals-no-key))
> (operation 'operation)
> (component 'component)
> (opix (position operation formals))
> (coix (position component formals))
> (prefix (subseq formals 0 opix))
> (suffix (subseq formals (1+ coix) len))
> (more-args (when keyp `(&rest ,rest &key &allow-other-keys))))
> (assert (and (integerp opix) (integerp coix) (= coix (1+ opix))))
> (flet ((next-method (o c)
> (if keyp
> `(apply ',function , at prefix ,o ,c , at suffix ,rest)
> `(,function , at prefix ,o ,c , at suffix))))
> `(progn
> (defmethod ,function (, at prefix (,operation symbol) component
> , at suffix , at more-args)
> (if ,operation
> ,(next-method
> (if operation-initargs ;backward-compatibility with
> ASDF1's operate. Yuck.
> `(apply 'make-operation ,operation
> :original-initargs ,rest ,rest)
> `(make-operation ,operation))
> `(or (find-component () ,component) ,if-no-component))
> ,if-no-operation))
> (defmethod ,function (, at prefix (,operation operation)
> ,component , at suffix , at more-args)
> (if (typep ,component 'component)
> (error "No defined method for ~S on
> ~/asdf-action:format-action/"
> ',function (cons ,operation ,component))
> (if-let (,found (find-component () ,component))
> ,(next-method operation found)
> ,if-no-component))))))))
>
>
> The ERROR created here, with its embedded funcall to
> ASDF-ACTION:FORMAT-ACTION seems to do something bad when the format
> string is repackaged in UIOP/LISP-BUILD:CHECK-LISP-COMPILE-RESULTS:
>
> (unless output
> (error 'compile-file-error :context-format context-format
> :context-arguments context-arguments))
>
> possibly in this REPORT-FUNCTION:
>
> (:report (lambda (c s)
> (format s (compatfmt "~@<~A~@[ while ~?~]~@:>")
> (or (compile-condition-description c) (type-of c))
> (compile-condition-context-format c)
> (compile-condition-context-arguments c)))))
>
> I am not particularly adept in the SBCL debugger wrapped by SLDB,
> especially where one of these
> error-wrapped-in-error-wrapped-in-ASDF-wrapped-in-quicklisp contexts, so
> I would be grateful if someone would try to replicate this (try a clean
> QL install of BABEL).
>
> Note that the error comes with SBCL's built-in ASDF, not bleeding-edge ASDF.
>
> Thanks!
> r
>
> --
> Robert P. Goldman
> Principal Scientist
> Smart Information Flow Technologies (d/b/a SIFT, LLC)
>
> 211 N. First St., Suite 300
> Minneapolis, MN 55401
>
> Voice: (612) 326-3934
> Email: rpgoldman at SIFT.net
>
>
More information about the asdf-devel
mailing list