[Mono-bugs] [Bug 615553] New: Marshalling a union results in a crash

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Fri Jun 18 14:41:36 EDT 2010


http://bugzilla.novell.com/show_bug.cgi?id=615553

http://bugzilla.novell.com/show_bug.cgi?id=615553#c0


           Summary: Marshalling a union results in a crash
    Classification: Mono
           Product: Mono: Runtime
           Version: 2.4.x
          Platform: x86-64
        OS/Version: Ubuntu
            Status: NEW
          Severity: Critical
          Priority: P5 - None
         Component: interop
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: jefdriesen at hotmail.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: Community User
           Blocker: ---


Created an attachment (id=370184)
 --> (http://bugzilla.novell.com/attachment.cgi?id=370184)
Simple test case showing the problem

When trying to marshall a C union with an embedded struct, mono crashes.

typedef union foobar_t {
    unsigned int foo;
    struct {
        unsigned int a;
        double b;
    } bar;
} foobar_t;

The error message is:

"Got a SIGABRT while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries
used by your application."

I'm pretty sure there is no bug in the native code, because it works fine from
a native applications. When I remove the struct from the union it works fine,
so I suspect the error must be there somewhere. The actual definition of the
struct does not seem to be important, but as soon as some struct is present, it
crashes.

Note that in my case, the struct needs to be marshalled from native code 
to managed code, because it's used in a callback function.

I don't have a MS .NET environment to test at the moment. But as far as I can
remember when I tried my original code with MS .NET, it worked fine.

-- 
Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the mono-bugs mailing list