Hey Simon, indeed it's an alignment problem. On ARM <= v5 you cannot access data with unaligned pointers. However you can ask the kernel to fixup that problem, which has a veeery high runtime overhead. This options is switched off by default on debian.
You can switch it on via:
echo 3 | sudo tee /proc/cpu/alignment
and voila, lzop works. And gives a nice warning in dmesg:
> [3671050.938449] Alignment trap: lzop (4437) PC=0xb6f371a0 Instr=0xe1d030b0
> Address=0xbee013a9 FSR 0x001
> [3671050.951027] Alignment trap: lzop (4437) PC=0xb6f371bc Instr=0xe1d030b0
> Address=0xbee013a9 FSR 0x001
> [3671050.962950] Alignment trap: lzop (4437) PC=0xb6f371d8 Instr=0xe1d020b0
> Address=0xbee013a9 FSR 0x001
> [3671050.974746] Alignment trap: lzop (4437) PC=0xb6f371f8 Instr=0xe5902000
> Address=0xbee013a9 FSR 0x001
> [3671050.987114] Alignment trap: lzop (4437) PC=0xb6f37214 Instr=0xe5902000
> Address=0xbee013a9 FSR 0x001
> [3671050.999138] Alignment trap: lzop (4437) PC=0xb6f37234 Instr=0xe5900000
> Address=0xbee013a9 FSR 0x001
And you can compare the output of
cat /proc/cpu/alignment
before running lzop and after. Here the "Word" counter increases by 3.
As you see address in the dmesg output ends with "9" which is an
unaligned address. So from my point of view switching unaligned access
off in libzop with -DLZO_CFG_NO_UNALIGNED should be done on at least
ARMel. Are there other alignment sensitive platforms in debian?
Marc
signature.asc
Description: OpenPGP digital signature

