From owner-svn-src-head@freebsd.org Mon Jan 4 03:32:14 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D77B1A61F21; Mon, 4 Jan 2016 03:32:14 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pf0-x22d.google.com (mail-pf0-x22d.google.com [IPv6:2607:f8b0:400e:c00::22d]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B9EA1122F; Mon, 4 Jan 2016 03:32:14 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pf0-x22d.google.com with SMTP id 65so149986246pff.3; Sun, 03 Jan 2016 19:32:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=content-type:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=QjaW5m4AQBreCUxzvRZwG8JHn5S4Evf/25Jq0rFnRK0=; b=CHXAifx2/EpSvcf9l6efZbtOdWHaR4ZVfT7J6g+Wh+TCEGxHqzjkGME6K3Yzoh6V7r KFAGzikMbpR61GxT0FummpwCg9tt4x/q6Dkkknz1t/q21KCoUY/ZTvaWW243mOW782Mz 7fUCR5IV8Mt12idsArUI+sHEvAiEq2ISwChcNewHA55MMABpEu7SleGohP2DRTRm+TJJ IC/Wh5EdAuHDYKi6r/8oL/7qoMM0jq/uC6kkjh57pNP6yaJ68dnBWUUspjdgdS2i1cu/ 1Vb3bfL1HzhnoMgYqUiJOF7ioD1mSIo1kxn1NspFcj5QnoKcXnwVXqQkmIG/0JbUZ4u8 iUkQ== X-Received: by 10.98.17.3 with SMTP id z3mr105927929pfi.166.1451878334344; Sun, 03 Jan 2016 19:32:14 -0800 (PST) Received: from [192.168.20.7] (c-24-16-212-205.hsd1.wa.comcast.net. [24.16.212.205]) by smtp.gmail.com with ESMTPSA id fi16sm48690748pac.12.2016.01.03.19.32.12 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 03 Jan 2016 19:32:13 -0800 (PST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2104\)) Subject: Re: svn commit: r293134 - head/lib/libnv/tests From: NGie Cooper In-Reply-To: <201601040326.u043Qa46007717@repo.freebsd.org> Date: Sun, 3 Jan 2016 19:32:11 -0800 Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: <4C70AA03-F9C7-44A7-B9DE-5A6ABF108FC9@gmail.com> References: <201601040326.u043Qa46007717@repo.freebsd.org> To: Garrett Cooper X-Mailer: Apple Mail (2.2104) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Jan 2016 03:32:14 -0000 > On Jan 3, 2016, at 19:26, Garrett Cooper wrote: >=20 > Author: ngie > Date: Mon Jan 4 03:26:36 2016 > New Revision: 293134 > URL: https://svnweb.freebsd.org/changeset/base/293134 >=20 > Log: > Use `nitems(x)` macro instead of using hardcoded numbers for indices = into > the nvlists >=20 > Convert some of the variables from int to unsigned int to squelch = -Wsign-compare > warnings when converting hardcoded values to nitems(..) >=20 > Differential Revision: https://reviews.freebsd.org/D4769 (part of = larger diff) > MFC after: 5 days > Reviewed by: oshogbo > Sponsored by: EMC / Isilon Storage Division ... > - for (i =3D 0; i < num_items; i++) > + for (i =3D 0; i < nitems(desc); i++) This portion of the change also fixed an out-of-bounds memory access on = stable/10 that oshogbo spent some time poring over why this testcase (in = particular) kept on crashing as num_items was never properly initialized = in this code path. Reported by: cppcheck Thanks! -NGie=