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
Mark Johnston
markj at FreeBSD.org
Wed Aug 30 02:08:36 UTC 2017
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 <markj at FreeBSD.org>
+ * Copyright 2017 Mark Johnston <markj at FreeBSD.org>
*/
/*
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 \
More information about the svn-src-stable-11
mailing list