Re: very elusive ml-build issue

John Reppy <[email protected]> Mon, 19 Feb 2007 23:40:45 -0600
Newsgroups gmane.comp.lang.sml.smlnj
Message-ID <[email protected]>
So a possible theory is that the back-trace mechanism is greatly  
inflating the
size of the literal pool, which is overloading the BuildLiterals  
code.  Has
anyone reproduced this problem on another system?

	- John

On Feb 19, 2007, at 7:38 PM, Dave Herman wrote:

>>     % ./codegen.pl 1500 > main.sml
>>     % ml-build test.cm Main.main test.heap
>
> Update: the bug still exists in the current svn sources, but I had to
> increase the test size a bit. I reproduced the bug with:
>
>      % ./codegen.pl 2000 > main.sml
>      % ml-build -Ctdp.instrument=true \$smlnj-tdp/back-trace.cm  
> test.cm
> Main.main test.heap
>
> I've also been instrumenting the runtime; the problem occurs within
> LoadBinFile in base/runtime/kernel/boot.c. Running the above test on
> WinXP/Cygwin, I observed this behavior:
>
>      boot.c:492   thisSzB == 201879 (relatively large, but not huge)
>      boot.c:493   dataObj successfully allocated
>      boot.c:496   calls SaveCState
>        - msp->ml_calleeSave[0] gets mutated
>        - had OBJ_LEN 1, now has OBJ_LEN 2
>      boot.c:497   calls BuildLiterals
>        - msp->ml_calleeSave[0] is trashed -- now has OBJ_LEN 16758485!
>      boot.c:499   calls RestoreCState -- never returns
>
> So something in between the SaveCState and RestoreCState is going  
> wrong
> and causing RestoreCState to crash.
>
> Dave
>
> ---------------------------------------------------------------------- 
> ---
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to  
> share your
> opinions on IT & business topics through brief surveys-and earn cash
> http://www.techsay.com/default.php? 
> page=join.php&p=sourceforge&CID=DEVDEV
> _______________________________________________
> Smlnj-list mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/smlnj-list
>


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV