[Mono-list] Marshalling union crashes

Alan McGovern alan.mcgovern at gmail.com
Fri Jun 18 18:49:18 EDT 2010


Check sizeof (double) in native code on your platform which crashes  
and the one which succeeds. There could also be alignment issues which  
you are unaware of which are only manifesting under one platform.

Alan

On 18 Jun 2010, at 20:43, Jef Driesen <jefdriesen at hotmail.com> wrote:

> On 18/06/10 17:02, Robert Jordan wrote:
>> On 18.06.2010 16:55, Robert Jordan wrote:
>>> On 18.06.2010 16:14, Jef Driesen wrote:
>>>> On 18/06/10 15:27, Robert Jordan wrote:
>>>>> On 18.06.2010 13:27, Jef Driesen wrote:
>>>>>> This seems to work fine with MS .NET, but crashes under mono  
>>>>>> with the error:
>>>>>
>>>>> Which Mono version and architecture?
>>>>
>>>> $ mono --version
>>>> Mono JIT compiler version 2.4.4 (Debian 2.4.4~svn151842-1ubuntu4)
>>>> Copyright (C) 2002-2010 Novell, Inc and Contributors. www.mono-project.com
>>>>    TLS:           __thread
>>>>    GC:            Included Boehm (with typed GC)
>>>>    SIGSEGV:       altstack
>>>>    Notifications: epoll
>>>>    Architecture:  amd64
>>>>    Disabled:      none
>>>
>>> So it's a 64 bit Mono.
>>>
>>> On Linux/64, an "int" is 8 bytes wide, whereas your managed structs
>>> are assuming 4 bytes (a managed int is 4 bytes wide, regardless
>>> of the architecture).
>>
>> Oops, I got this wrong. This is only true for "long".
>> Please file a bug with a reproducible test case
>> at http://mono-project.com/Bugs
>
> Bug filed: https://bugzilla.novell.com/show_bug.cgi?id=615553
>
> _______________________________________________
> Mono-list maillist  -  Mono-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-list


More information about the Mono-list mailing list