[Mono-dev] Issues with StructureToPtr- and PtrToStructure-wrapper building

Robert Jordan robertj at gmx.net
Tue Feb 8 11:59:00 EST 2011


On 08.02.2011 15:30, Martin Däumler wrote:
> On 08.02.11 11:31, Robert Jordan wrote:
>> On 08.02.2011 10:51, Martin Däumler wrote:
>> [...]
>>> So, my question is: Which classes and structs allow the generation
>>> of StructureToPtr- and PtrToStructure-wrappers at all and how to
>>> determine these?
>> You may want to check the MonoClass.blittable field before
>> compiling a wrapper for a given type, but I'm sure it's enough.
> Hello Robert,
> thank you for that answer! The wrappers can be generated for some
> classes where the blittable field is not set, e.g.,
> 'System.ExecutionEngineException'. However, Mono seems to have
> a problem with class members that are arrays and have an unknown
> size. Please look at the appended test case. Mono (2.8.2 and 2.6.1
> on x86/Linux, 2.8 on MacOS X) receives a SIGABRT and terminates
> while .NET on Win7 works fine.

This works only by accident. Remove the first array (int[] control)
and watch how MS crashes with an AccessViolationException.


More information about the Mono-devel-list mailing list