From owner-svn-src-all@freebsd.org Wed Jan 29 22:38:46 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id EA2B91F9F7E; Wed, 29 Jan 2020 22:38:46 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-ot1-f54.google.com (mail-ot1-f54.google.com [209.85.210.54]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 487JLG5wXJz4J7W; Wed, 29 Jan 2020 22:38:46 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-ot1-f54.google.com with SMTP id i6so1245119otr.7; Wed, 29 Jan 2020 14:38:46 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:reply-to :from:date:message-id:subject:to:cc; bh=tuQ3z4odWJFtuoZalbF+7RSgxVoPDS68o3blMtHrOsc=; b=dUGeieVC8V93oWJWhlK+oxlqlHopaVyVltldp2h3G3Iz+WyxWKz56/g/6Xa2xNqfDb /8ss3r6kDS1Srd3erHK6BbNqdz6ZIN5cqLspq4otdOmTWOCE+sn6mhHKiA9O7DyH450K 1IT2d85goK8x4C9bkZFp2U2wjcrirsgVcxUjYAro1J6NdGsJ86XXXSYTPgv+Hpp4IWxE sifXaHxyAgCOQRZNx7reGfW+22bNXZmMwiQ0klBE3H8H4ZEjFTexrMRlduN/KWE6G8PG qAcBb8rWuSUm1r8Pn1opGVtCII+bNBjO0waSva1wUP1ptczVXM2U0SSbOGnpHGyb4bEJ lOwg== X-Gm-Message-State: APjAAAWyTkXDte/Y7WfCa+KEVhb/43BrGl8oTUd1NGd/DRTEJmJhQH9O yB8RZdt5WQKMWTyt1ddL4S0m6aix X-Google-Smtp-Source: APXvYqyQ5cXLQio4bkz5o5Il2eUZBYdjYmyF3cAUBxtNTdXM6159EXQzyy1bIPT0dKLsPveyMk8soA== X-Received: by 2002:a9d:6758:: with SMTP id w24mr1279558otm.155.1580337525556; Wed, 29 Jan 2020 14:38:45 -0800 (PST) Received: from mail-oi1-f178.google.com (mail-oi1-f178.google.com. [209.85.167.178]) by smtp.gmail.com with ESMTPSA id u18sm1161367otq.26.2020.01.29.14.38.45 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 29 Jan 2020 14:38:45 -0800 (PST) Received: by mail-oi1-f178.google.com with SMTP id l9so1486673oii.5; Wed, 29 Jan 2020 14:38:45 -0800 (PST) X-Received: by 2002:aca:3017:: with SMTP id w23mr848120oiw.152.1580337525134; Wed, 29 Jan 2020 14:38:45 -0800 (PST) MIME-Version: 1.0 References: <202001290525.00T5PKKh017113@repo.freebsd.org> In-Reply-To: Reply-To: cem@freebsd.org From: Conrad Meyer Date: Wed, 29 Jan 2020 14:38:34 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r357246 - head/tests/sys/sys To: Li-Wen Hsu Cc: src-committers , svn-src-all , svn-src-head Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 487JLG5wXJz4J7W X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-6.00 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[]; TAGGED_FROM(0.00)[] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Jan 2020 22:38:47 -0000 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 wrote: > > On Wed, Jan 29, 2020 at 1:25 PM Conrad Meyer 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