summaryrefslogtreecommitdiff
path: root/usr/src/uts/common/dtrace
diff options
context:
space:
mode:
Diffstat (limited to 'usr/src/uts/common/dtrace')
-rw-r--r--usr/src/uts/common/dtrace/dtrace.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/usr/src/uts/common/dtrace/dtrace.c b/usr/src/uts/common/dtrace/dtrace.c
index 290494147f..a5dd75f944 100644
--- a/usr/src/uts/common/dtrace/dtrace.c
+++ b/usr/src/uts/common/dtrace/dtrace.c
@@ -6120,6 +6120,23 @@ dtrace_probe(dtrace_id_t id, uintptr_t arg0, uintptr_t arg1,
continue;
}
+ /*
+ * Clear the string space, since there's no
+ * helper to do it for us.
+ */
+ if (DTRACE_USTACK_STRSIZE(rec->dtrd_arg) != 0) {
+ int depth = DTRACE_USTACK_NFRAMES(
+ rec->dtrd_arg);
+ size_t strsize = DTRACE_USTACK_STRSIZE(
+ rec->dtrd_arg);
+ uint64_t *buf = (uint64_t *)(tomax +
+ valoffs);
+ void *strspace = &buf[depth + 1];
+
+ dtrace_bzero(strspace,
+ MIN(depth, strsize));
+ }
+
DTRACE_CPUFLAG_SET(CPU_DTRACE_NOFAULT);
dtrace_getupcstack((uint64_t *)
(tomax + valoffs),