[Mono-bugs] [Bug 495757] Marshaling seems to fail with structures as return value from unmanaged c-progs

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Fri Apr 17 15:16:14 EDT 2009


User vargaz at gmail.com added comment

--- Comment #3 from Zoltan Varga <vargaz at gmail.com>  2009-04-17 13:16:12 MDT ---
This is the result on my machine using an unmanaged version of the testcase:
void main ()
        struct usb_bus *bus;

        printf ("X: %d %d\n", PATH_MAX + 1, G_STRUCT_OFFSET (struct usb_bus,

        int iBus=usb_find_busses();
        int iDev=usb_find_devices();
        bus = usb_get_busses();
        printf ("B: %s %p\n", bus->dirname, bus->root_dev);

X: 4097 4136
B: 007 (nil)

sudo ./a.out

X: 4097 4136
B: 007 0x12ed200

Also, notice that the sDir field has length PATH_MAX + 1 in usb.h, but PATH_MAX
in the managed structure. Maybe this is the source of the problem.

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