Re: very elusive ml-build issue

John Reppy <[email protected]> Tue, 20 Feb 2007 12:43:49 -0600
Newsgroups gmane.comp.lang.sml.smlnj
Message-ID <[email protected]>
I tried to reproduce this problem on my PPC Mac, but wasn't able to
(I went up to 5000).

One thing that you might try is recompiling the runtime system with the
DEBUG_LITERALS flag:

	cd runtime/objs
	make clean
	make XDEFS="-DDEBUG_LITERALS" -f mk.x86-cygwin
	cp run.x86-cygwin ../../../bin/.run

This will cause a trace of the build-literals phase to
be dumped out.  I think that you can say @SMLdebug=out to
cause the output to go to the file out when you run the
ml-build command.

	- 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