Bug 4410 - awful 64-bit-cleanliness bug in dbus-mono
awful 64-bit-cleanliness bug in dbus-mono
Status: RESOLVED FIXED
Product: dbus
Classification: Unclassified
Component: core
unspecified
x86 (IA32) Linux (All)
: high critical
Assigned To: Joe Shaw
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2005-09-09 18:34 UTC by Dan Winship
Modified: 2006-08-01 10:27 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Attachments
dbus-0.60-mono-arguments-fix.diff (1.15 KB, patch)
2006-01-28 21:03 UTC, Peter Johanson
Details | Splinter Review
dbus-0.60-qdbusmarshall.patch (607 bytes, patch)
2006-02-02 02:30 UTC, Doug Goldstein
Details | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Dan Winship 2005-09-09 18:34:35 UTC
dbus/mono/Arguments.cs has:

    // Must follow sizeof(DBusMessageIter)
    internal const int DBusMessageIterSize = 14*4;

and then it assumes it can use that many bytes to store a DBusMessageIter
in. Someone needs to be shot.

Note that changing it to "3*Marshal.SizeOf(typeof(IntPtr)) + 
11*Marshal.SizeOf(typeof(int))" won't work either, because there ends up
being 4 bytes of padding before the final pointer.
Comment 1 Dan Winship 2005-12-02 02:11:25 UTC
This is still there. I probably should have mentioned before that this causes
crashes.
Comment 2 Sylvain Pasche 2005-12-09 09:40:53 UTC
I guess this is why I have the following error message (may be useful for searches):

*** glibc detected *** free(): invalid next size (fast): 0x00000000008770b0 ***

I usually don't like people begging ;), but _please_ have a look at this issue,
this makes the dbus + mono combo unusable on a 64bit box.
Comment 3 Peter Johanson 2006-01-28 21:03:10 UTC
Created attachment 4495 [details] [review]
dbus-0.60-mono-arguments-fix.diff

This fixes it even more explicitly than Dan's fix, to avoid any confusion about
where the size is coming from. Just another poke and 'why isn't this blatant 64
bit snafu fixed' query from me as well.
Comment 4 Doug Goldstein 2006-02-02 02:30:21 UTC
There's another AMD64 bug with regards to QT marshalling. Attaching a patch here
as well.
Comment 5 Doug Goldstein 2006-02-02 02:30:47 UTC
Created attachment 4530 [details] [review]
dbus-0.60-qdbusmarshall.patch
Comment 6 Joe Shaw 2006-02-10 06:54:08 UTC
I just checked this in, but I'm not maintaining the mono bindings (no one is),
so you guys shouldn't wait on me for stuff like this in the future.