[Mono-dev] Marshalling: Bug in StructLayout?

Paolo Molaro lupus at ximian.com
Mon Aug 20 04:16:08 EDT 2007


On 08/18/07 Zoltan Varga wrote:
>   This is indeed a mono bug. We align structures smaller than sizeof(void*) to
> sizeof(void*) because the JIT memcpy/memset routines require it. So your
> AVRational struct has an min alignment of 8 bytes. The workaround for now is to
> declare AVRational as having explicit layout.

This hack should be enabled only on the architectures that have broken
alignment handling like sparc and arm (and eventually the issue with the
memcpy alignment for those archs need fixing).

lupus

-- 
-----------------------------------------------------------------
lupus at debian.org                                     debian/rules
lupus at ximian.com                             Monkeys do it better



More information about the Mono-devel-list mailing list