[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#531188: iconvconfig has a misaligned pointer access on arm

Package: libc6
Version: 2.7-18
Severity: minor

While apt-get upgrading an arm-lenny system I see the following:
Checking init scripts...

/var/lib/dpkg/info/libc6.postinst: line 343:  2254 Bus error
This occurs because I have detection of misaligned word accesses
enabled on my arm box
(echo 5 > /proc/cpu/alignment) whereas such accesses normally give
garbage results, returning the word from *(addr & ~3) rotated so that
the byte at *(char *)addr is in the least significant position.

The offending instruction is
(gdb) x/i 0x989c
0x989c <tsearch+3044>:  ldr     r2, [r5]
r5             0x5875e  362334
(should be a multiple of 4).

With libc6-dbg installed:

Program received signal SIGBUS, Bus error.
0x0000989c in write_output ()
(gdb) bt
#0  0x0000989c in write_output ()
#1  0x0000a7dc in main ()

which suggests that on most Debian ARM machines some piece(s) of
4-byte data are being written to somewhere half-word-swapped.

Strangely enough, the same symptom does not occur with the same
version of libc6 on armel-lenny (only arm-lenny) on the same machine.

# iconvconfig
Bus error

Reply to: