[Mono-dev] [PATCH] mono_gc_base_init not called with --debug

Sanjoy Das sanjoy at playingwithpointers.com
Tue Mar 30 03:46:21 EDT 2010


When we start the JIT with --debug, mono_gc_base_init is not called
before 'mono_gc_register_root' is called. This causes incorrect behavior
if mono_gc_base_init changes some of the global variables (pagesize for
instance). This patch corrects this.

Here is the (cleaned up) backtrace of mono_register_root being called:

mono_gc_register_root at sgen-gc.c:5509
mono_debugger_initialize at mono-debug-debugger.c:84
mono_debug_init at mono-debug.c:234
mono_main at driver.c:1641
main at main.c:34

I put the mono_gc_base_init in mono_debug_init and not in mono_main
since the latter ensures the problem is solved only when mono_debug_init
is called from mono_main and not from other places (like 'interp.c
[main_thread_handler > mono_main])'.

-- 
Regards,

Sanjoy Das
http://playingwithpointers.com
http://playingwithpointers.com/custom/public_key.txt
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patchfile
Type: text/x-patch
Size: 389 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/mono-devel-list/attachments/20100330/cba47a3a/attachment.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
Url : http://lists.ximian.com/pipermail/mono-devel-list/attachments/20100330/cba47a3a/attachment-0001.bin 


More information about the Mono-devel-list mailing list