summaryrefslogtreecommitdiff
path: root/usr/src/uts/common/dtrace/dtrace.c
diff options
context:
space:
mode:
authorJohn Sonnenschein <johns@joyent.com>2012-05-17 18:26:57 +0000
committerJohn Sonnenschein <johns@joyent.com>2012-05-17 18:26:57 +0000
commit04b244dd661c24b510ac22936decfc0972d202d3 (patch)
tree3ebfef98afc303fddf3415d6fba64e8682f495e8 /usr/src/uts/common/dtrace/dtrace.c
parenteac250589e41f1b705e1b7427b02b3379aac9f9e (diff)
parenta69187741b83640a90dd8586195456dd50c016a8 (diff)
downloadillumos-joyent-20120517.tar.gz
Merge git.joyent.com:illumos-joyent20120517
Diffstat (limited to 'usr/src/uts/common/dtrace/dtrace.c')
-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),