[racket-dev] Odd bug with begin0 and call-with-values

From: Matthew Flatt (mflatt at cs.utah.edu)
Date: Mon Nov 5 17:25:57 EST 2012

This looks like the sort of thing that I could have broken over the
weekend. I'm not able to construct an example from just this
information, so even a large amount of code may be useful.

At Mon, 5 Nov 2012 16:46:29 -0500 (EST), "J. Ian Johnson" wrote:
> Code that used to work is now failing with a pull of the master today. I can't 
> reproduce it in small amounts of code, which makes me think it's another weird 
> JIT problem.
> 
> I have a harness of this kind:
> (define (print-values . vs) (for ([v vs]) (display v) (newline)))
>  (with-limits 3600 4096 (call-with-values (lambda () (begin0 (time (analysis 
> program)) (dump-memory-stats))) print-values)
> 
> The dump is not reached. Instead, (analysis program) finishes with the expected 
> number of values, and once those values pass out of the expression, I get an 
> error of the following kind:
> exn:fail:contract:arity
> 
> It expects 1 value instead of the arbitrary amount it should expect for the 
> print-values.
> I can supply a large amount of code that exercises this behavior, but if this 
> is enough to go off, great.
> Thanks,
> -Ian
> _________________________
>   Racket Developers list:
>   http://lists.racket-lang.org/dev

Posted on the dev mailing list.