[racket] I think I found a bug in the JITC

From: Erik Dominikus (erik.dominikus71 at gmail.com)
Date: Mon Jan 30 09:21:57 EST 2012

Source code for reproducing attached.
'racket --version' shows 5.2.
I built from source.

The expected result is a list, but Racket gave this error message

internal error: flonum position not found

 === context ===
/home/erik/scheme/bug.rkt:12:0: for-loop
/home/erik/scheme/bug.rkt: [running body]

and upon seeing that message for the first time, I was dumbstruck. I was
quite sure that I made no transgression since I was using the library
normally as documented, so I took 'internal error' as a bug. After
tracing the error message to line 656 of the file
src/racket/src/jitstate.c, I thought the bug is in the JITC. It turns
out that disabling the JITC (racket -j) produces the expected result, so
I'm somewhat more sure that the bug is in the JITC.

In advance, I'd like to thank the people who will fix this bug, if it is
really a bug.

-------------- next part --------------
#lang racket/base


(define (function->stream f)
  (let s ((t 0.0))
    (stream-cons (f t) (s (fl+ t 1.0)))))

(for/list ((i (in-range 10))
           (x (in-stream (function->stream identity))))

Posted on the users mailing list.