[PATCH] sha3sum: New applet, v2

Baruch Siach baruch at tkos.co.il
Sun Jan 6 11:12:58 UTC 2013


Hi Lauri,

On Sun, Jan 06, 2013 at 01:03:58PM +0200, Baruch Siach wrote:
> On Sun, Jan 06, 2013 at 01:00:30PM +0200, Lauri Kasanen wrote:
> > On Sun, Jan 6, 2013, at 7:18, Baruch Siach wrote:
> > > Hi Lauri,
> > > Testing on a big-endian system (PowerPC) I'm getting:
> > > 
> > > # echo test |./busybox sha3sum
> > > Segmentation fault (core dumped)
> > > 
> > > On a PC I get:
> > > 
> > > $ echo test |./busybox sha3sum
> > > a5c3e353a185244f82a8de017db6022543d776f8943b457b6368c80854ecdfda1705e5dd514d5087116daccb7dace5ad42ab172bfe79a2c00b7a1e9c76e46b55
> > >  -
> > > 
> > > Any suggestion?
> > 
> > Well, as mentioned, I don't have such a system. Could you do a debug
> > build (CONFIG_DEBUG=y) and get valgrind output?
> > 
> > echo test | valgrind ./busybox_unstripped sha3sum
> 
> Unfortunately, valgrind does not support this PowerPC variant (e500v2).  I'll 
> try gdb and see what I get.

Here it is:

(gdb) target remote 192.168.26.170:1234
Remote debugging using 192.168.26.170:1234
0x10001f9c in _start ()
(gdb) c
Continuing.

Program received signal SIGSEGV, Segmentation fault.
KeccakF (state=0xbf8d1f30, in=<value optimized out>, laneCount=8)
    at libbb/hash_md5_sha.c:977
977         state[laneCount] ^= SWAP_LE64(in[laneCount]);
(gdb) bt
#0  KeccakF (state=0xbf8d1f30, in=<value optimized out>, laneCount=8)
    at libbb/hash_md5_sha.c:977
#1  0x10051474 in sha3_hash (state=0xbf8d1f30, data=0x10172fd0 "", 
    bytes=<value optimized out>) at libbb/hash_md5_sha.c:1055
#2  0x1003b544 in hash_file (filename=<value optimized out>)
    at coreutils/md5_sha1_sum.c:151
#3  0x1003b7c4 in md5_sha1_sum_main (argc=<value optimized out>, 
    argv=<value optimized out>) at coreutils/md5_sha1_sum.c:247
#4  0x1000240c in run_applet_no_and_exit (applet_no=<value optimized out>, 
    argv=0xbf8d2378) at libbb/appletlib.c:755
#5  0x1000243c in run_applet_and_exit (name=0xbf8d2d14 "sha3sum", argv=0xbf8d2378)
    at libbb/appletlib.c:762
#6  0x10002610 in busybox_main (name=<value optimized out>, argv=<value optimized out>)
    at libbb/appletlib.c:727
#7  run_applet_and_exit (name=<value optimized out>, argv=<value optimized out>)
    at libbb/appletlib.c:764
#8  0x100026b4 in main (argc=<value optimized out>, argv=0xbf8d2374)
    at libbb/appletlib.c:819

baruch

-- 
     http://baruch.siach.name/blog/                  ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch at tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -


More information about the busybox mailing list