[Mono-dev] SEGV in runtime related to GC

Thong Nguyen tum at veridicus.com
Mon Feb 13 15:23:37 EST 2006


I've been getting some memory corruption running an application after the GC
runs.  I've tracked it down to the allocation of primitive arrays (in
metadata/object.c) using GC_ALLOC_ATOMIC (or the mono equivalent).  Now,
theoretically it should be fine, but changing it to a normal GC_ALLOC seems
to fix (or maybe hide) the issue.

Calling GetType() on an object of type A might return type ArrayList for
example so vtable corruption eventually causes mono to crash.

Do mono objects contain links to any GC allocated memory?  A primitive array
might not contain any managed references but the object header *may* contain
some pointers.  I know at one point mono objects used to heap allocate
object monitors but that doesn't appear to be the case anymore so that
doesn't appear to be the issue...

Any ideas?



More information about the Mono-devel-list mailing list