[plt-scheme] read (compiled): ill-formed code

From: Matthew Flatt (mflatt at cs.utah.edu)
Date: Tue Mar 23 17:41:28 EDT 2010

I think this must be a bug in the compiler, bytecode marshaler,
bytecode reader, or bytecode validator. Can you send me instructions to
replicate the bug?

At Tue, 23 Mar 2010 21:07:52 +0000, Noel Welsh wrote:
> I managed to get the following error from some code:
> 
> UNKNOWN: read (compiled): ill-formed code
> [../../../mzscheme/gc2/../src/eval.c:11632]
> 
>  === context ===
> /Users/noel/programming/bayesian-scan-matching/scan-match.ss:95:0:
> scan-match/best
> /Users/noel/programming/plt-trunk/collects/scheme/contract/private/arrow.ss:143
> 7:3
> /Users/noel/Library/PLT
> Scheme/planet/300/4.2.5.1/cache/schematics/schemeunit.plt/3/4/result.ss:100:3
> /Users/noel/Library/PLT
> Scheme/planet/300/4.2.5.1/cache/schematics/schemeunit.plt/3/4/test-suite.ss:28:
> 2
> the-tests
> /Users/noel/Library/PLT
> Scheme/planet/300/4.2.5.1/cache/schematics/schemeunit.plt/3/4/test-suite.ss:60:
> 0:
> apply-test-suite
> the-tests
> /Users/noel/Library/PLT
> Scheme/planet/300/4.2.5.1/cache/schematics/schemeunit.plt/3/4/test-suite.ss:60:
> 0:
> apply-test-suite
> /Users/noel/Library/PLT
> Scheme/planet/300/4.2.5.1/cache/schematics/schemeunit.plt/3/4/text-ui.ss:226:0:
> run-tests
> /Users/noel/Library/PLT
> Scheme/planet/300/4.2.5.1/cache/schematics/sake.plt/1/0/actions.ss:9:0:
> test
> /Users/noel/programming/plt-trunk/collects/scheme/private/map.ss:45:11: 
> for-each
> /Users/noel/Library/PLT
> Scheme/planet/300/4.2.5.1/cache/schematics/sake.plt/1/0/sake.ss:
> [running body]
> 
> 
> I've just been modifying some Typed Scheme code to use unsafe ops.
> This is in 4.2.5.1. The C code in question is:
> 
>   if (typed_arg) {
>     if ((proc_with_refs_ok != 1)
>         && !argument_to_arity_error(app_rator, proc_with_refs_ok))
>       scheme_ill_formed_code(port);
>   }
> 
> I'll look for obvious errors. If anyone can explain the above code
> that would help. I can put the code online if that's useful. The error
> is reproducible.
> 
> Ta,
> N.



Posted on the users mailing list.