SIGBUS using DBUS library on ARM

Thiago Macieira thiago at
Wed Nov 8 08:27:01 PST 2006

Sjoerd Simons wrote:
>On Wed, Nov 08, 2006 at 11:05:05AM +0100, Frédéric DALLEAU wrote:
>> Thiago,
>> The problem doesn't appear with optimization disabled.
>> About arm, I just heard that a short must be accessed through a
>> 2-aligned address, an int through a 4-aligned and so on. Individual
>> bytes can be accessed at any address.
>> In our case, we are reading a short on a 2-aligned address and this
>> should work. So I guess the optimiser tried to put an integer read in
>> place...
>You can request the arm's kernel to fixup unaligned accesses for you. If
> you want to debug it, you can also have it send a signal that you can
> catch with a debugger :)
>The default is to ignore unaligned accesses and do scary things though
> :(

The problem is that the address is aligned, so the loading of 2 bytes 
should have worked. Looks like it's a miscompilation by gcc.

  Thiago Macieira  -  thiago (AT) - thiago (AT)
    PGP/GPG: 0x6EF45358; fingerprint:
    E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url :

More information about the dbus mailing list