(apply format #t "not ok 4 - ~A" X) is a format error because "apply" splices its last list argument into the preceding argument list, so you're getting
(format #t "not ok 4 - ~A" 0 1 2 3).  Since the error is not caught, the
repl does not try to handle it cleanly, but just prints out the various
arguments.  Normally you'd do something like (apply format #t info) in
catch:

(catch #t
  (lambda ()
    (apply format #t "values4: ~A" (list 0 1 2 3)))
  (lambda (type info)
    (apply format #t info)))

which prints "format: "values4: ~A" 0 1 2 3
                                ^: too many arguments"

(apply format #t "values4: ~A" (values4)) gets a complaint that apply's
last argument should be a list. I'm not sure of the context, but I don't
get a segfault.  In the last case, the control string is not terminated,
I think, so strlen returns some garbage for its length. I can't get this
to happen in a repl.

_______________________________________________
Cmdist mailing list
[email protected]
https://cm-mail.stanford.edu/mailman/listinfo/cmdist

Reply via email to