Package: dbus
Version: 1.2.1-3
Severity: normal
Tags: patch

dbus and libdbus-1 generate unaligned traps on the Alpha architecture.
The traps are due to misaligned accesses.  On Alpha they generate a
kernel trap and the kernel simulates the memory access with an
"unaligned trap" entry in the kernel log.  This is not a show-stopper on
Alpha but the frequency of the reports in the system log is quite
annoying.  As the misaligned memory access is also in libdbus-1 it
pollutes other programs that use libdbus-1 (see bug #368863 for the hal
package where the unaligned trap is, in fact, due to libdbus-1).

The offending line of code is line 518 of dbus_marshal_basic.c and I
attach a patch (assuming this reportbug thingy works as I expect) recently
posted by Jay Estabrook of HP to the debian-alpha mail list.  I have
been running dbus 1.2.1-3 with the patch applied for the last few days
with no unaligned traps and no problems.

-- System Information:
Debian Release: lenny/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: alpha

Kernel: Linux 2.6.26.2-dp264
Locale: LANG=en_NZ, LC_CTYPE=en_NZ (charmap=ISO-8859-1)
Shell: /bin/sh linked to /bin/bash

Versions of packages dbus depends on:
ii  adduser                       3.110      add and remove users and groups
ii  debianutils                   2.30       Miscellaneous utilities specific t
ii  libc6.1                       2.7-13     GNU C Library: Shared libraries
ii  libdbus-1-3                   1.2.1-3    simple interprocess messaging syst
ii  libexpat1                     2.0.1-4    XML parsing C library - runtime li
ii  libselinux1                   2.0.65-5   SELinux shared libraries
ii  lsb-base                      3.2-20     Linux Standard Base 3.2 init scrip

Versions of packages dbus recommends:
ii  dbus-x11                      1.2.1-3    simple interprocess messaging syst

dbus suggests no packages.

-- no debconf information
--- a/dbus/dbus-marshal-basic.c.ORIG	2008-04-23 17:54:58.000000000 -0400
+++ b/dbus/dbus-marshal-basic.c	2008-04-23 18:00:06.000000000 -0400
@@ -518,7 +518,7 @@ _dbus_marshal_read_basic (const DBusStri
   switch (type)
     {
     case DBUS_TYPE_BYTE:
-      vp->byt = _dbus_string_get_byte (str, pos);
+      *((volatile char *)&vp->byt) = _dbus_string_get_byte (str, pos);
       (pos)++;
       break;
     case DBUS_TYPE_INT16:

Reply via email to