summaryrefslogtreecommitdiffstats
path: root/cddl/contrib/opensolaris/cmd/dtrace/test
diff options
context:
space:
mode:
authormarkj <markj@FreeBSD.org>2017-08-30 02:08:34 +0000
committermarkj <markj@FreeBSD.org>2017-08-30 02:08:34 +0000
commit388b3c70dece24f762f366219ce6a2872dd58c3f (patch)
tree5c167f63f2fb4688baa406b822af6d1e851d71ae /cddl/contrib/opensolaris/cmd/dtrace/test
parent9eba5d5cb4b651ab2868c60c111a5e3214072036 (diff)
downloadFreeBSD-src-388b3c70dece24f762f366219ce6a2872dd58c3f.zip
FreeBSD-src-388b3c70dece24f762f366219ce6a2872dd58c3f.tar.gz
MFC r322773-r322775:
Fix an off-by-two in the llquantize() action parameter validation.
Diffstat (limited to 'cddl/contrib/opensolaris/cmd/dtrace/test')
-rw-r--r--cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/llquantize/err.D_LLQUANT_MAGTOOBIG.offbyone.d25
1 files changed, 25 insertions, 0 deletions
diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/llquantize/err.D_LLQUANT_MAGTOOBIG.offbyone.d b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/llquantize/err.D_LLQUANT_MAGTOOBIG.offbyone.d
new file mode 100644
index 0000000..47dccaf
--- /dev/null
+++ b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/llquantize/err.D_LLQUANT_MAGTOOBIG.offbyone.d
@@ -0,0 +1,25 @@
+/*
+ * 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.
+ *
+ * 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 2017 Mark Johnston <markj@FreeBSD.org>
+ */
+
+/*
+ * A regression test for FreeBSD r322773. 100^9 fits in 64 bits, but
+ * llquantize() will create buckets up to 100^{10}, which does not fit.
+ */
+
+BEGIN
+{
+ @ = llquantize(0, 100, 0, 9, 100);
+ exit(0);
+}
OpenPOWER on IntegriCloud