[racket-dev] error with futures and the compiler

From: Sam Tobin-Hochstadt (samth at ccs.neu.edu)
Date: Tue Sep 20 17:57:01 EDT 2011

Here's a rather smaller version, with the same error:

#lang racket/base

(require racket/future racket/flonum racket/fixnum
         racket/cmdline)

(define N (command-line #:args (n) (string->number n)))


(define (M Ci)
  (let loop ([Zr 0.0])
    (fl+ 0. Ci)
    (loop 0.0)))

(for ([y N])
  (future
   (λ ()
     (let loop-x ()
       (fx< 0 N)
       (M 1.1)
       (loop-x)))))


On Tue, Sep 20, 2011 at 5:36 PM, Sam Tobin-Hochstadt <samth at ccs.neu.edu> wrote:
> Removing the unsafe operations doesn't change the error.
>
> On Tue, Sep 20, 2011 at 5:29 PM, Robby Findler
> <robby at eecs.northwestern.edu> wrote:
>> Are the unsafe operations ever misapplied?
>>
>> Robby
>>
>> On Tue, Sep 20, 2011 at 4:27 PM, Sam Tobin-Hochstadt <samth at ccs.neu.edu> wrote:
>>> The attached program works fine, and if compiled, it works fine with
>>> small inputs:
>>>
>>> [samth at punge] r tst.rkt 40 > /dev/null
>>> [samth at punge] r tst.rkt 4000 > /dev/null
>>> [samth at punge] raco make tst.rkt
>>> [samth at punge] r tst.rkt 40 > /dev/null
>>>
>>> But with big inputs, when compiled, it fails:
>>>
>>> [samth at punge] r tst.rkt 4000 > /dev/null
>>> compiled/tst_rkt.zo::6943: read (compiled): ill-formed code
>>> [../../../racket/gc2/../src/read.c:4751]
>>>
>>>  === context ===
>>> raise called (with non-exception value) by exception handler: #f;
>>> original exception raised: compiled/tst_rkt.zo::6943: read (compiled):
>>> ill-formed code [../../../racket/gc2/../src/read.c:4751]
>>> internal error: failure during atomic
>>> Aborted
>>> --
>>> sam th
>>> samth at ccs.neu.edu
>>>
>>> _________________________________________________
>>>  For list-related administrative tasks:
>>>  http://lists.racket-lang.org/listinfo/dev
>>>
>>
>
>
>
> --
> sam th
> samth at ccs.neu.edu
>



-- 
sam th
samth at ccs.neu.edu



Posted on the dev mailing list.