From owner-svn-ports-head@FreeBSD.ORG Sun Mar 2 18:19:49 2014 Return-Path: Delivered-To: svn-ports-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A9AC7E11; Sun, 2 Mar 2014 18:19:49 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 952A919BE; Sun, 2 Mar 2014 18:19:49 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s22IJn8s099910; Sun, 2 Mar 2014 18:19:49 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s22IJn95099908; Sun, 2 Mar 2014 18:19:49 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201403021819.s22IJn95099908@svn.freebsd.org> From: Alexander Motin Date: Sun, 2 Mar 2014 18:19:49 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r346787 - in head/benchmarks/raidtest: . files X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 Mar 2014 18:19:49 -0000 Author: mav (src committer) Date: Sun Mar 2 18:19:48 2014 New Revision: 346787 URL: http://svnweb.freebsd.org/changeset/ports/346787 QAT: https://qat.redports.org/buildarchive/r346787/ Log: Fix integer type overflow, limiting test range to first 4GB of the media. Reviewed by: pjd Modified: head/benchmarks/raidtest/Makefile head/benchmarks/raidtest/files/raidtest.c Modified: head/benchmarks/raidtest/Makefile ============================================================================== --- head/benchmarks/raidtest/Makefile Sun Mar 2 18:18:19 2014 (r346786) +++ head/benchmarks/raidtest/Makefile Sun Mar 2 18:19:48 2014 (r346787) @@ -2,7 +2,7 @@ # $FreeBSD$ PORTNAME= raidtest -PORTVERSION= 1.2 +PORTVERSION= 1.3 CATEGORIES= benchmarks MASTER_SITES= # none DISTFILES= # none Modified: head/benchmarks/raidtest/files/raidtest.c ============================================================================== --- head/benchmarks/raidtest/files/raidtest.c Sun Mar 2 18:18:19 2014 (r346786) +++ head/benchmarks/raidtest/files/raidtest.c Sun Mar 2 18:19:48 2014 (r346787) @@ -113,8 +113,8 @@ write_ioreq(int fd, struct ioreq *iorq) static void raidtest_genfile(int argc, char *argv[]) { - uintmax_t i, nreqs, mediasize, nsectors, nbytes, nrreqs, nwreqs; - unsigned secsize, maxsec; + uintmax_t i, nreqs, mediasize, nsectors, nbytes, nrreqs, nwreqs, maxsec; + unsigned secsize; const char *file = NULL; struct ioreq iorq; int ch, fd, flags, rdonly, wronly; @@ -189,7 +189,8 @@ raidtest_genfile(int argc, char *argv[]) iorq.iorq_length = gen_size(secsize); /* Generate I/O request offset. */ maxsec = nsectors - (iorq.iorq_length / secsize); - iorq.iorq_offset = (arc4random() % maxsec) * secsize; + iorq.iorq_offset = ((((uintmax_t)arc4random() << 32) | + arc4random()) % maxsec) * secsize; /* Generate I/O request type. */ if (rdonly) iorq.iorq_type = IO_TYPE_READ;