On 3/11/10, Martin Guy <[email protected]> wrote:

>  You can test for that by going
>   # echo 5 > /proc/cpu/alignment
>  and running your test again. On unaligned access the program will then
>  die with SIGBUS instead of merrily going on its way with corrupted
>  values.

Note that QEMU does not emulate either the unaligned data corruption
on /proc/cpu/alignment=0 nor the bus error on /proc/cpu/alignment=5;
it always (on x86) performs a fixup, fetching in the "usual" way from
*p to *[p+3], presumably because it compiles to an x86 word fetch.
Real hardware is needed to test for word alignment errors.

     M


-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]
Archive: 
http://lists.debian.org/[email protected]

Reply via email to