svn commit: r256004 - in stable/9/cddl/contrib/opensolaris: cmd/dtrace/test/tst/common/funcs cmd/dtrace/test/tst/common/pointers cmd/dtrace/test/tst/common/print cmd/dtrace/test/tst/common/safety c...
Pedro F. Giffuni
pfg at FreeBSD.org
Wed Oct 2 19:18:04 UTC 2013
Author: pfg
Date: Wed Oct 2 19:18:00 2013
New Revision: 256004
URL: http://svnweb.freebsd.org/changeset/base/256004
Log:
MFC r249426;
Merge change from illumos:
3519 DTrace fails to resolve const types from fbt
3520 dtrace internal error -- token type 316 is not a valid D
compilation token
3521 clean up dtrace unit tests
Illumos Revision: e98f46c
Reference:
https://www.illumos.org/issues/3519
https://www.illumos.org/issues/3520
https://www.illumos.org/issues/3521
Tested by: Fabian Keil
Obtained from: Illumos
Added:
stable/9/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print/err.D_PRINT_AGG.bad.d
- copied unchanged from r253726, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print/err.D_PRINT_AGG.bad.d
stable/9/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/trace/err.D_TRACE_AGG.bad.d
- copied unchanged from r253726, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/trace/err.D_TRACE_AGG.bad.d
stable/9/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/types/tst.const.d
- copied unchanged from r253726, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/types/tst.const.d
Modified:
stable/9/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/tst.strjoin.d
stable/9/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pointers/err.BadAlign.d
stable/9/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pointers/err.InvalidAddress2.d
stable/9/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pointers/err.InvalidAddress3.d
stable/9/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pointers/err.InvalidAddress4.d
stable/9/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print/err.D_PRINT_VOID.bad.d
stable/9/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print/err.D_PROTO_LEN.bad.d
stable/9/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/safety/tst.copyin.d
stable/9/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/speculation/err.BufSizeVariations2.d
stable/9/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/trace/err.D_PROTO_LEN.bad.d
stable/9/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/trace/err.D_TRACE_VOID.bad.d
stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_cc.c
stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_decl.c
stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_errtags.h
Directory Properties:
stable/9/ (props changed)
stable/9/cddl/ (props changed)
stable/9/cddl/contrib/ (props changed)
stable/9/cddl/contrib/opensolaris/ (props changed)
stable/9/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print/ (props changed)
stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/ (props changed)
Modified: stable/9/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/tst.strjoin.d
==============================================================================
--- stable/9/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/tst.strjoin.d Wed Oct 2 19:06:05 2013 (r256003)
+++ stable/9/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/tst.strjoin.d Wed Oct 2 19:18:00 2013 (r256004)
@@ -24,7 +24,9 @@
* Use is subject to license terms.
*/
-#pragma ident "%Z%%M% %I% %E% SMI"
+/*
+ * Copyright (c) 2012 by Delphix. All rights reserved.
+ */
#pragma D option quiet
@@ -36,3 +38,8 @@ BEGIN
printf("%s\n", strjoin("", ""));
exit(0);
}
+
+BEGIN
+{
+ exit(1);
+}
Modified: stable/9/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pointers/err.BadAlign.d
==============================================================================
--- stable/9/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pointers/err.BadAlign.d Wed Oct 2 19:06:05 2013 (r256003)
+++ stable/9/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pointers/err.BadAlign.d Wed Oct 2 19:18:00 2013 (r256004)
@@ -24,7 +24,9 @@
* Use is subject to license terms.
*/
-#pragma ident "%Z%%M% %I% %E% SMI"
+/*
+ * Copyright (c) 2012 by Delphix. All rights reserved.
+ */
/*
* ASSERTION: This test reproduces the alignment error.
@@ -39,9 +41,10 @@
BEGIN
{
- x = (int *) 64;
+ x = (int *)64;
y = *x;
trace(y);
+ exit(0);
}
ERROR
Modified: stable/9/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pointers/err.InvalidAddress2.d
==============================================================================
--- stable/9/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pointers/err.InvalidAddress2.d Wed Oct 2 19:06:05 2013 (r256003)
+++ stable/9/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pointers/err.InvalidAddress2.d Wed Oct 2 19:18:00 2013 (r256004)
@@ -24,7 +24,9 @@
* Use is subject to license terms.
*/
-#pragma ident "%Z%%M% %I% %E% SMI"
+/*
+ * Copyright (c) 2012 by Delphix. All rights reserved.
+ */
/*
* ASSERTION: D pointers do not allow invalid pointer accesses.
@@ -44,6 +46,7 @@ BEGIN
y = (int *) (x - 3300778156056);
*y = 3;
trace(*y);
+ exit(0);
}
ERROR
Modified: stable/9/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pointers/err.InvalidAddress3.d
==============================================================================
--- stable/9/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pointers/err.InvalidAddress3.d Wed Oct 2 19:06:05 2013 (r256003)
+++ stable/9/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pointers/err.InvalidAddress3.d Wed Oct 2 19:18:00 2013 (r256004)
@@ -24,7 +24,9 @@
* Use is subject to license terms.
*/
-#pragma ident "%Z%%M% %I% %E% SMI"
+/*
+ * Copyright (c) 2012 by Delphix. All rights reserved.
+ */
/*
* ASSERTION: D pointers do not allow invalid pointer accesses.
@@ -39,9 +41,10 @@
BEGIN
{
- y = (int *) (-33007);
+ y = (int *)-33007;
*y = 3;
trace(*y);
+ exit(0);
}
ERROR
Modified: stable/9/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pointers/err.InvalidAddress4.d
==============================================================================
--- stable/9/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pointers/err.InvalidAddress4.d Wed Oct 2 19:06:05 2013 (r256003)
+++ stable/9/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pointers/err.InvalidAddress4.d Wed Oct 2 19:18:00 2013 (r256004)
@@ -24,7 +24,9 @@
* Use is subject to license terms.
*/
-#pragma ident "%Z%%M% %I% %E% SMI"
+/*
+ * Copyright (c) 2012 by Delphix. All rights reserved.
+ */
/*
* ASSERTION: Demonstrating valid memory access.
@@ -40,10 +42,11 @@
BEGIN
{
x = (int *)alloca(sizeof (int));
- printf("Address x: %x\n", (int) x);
- y = (int *) (x - 2);
+ printf("Address x: %x\n", (int)x);
+ y = (int *)(x - 2);
*y = 3;
- printf("Address y: %x\tValue: %d\n", (int) y, *y);
+ printf("Address y: %x\tValue: %d\n", (int)y, *y);
+ exit(0);
}
ERROR
Copied: stable/9/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print/err.D_PRINT_AGG.bad.d (from r253726, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print/err.D_PRINT_AGG.bad.d)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ stable/9/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print/err.D_PRINT_AGG.bad.d Wed Oct 2 19:18:00 2013 (r256004, copy of r253726, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print/err.D_PRINT_AGG.bad.d)
@@ -0,0 +1,29 @@
+/*
+ * 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 of 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.
+ *
+ * CDDL HEADER END
+ */
+
+/*
+ * Copyright (c) 2012 by Delphix. All rights reserved.
+ */
+
+BEGIN
+{
+ @ = count();
+ print(@);
+}
+
+BEGIN
+{
+ exit(0);
+}
Modified: stable/9/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print/err.D_PRINT_VOID.bad.d
==============================================================================
--- stable/9/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print/err.D_PRINT_VOID.bad.d Wed Oct 2 19:06:05 2013 (r256003)
+++ stable/9/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print/err.D_PRINT_VOID.bad.d Wed Oct 2 19:18:00 2013 (r256004)
@@ -20,10 +20,15 @@
*/
/*
- * Copyright (c) 2011 by Delphix. All rights reserved.
+ * Copyright (c) 2012 by Delphix. All rights reserved.
*/
BEGIN
{
print((void)`p0);
}
+
+BEGIN
+{
+ exit(0);
+}
Modified: stable/9/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print/err.D_PROTO_LEN.bad.d
==============================================================================
--- stable/9/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print/err.D_PROTO_LEN.bad.d Wed Oct 2 19:06:05 2013 (r256003)
+++ stable/9/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print/err.D_PROTO_LEN.bad.d Wed Oct 2 19:18:00 2013 (r256004)
@@ -20,10 +20,15 @@
*/
/*
- * Copyright (c) 2011 by Delphix. All rights reserved.
+ * Copyright (c) 2012 by Delphix. All rights reserved.
*/
BEGIN
{
print();
}
+
+BEGIN
+{
+ exit(0);
+}
Modified: stable/9/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/safety/tst.copyin.d
==============================================================================
--- stable/9/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/safety/tst.copyin.d Wed Oct 2 19:06:05 2013 (r256003)
+++ stable/9/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/safety/tst.copyin.d Wed Oct 2 19:18:00 2013 (r256004)
@@ -24,7 +24,9 @@
* Use is subject to license terms.
*/
-#pragma ident "%Z%%M% %I% %E% SMI"
+/*
+ * Copyright (c) 2012 by Delphix. All rights reserved.
+ */
/*
* ASSERTION:
@@ -39,7 +41,7 @@
*/
-#pragma D option bufsize=16
+#pragma D option bufsize=32
#pragma D option bufpolicy=ring
#pragma D option statusrate=1nsec
Modified: stable/9/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/speculation/err.BufSizeVariations2.d
==============================================================================
--- stable/9/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/speculation/err.BufSizeVariations2.d Wed Oct 2 19:06:05 2013 (r256003)
+++ stable/9/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/speculation/err.BufSizeVariations2.d Wed Oct 2 19:18:00 2013 (r256004)
@@ -24,7 +24,9 @@
* Use is subject to license terms.
*/
-#pragma ident "%Z%%M% %I% %E% SMI"
+/*
+ * Copyright (c) 2012 by Delphix. All rights reserved.
+ */
/*
* ASSERTION:
Modified: stable/9/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/trace/err.D_PROTO_LEN.bad.d
==============================================================================
--- stable/9/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/trace/err.D_PROTO_LEN.bad.d Wed Oct 2 19:06:05 2013 (r256003)
+++ stable/9/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/trace/err.D_PROTO_LEN.bad.d Wed Oct 2 19:18:00 2013 (r256004)
@@ -24,8 +24,9 @@
* Use is subject to license terms.
*/
-#pragma ident "%Z%%M% %I% %E% SMI"
-
+/*
+ * Copyright (c) 2012 by Delphix. All rights reserved.
+ */
/*
* ASSERTION:
@@ -39,3 +40,8 @@ BEGIN
trace();
}
+
+BEGIN
+{
+ exit(0);
+}
Copied: stable/9/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/trace/err.D_TRACE_AGG.bad.d (from r253726, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/trace/err.D_TRACE_AGG.bad.d)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ stable/9/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/trace/err.D_TRACE_AGG.bad.d Wed Oct 2 19:18:00 2013 (r256004, copy of r253726, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/trace/err.D_TRACE_AGG.bad.d)
@@ -0,0 +1,29 @@
+/*
+ * 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 of 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.
+ *
+ * CDDL HEADER END
+ */
+
+/*
+ * Copyright (c) 2012 by Delphix. All rights reserved.
+ */
+
+BEGIN
+{
+ @ = count();
+ trace(@);
+}
+
+BEGIN
+{
+ exit(0);
+}
Modified: stable/9/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/trace/err.D_TRACE_VOID.bad.d
==============================================================================
--- stable/9/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/trace/err.D_TRACE_VOID.bad.d Wed Oct 2 19:06:05 2013 (r256003)
+++ stable/9/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/trace/err.D_TRACE_VOID.bad.d Wed Oct 2 19:18:00 2013 (r256004)
@@ -24,7 +24,9 @@
* Use is subject to license terms.
*/
-#pragma ident "%Z%%M% %I% %E% SMI"
+/*
+ * Copyright (c) 2012 by Delphix. All rights reserved.
+ */
/*
* ASSERTION:
@@ -37,3 +39,8 @@ BEGIN
{
trace((void)`kmem_flags);
}
+
+BEGIN
+{
+ exit(0);
+}
Copied: stable/9/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/types/tst.const.d (from r253726, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/types/tst.const.d)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ stable/9/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/types/tst.const.d Wed Oct 2 19:18:00 2013 (r256004, copy of r253726, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/types/tst.const.d)
@@ -0,0 +1,29 @@
+/*
+ * 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 of 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.
+ *
+ * CDDL HEADER END
+ */
+
+/*
+ * Copyright (c) 2012 by Delphix. All rights reserved.
+ */
+
+/*
+ * Make sure we can scope types with modifiers.
+ */
+
+BEGIN
+{
+ trace((D`int *)0);
+ trace((const D`int *)0);
+ exit(0);
+}
Modified: stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_cc.c
==============================================================================
--- stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_cc.c Wed Oct 2 19:06:05 2013 (r256003)
+++ stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_cc.c Wed Oct 2 19:18:00 2013 (r256004)
@@ -677,6 +677,12 @@ dt_action_trace(dtrace_hdl_t *dtp, dt_no
"%s( ) may not be applied to a translated pointer\n", act);
}
+ if (dnp->dn_args->dn_kind == DT_NODE_AGG) {
+ dnerror(dnp->dn_args, istrace ? D_TRACE_AGG : D_PRINT_AGG,
+ "%s( ) may not be applied to an aggregation%s\n", act,
+ istrace ? "" : " -- did you mean printa()?");
+ }
+
dt_cg(yypcb, dnp->dn_args);
/*
Modified: stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_decl.c
==============================================================================
--- stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_decl.c Wed Oct 2 19:06:05 2013 (r256003)
+++ stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_decl.c Wed Oct 2 19:18:00 2013 (r256004)
@@ -21,6 +21,7 @@
*/
/*
* Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+ * Copyright (c) 2012 by Delphix. All rights reserved.
* Use is subject to license terms.
*/
@@ -254,11 +255,6 @@ dt_decl_spec(ushort_t kind, char *name)
ddp->dd_kind = kind;
ddp->dd_name = name;
- if (name != NULL && strchr(name, '`') != NULL) {
- xyerror(D_DECL_SCOPE, "D scoping operator may not be used "
- "in a type name\n");
- }
-
return (dt_decl_check(ddp));
}
Modified: stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_errtags.h
==============================================================================
--- stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_errtags.h Wed Oct 2 19:06:05 2013 (r256003)
+++ stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_errtags.h Wed Oct 2 19:18:00 2013 (r256004)
@@ -190,8 +190,10 @@ typedef enum {
D_PRINTA_AGGPROTO, /* printa() aggregation mismatch */
D_TRACE_VOID, /* trace() argument has void type */
D_TRACE_DYN, /* trace() argument has dynamic type */
+ D_TRACE_AGG, /* trace() argument is an aggregation */
D_PRINT_VOID, /* print() argument has void type */
D_PRINT_DYN, /* print() argument has dynamic type */
+ D_PRINT_AGG, /* print() argument is an aggregation */
D_TRACEMEM_ADDR, /* tracemem() address bad type */
D_TRACEMEM_SIZE, /* tracemem() size bad type */
D_TRACEMEM_ARGS, /* tracemem() illegal number of args */
More information about the svn-src-stable-9
mailing list