Date: Wed, 29 Jan 2020 14:38:34 -0800 From: Conrad Meyer <cem@freebsd.org> To: Li-Wen Hsu <lwhsu@freebsd.org> Cc: src-committers <src-committers@freebsd.org>, svn-src-all <svn-src-all@freebsd.org>, svn-src-head <svn-src-head@freebsd.org> Subject: Re: svn commit: r357246 - head/tests/sys/sys Message-ID: <CAG6CVpU=FACbmUeTHRT38yJH6kMWCSjv%2BewfdC26_%2BR7bc7Krw@mail.gmail.com> In-Reply-To: <CAKBkRUxs860g1zYXHJybA-ggtd31Ry41wdT-%2BpjHD2nrwcyJXA@mail.gmail.com> References: <202001290525.00T5PKKh017113@repo.freebsd.org> <CAKBkRUxs860g1zYXHJybA-ggtd31Ry41wdT-%2BpjHD2nrwcyJXA@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Hi Li-Wen, Thanks for the report. I went ahead and reverted it in r357273. Best, Conrad On Wed, Jan 29, 2020 at 8:47 AM Li-Wen Hsu <lwhsu@freebsd.org> wrote: > > On Wed, Jan 29, 2020 at 1:25 PM Conrad Meyer <cem@freebsd.org> wrote: > > > > Author: cem > > Date: Wed Jan 29 05:25:20 2020 > > New Revision: 357246 > > URL: https://svnweb.freebsd.org/changeset/base/357246 > > > > Log: > > qmath(3) test: Replace overcomplicated abomination with arc4random(3) > > > > The horrific GENRAND construction bent over backwards to construct 64-bit > > signed integers from the 31-bit output of random(3) for about 20 numbers per > > test. Reproducibility wasn't a goal: random(3) was seeded with > > srandomdev(3). Speed is not a factor for generating 20 integers with > > arc4random(3). Range is not a factor: all uses did not bound the range > > beyond that of the full [INT64_MIN, INT64_MAX]. Just use arc4random(3). > > > > Reported by: Coverity > > CIDs: 1404809, 1404817, 1404838, 1404840 and about 6x other > > identical reports of dubious code relating to the > > construction > > > > Modified: > > head/tests/sys/sys/qmath_test.c > > These two test cases are starting failing since this commit: > https://ci.freebsd.org/job/FreeBSD-head-amd64-test/14110/testReport/sys.sys/qmath_test/qsubi_s64q/ > https://ci.freebsd.org/job/FreeBSD-head-amd64-test/14110/testReport/sys.sys/qmath_test/qsubq_s64q/ > > Can you help check them? Thanks! > > Li-Wen
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAG6CVpU=FACbmUeTHRT38yJH6kMWCSjv%2BewfdC26_%2BR7bc7Krw>