[MLton] Bug Report -- Stack corruption

Daniel C. Wang danwang@CS.Princeton.EDU
Sat, 26 Feb 2005 22:01:08 -0500


I'm curious as to how this bug was uncovered. If a particular program 
failed. It would be nice to add it to the set of regression tests.

Stephen Weeks wrote:
>>Function "mkstemp" in mlton/runtime/platform/mingw.c corrupts its own stack.
> 
> ...
> 
>>The last line above writes at templ[4], one past the end since the char array
>>only has size 4.
> 
> 
> Thanks for the bug report.  I've checked in a fix.  Here's the new
> code.
>