amd64/81279: /usr/games/random returns every line

Vivek Khera vivek at
Thu May 19 11:50:03 PDT 2005

>Number:         81279
>Category:       amd64
>Synopsis:       /usr/games/random returns every line
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-amd64
>State:          open
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu May 19 18:50:01 GMT 2005
>Originator:     Vivek Khera
>Release:        FreeBSD 5.3-STABLE amd64
System: FreeBSD d01 5.4-RELEASE-p1 FreeBSD 5.4-RELEASE-p1 #1: Wed May 18 12:29:27 EDT 2005     vivek at d01:/var/usr.obj/n/lorax1/usr5/src/sys/D03  amd64


Running /usr/games/random to select lines from a file fails to eliminate any
lines -- ie, it functions just like "cat".


make a file with 10000 lines for easy viewing:

perl -e 'print "$_\n" for (1..10000)' > list

now run

/usr/games/random 6 < list > out

On an amd64 system, list == out.  On an i386 system the file out has
approximately 1600 lines.



no idea.  must be some 64-bit over/under flow issue...


More information about the freebsd-amd64 mailing list