[MLton] Possible bug in MLton-7230.msi for MinGW and 64 bit questions

Wesley W. Terpstra wesley at terpstra.ca
Mon Nov 2 18:28:44 PST 2009


On Tue, Nov 3, 2009 at 3:00 AM, David Hansel
<hansel at reactive-systems.com> wrote:
> While most of our ML code appears to work fine,  we do have a
> problem with one (rather large) module.  When compiled using the
> native code-generator, the resulting executable will crash on startup.

That could be caused by a lot of things.

> However,  when compiled with the "C" code-generator the executable
> works without problems.  The other parts of our code work fine for
> both native and "C" code-generators.  We will try to break up the
> module to see if we can narrow down the offending code.

If you narrow it down to something that looks like a MLton bug, please
post a test-case demonstrating the problem. Win64 does have a
"special" ABI, so it is possible there is an incorrect corner case in
MLton.

> Do you have any other suggestions on how to debug a problem like this?

Supposing it's not MLton, I'd look closely at your C types. The sizes
of of variables in C may have changed in a way that causes them to no
longer match up to the 32-bit assumptions made on the SML side of your
code.

> Are there any (rough) estimates about the runtime performance penalty for
> using the C code generator?

This depends heavily on the application. Sometimes the C-codegen can
even be faster. Sometimes it can be much slower.



More information about the MLton mailing list