[MLton] Cygwin, file open, and reserveEsp
Tue, 23 Dec 2003 22:19:23 -0800
> But, I'm guessing that Steve did an strace to find the failing
> system call, so the code up to that point is working. Can we figure
> out what error is set?
The failing system call is open
-1 = Posix_FileSys_open (/tmp/package-mlton-cygwin/build/lib/world.mlton, 0x00010601, 0x000001b6)
The resulting errno is EFAULT, and the message is "Bad address". The
problem is definitely not the string, however, since I have tried
hardwiring in a static string constant and it fails in exactly the
same way. I have also tried making the same open call earlier in the
processing, and it works fine. Although, I didn't do a binary search
to find out exactly when things change from good to bad, with self
compiles being so slow and all.
So, the only explanation I have is that we are corrupting the stack,
making a bad C call, or Cygwin is buggy in some other way.