md5sum makes unaligned word accesses...
Andre
armcc2000 at yahoo.com
Wed May 10 19:59:18 UTC 2006
--- Mike Frysinger <vapier at gentoo.org> wrote:
>
> what kernel version ? arm/oldabi linux-2.6.14.2 works fine for me
> (even after setting /proc/cpu/alignment to 5):
> busybox dd if=/dev/zero | busybox md5sum
>
I'm testing with 2.4.27-vrs1 (last version of 2.4 for ARM).
Didn't the implementation of pipes changed in recent 2.6 ??
More intelligent buffering could certainly mask the problem...
With '(while :; do echo -n "a"; done) | strace md5sum', I get:
execve("/usr/bin/md5sum", ["md5sum"], [/* 9 vars */]) = 0
ioctl(0, SNDCTL_TMR_TIMEBASE or TCGETS, 0x7ffffd88) = -1 EINVAL
(Invalid argument)
ioctl(1, SNDCTL_TMR_TIMEBASE or TCGETS, {B115200 opost isig icanon
echo ...}) = 0
getuid() = 0
getgid() = 0
setgid(0) = 0
setuid(0) = 0
read(0, "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"..., 4096) = 519
read(0, "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"..., 4096) = 327
Alignment trap: md5sum (331) PC=0x00047834 Instr=0xe79b3105
Address=0x7fffed95 FSR 0x001
--- SIGBUS (Bus error) @ 0 (0) ---
+++ killed by SIGBUS +++
'dd if=/dev/zero bs=1 count=12345 | strace md5sum' is similar:
execve("/usr/bin/md5sum", ["md5sum"], [/* 9 vars */]) = 0
execve("/usr/bin/md5sum", ["md5sum"], [/* 9 vars */]) = 0
ioctl(1, SNDCTL_TMR_TIMEBASE or TCGETS, {B115200 opost isig icanon
echo ...}) = 0
getuid() = 0
getgid() = 0
setgid(0) = 0
setuid(0) = 0
read(0, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"...,
4096) = 4096
read(0, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"...,
4096) = 4096
read(0, "\0", 4096) = 1
read(0, "\0", 4096) = 1
read(0, "\0", 4096) = 1
read(0, "\0", 4096) = 1
read(0, "\0", 4096) = 1
read(0, "\0", 4096) = 1
read(0, "\0", 4096) = 1
read(0, "\0", 4096) = 1
read(0, "\0", 4096) = 1
read(0, "\0", 4096) = 1
read(0, "\0", 4096) = 1
read(0, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"...,
4096) = 2191
Alignment trap: md5sum (337) PC=0x00047834 Instr=0xe79b3105
Address=0x7fffed91 FSR 0x001
--- SIGBUS (Bus error) @ 0 (0) ---
+++ killed by SIGBUS +++
Andre
--
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
More information about the busybox
mailing list