[Mono-dev] Non Aligned Nurseries

Zoltan Varga vargaz at gmail.com
Fri Mar 19 08:25:38 EDT 2010


  A stack overflow at startup usually means there was a verification error
in one of the methods JITted at startup, the JIT tries to throw an
exception, but the exception ctor also contains a verification error,
leading to infinite recursion. Try running with

which will break at the site of the verification error.


On Fri, Mar 19, 2010 at 1:07 PM, Sanjoy Das
<sanjoy at playingwithpointers.com>wrote:

> Hi!
> I'm student who's getting started with hacking on the mono runtime
> (specifically on the SGen Garbage Collector). I was trying to patch up
> support for non-aligned nurseries and wrote up some code to generate the
> write barrier for the same (mentioned as a FIXME in sgen-gc.c). When I
> try to test the code I get a stack overflow error (gdb backtrace
> attached). Apparently, for some reason, the control jumps to the
> 'unverified:' label in 'mono_method_to_ir' and the entire thing crashes
> due to some memory access violation in a print routine. Since the
> backtrace does not show from _where_ the control jumped to 'unverified:'
> label, I'm pretty much clueless. Manually stepping through the code
> would be an option, I guess, but I really wish to avoid it in case
> something more streamlined is possible.
> Another thing I am curious about is how to go about testing / debugging
> the runtime. My current workflow consists of
> 1. Compiling the code (from mono/mono, since that's faster and I don't
> touch anything outside, thanks to Mark).
> 2. Run mono/mono/mini/mono with some test image (and remembering to set
> MONO_PATH accordingly).
> I initially intended to use some real software like Tomboy to test the
> runtime but decided against it because of all the dependencies. To test
> the above code, I wrote a toy program which allocates random amounts of
> memory. I've attached the source.
> Coming to the point, I was wondering if I could get some feedback on the
> following areas:
> a. How to go about testing / debugging the runtime? I've tried using
> valgrind and gdb to test the code, but could not make very good use of
> it (mostly because, as I said, I'm clueless about which GOTO is actually
> fired). Are there any specific tools I should be aware of?
> b. About the non-aligned nurseries - is *my* code causing problems or is
> the support for non-aligned nurseries generally incomplete? If the
> latter is true, I would love to get some pointers to where all work is
> required to get it working.
> I do understand that, at the moment, robust support for non-aligned
> nurseries is probably not required, but I figured it would be a good
> learning project.
> --
> Regards,
> Sanjoy Das
> http://playingwithpointers.com
> http://playingwithpointers.com/custom/public_key.txt
> _______________________________________________
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-devel-list
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-devel-list/attachments/20100319/e28b9575/attachment.html 

More information about the Mono-devel-list mailing list