[Mono-dev] Assertion failures when using Moq on Linux/ARM

Weeble clockworksaint at gmail.com
Thu Feb 17 03:09:15 EST 2011

(Sorry if this goes through twice. I sent it yesterday and it didn't
seem to appear on the list.)

On Mon, Feb 7, 2011 at 12:09 PM, Weeble <clockworksaint at gmail.com> wrote:
> I'm currently running Mono 2.6.7 on an ARM box (a Sheevaplug) running
> Linux. When I try to run unit tests that work on Windows-x86 with
> Microsoft's CLR and on Linux-x86 with Mono, they fail often (but not
> always) with an assertion:
> thunk failed for 0x40368c80 from 0x4f2a20d8
> ERROR:mini-arm.c:2579:handle_thunk: assertion failed: (pdata.found == 1)

I have been unable so far to extricate the native library to produce a
simple test case that reproduces this. However, I have now built Mono
2.8.2 from source for the ARM device and edited in some extra
diagnostic output in mini-arm.c. It would appear that the when the
failure happens, handle_thunk uses search_thunk_slot to search for an
appropriate thunk slot, but every thunk table it considers is too far
away from the address it wants to branch from. Every invocation of
search_thunk_slot thus takes an early return and cannot create a thunk
entry in any of them.

Is there someone I can talk to who is familiar with this code, and
could advise me on how to address the problem? I imagine I could pore
over mini-arm.c for long enough to understand how and when thunk
tables are allocated and then maybe I could figure out how to make
sure that when memory is allocated for emitting code into that if
there's no thunk table in range a new one is created, or something
like that. However, I think I'd fare a lot better under advice from
someone familiar with it. Is it rude just to directly email the
authors (Paolo Molaro, Dietmar Maurer) who are recorded in the file?



More information about the Mono-devel-list mailing list