From owner-svn-src-stable-11@freebsd.org Wed Aug 30 02:08:36 2017 Return-Path: Delivered-To: svn-src-stable-11@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 50A00DEC153; Wed, 30 Aug 2017 02:08:36 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2C5B37EB30; Wed, 30 Aug 2017 02:08:36 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v7U28ZVM058852; Wed, 30 Aug 2017 02:08:35 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v7U28Zgv058849; Wed, 30 Aug 2017 02:08:35 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201708300208.v7U28Zgv058849@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Wed, 30 Aug 2017 02:08:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r323012 - in stable/11/cddl: contrib/opensolaris/cmd/dtrace/test/tst/common/llquantize contrib/opensolaris/lib/libdtrace/common usr.sbin/dtrace/tests/common/llquantize X-SVN-Group: stable-11 X-SVN-Commit-Author: markj X-SVN-Commit-Paths: in stable/11/cddl: contrib/opensolaris/cmd/dtrace/test/tst/common/llquantize contrib/opensolaris/lib/libdtrace/common usr.sbin/dtrace/tests/common/llquantize X-SVN-Commit-Revision: 323012 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Aug 2017 02:08:36 -0000 Author: markj Date: Wed Aug 30 02:08:34 2017 New Revision: 323012 URL: https://svnweb.freebsd.org/changeset/base/323012 Log: MFC r322773-r322775: Fix an off-by-two in the llquantize() action parameter validation. Added: stable/11/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/llquantize/err.D_LLQUANT_MAGTOOBIG.offbyone.d - copied, changed from r322774, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/llquantize/err.D_LLQUANT_MAGTOOBIG.offbyone.d Modified: stable/11/cddl/contrib/opensolaris/lib/libdtrace/common/dt_cc.c stable/11/cddl/usr.sbin/dtrace/tests/common/llquantize/Makefile Directory Properties: stable/11/ (props changed) Copied and modified: stable/11/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/llquantize/err.D_LLQUANT_MAGTOOBIG.offbyone.d (from r322774, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/llquantize/err.D_LLQUANT_MAGTOOBIG.offbyone.d) ============================================================================== --- head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/llquantize/err.D_LLQUANT_MAGTOOBIG.offbyone.d Mon Aug 21 21:58:42 2017 (r322774, copy source) +++ stable/11/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/llquantize/err.D_LLQUANT_MAGTOOBIG.offbyone.d Wed Aug 30 02:08:34 2017 (r323012) @@ -1,26 +1,16 @@ /* - * CDDL HEADER START + * This file and its contents are supplied under the terms of the + * Common Development and Distribution License ("CDDL"), version 1.0. + * You may only use this file in accordance with the terms version + * 1.0 of the CDDL. * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END + * A full copy of the text of the CDDL should have accompanied this + * source. A copy of the CDDL is also available via the Internet at + * http://www.illumos.org/license/CDDL. */ /* - * Copyright (c) 2017 Mark Johnston + * Copyright 2017 Mark Johnston */ /* Modified: stable/11/cddl/contrib/opensolaris/lib/libdtrace/common/dt_cc.c ============================================================================== --- stable/11/cddl/contrib/opensolaris/lib/libdtrace/common/dt_cc.c Wed Aug 30 01:44:11 2017 (r323011) +++ stable/11/cddl/contrib/opensolaris/lib/libdtrace/common/dt_cc.c Wed Aug 30 02:08:34 2017 (r323012) @@ -1546,7 +1546,7 @@ dt_compile_agg(dtrace_hdl_t *dtp, dt_node_t *dnp, dtra "divide a power of the factor\n"); } - for (i = 0, order = 1; i < args[2].value; i++) { + for (i = 0, order = 1; i <= args[2].value + 1; i++) { if (order * args[0].value > order) { order *= args[0].value; continue; @@ -1554,7 +1554,7 @@ dt_compile_agg(dtrace_hdl_t *dtp, dt_node_t *dnp, dtra dnerror(dnp, D_LLQUANT_MAGTOOBIG, "llquantize( ) " "factor (%d) raised to power of high magnitude " - "(%d) overflows 64-bits\n", args[0].value, + "(%d) plus 1 overflows 64-bits\n", args[0].value, args[2].value); } Modified: stable/11/cddl/usr.sbin/dtrace/tests/common/llquantize/Makefile ============================================================================== --- stable/11/cddl/usr.sbin/dtrace/tests/common/llquantize/Makefile Wed Aug 30 01:44:11 2017 (r323011) +++ stable/11/cddl/usr.sbin/dtrace/tests/common/llquantize/Makefile Wed Aug 30 02:08:34 2017 (r323012) @@ -22,6 +22,7 @@ ${PACKAGE}FILES= \ err.D_LLQUANT_LOWVAL.d \ err.D_LLQUANT_MAGRANGE.d \ err.D_LLQUANT_MAGTOOBIG.d \ + err.D_LLQUANT_MAGTOOBIG.offbyone.d \ err.D_LLQUANT_NSTEPMATCH.d \ err.D_LLQUANT_NSTEPTYPE.d \ err.D_LLQUANT_NSTEPVAL.d \