possible bug in 'sum' command, with a demo

Guillermo Rodriguez Garcia guille.rodriguez at gmail.com
Thu Sep 22 16:10:19 UTC 2016


The values returned by sum seem to be correct for the default SysV
algorithm. The coreutils version of sum yields the same values.

Guillermo

2016-09-22 17:57 GMT+02:00 Anne Salemme <asalemme at crunchtime.com>:

> Hello,
>
>   I am using BusyBox version v1.22.1 inside MobaXterm, and came across
> what looks like a bug in the ‘sum’ command…maybe not a bug, but definitely
> not expected…here is a little demo for you…thanks, I love BusyBox!
>
>
>
> Demo shows that given two files with different contents, ‘sum’ gives them
> an identical checksum, but ‘cksum’ gives them different checksums (as
> expected).
>
>
>
> [2016-09-22 11:38.59]  ~/foo
>
> [asalemme.asalemme-win7] ➤ ls -l
>
> total 1
>
> -rw-r--r--    1 asalemme UsersGrp         8 Sep 22 10:27 demo-107108
>
> -rw-r--r--    1 asalemme UsersGrp         8 Sep 22 10:27 demo-145146
>
>
>>
> ────────────────────────────────────────────────────────────
> ────────────────────────────────────────────────────────────
> ───────────────
>
> [2016-09-22 11:39.07]  ~/foo
>
> [asalemme.asalemme-win7] ➤ sum *
>
> 59944     1 demo-107108
>
> 59944     1 demo-145146
>
>
>
>>
> ────────────────────────────────────────────────────────────
> ────────────────────────────────────────────────────────────
> ───────────────
>
> [2016-09-22 11:39.14]  ~/foo
>
> [asalemme.asalemme-win7] ➤ cksum *
>
> 2984653705 8 demo-107108
>
> 1560277601 8 demo-145146
>
>
>>
> ────────────────────────────────────────────────────────────
> ────────────────────────────────────────────────────────────
> ───────────────
>
> [2016-09-22 11:39.20]  ~/foo
>
> [asalemme.asalemme-win7] ➤ od -c demo-107108
>
> 0000000   1   0   7   1   0   8  \n  \n
>
> 0000010
>
>
>
>>
> ────────────────────────────────────────────────────────────
> ────────────────────────────────────────────────────────────
> ───────────────
>
> [2016-09-22 11:39.39]  ~/foo
>
> [asalemme.asalemme-win7] ➤ od -c demo-145146
>
> 0000000   1   4   5   1   4   6  \n  \n
>
> 0000010
>
>
>
>>
> ────────────────────────────────────────────────────────────
> ────────────────────────────────────────────────────────────
> ───────────────
>
> [2016-09-22 11:40.01]  ~/foo
>
> [asalemme.asalemme-win7] ➤
>
>
>
>
>
> Thanks again for a great product, and best regards.
>
>
>
> Anne Salemme
>
>
>
> [image: Signature-Logo_black]
>
> Anne Salemme| Linux Deployment Engineer
>
> CrunchTime! Information Systems, Inc.
>
> 129 Portland Street, Boston, MA 02114
>
> *asalemme at crunchtime.com <asalemme at crunchtime.com>*
>
> Web
> <http://t.signauxhuit.com/e1t/c/5/f18dQhb0S7lC8dDMPbW2n0x6l2B9nMJW7t5XZs3My3lqMRYrD-f6D1RVQJSG056dS_6f36lDJz02?t=http%3a%2f%2fwww.crunchtime.com%2f&si=5659683090595840&pi=2f2a6d7f-bfae-4f30-bea3-2908f3f9663a>
> – Twitter
> <http://t.signauxhuit.com/e1t/c/5/f18dQhb0S7lC8dDMPbW2n0x6l2B9nMJW7t5XZs3My3lqMRYrD-f6D1RVQJSG056dS_6f36lDJz02?t=http%3a%2f%2fwww.twitter.com%2fgetcrunchtime&si=5659683090595840&pi=2f2a6d7f-bfae-4f30-bea3-2908f3f9663a>
> – Video
> <http://t.signauxhuit.com/e1t/c/5/f18dQhb0S7lC8dDMPbW2n0x6l2B9nMJW7t5XZs3My3lqMRYrD-f6D1RVQJSG056dS_6f36lDJz02?t=http%3a%2f%2fvimeo.com%2fchannels%2fgetcrunchtime&si=5659683090595840&pi=2f2a6d7f-bfae-4f30-bea3-2908f3f9663a>
> – LinkedIn
> <http://t.signauxhuit.com/e1t/c/5/f18dQhb0S7lC8dDMPbW2n0x6l2B9nMJW7t5XZs3My3lqMRYrD-f6D1RVQJSG056dS_6f36lDJz02?t=https%3a%2f%2fwww.linkedin.com%2fcompany%2fcrunchtime-information-systems&si=5659683090595840&pi=2f2a6d7f-bfae-4f30-bea3-2908f3f9663a>
>
>
>
>
>
>
>
>
>
> _______________________________________________
> busybox mailing list
> busybox at busybox.net
> http://lists.busybox.net/mailman/listinfo/busybox
>



-- 
Guillermo Rodriguez Garcia
guille.rodriguez at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/busybox/attachments/20160922/1d8076ac/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.jpg
Type: image/jpeg
Size: 2389 bytes
Desc: not available
URL: <http://lists.busybox.net/pipermail/busybox/attachments/20160922/1d8076ac/attachment.jpg>


More information about the busybox mailing list