aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/erl_process.c
diff options
context:
space:
mode:
authorMichal Ptaszek <[email protected]>2014-03-12 16:22:08 +0100
committerMichal Ptaszek <[email protected]>2014-03-12 16:22:08 +0100
commiteffb1c0a593e71664dec5b06da72518e74254c1b (patch)
treeeb655e969705d9b28a9d4f46094be12630f7aed9 /erts/emulator/beam/erl_process.c
parent8acc644e162bad52f7ab81c76c0cad15628e4f3d (diff)
downloadotp-effb1c0a593e71664dec5b06da72518e74254c1b.tar.gz
otp-effb1c0a593e71664dec5b06da72518e74254c1b.tar.bz2
otp-effb1c0a593e71664dec5b06da72518e74254c1b.zip
Pass full strings to DTrace probes
Whenever string is passed as an argument to a DTrace probe, its length should be properly computed. Until now in order to get length of the input buffer size_of(char *) was used - which evalutes to 4 or 8 (depending on the architecture). To get a proper length, size_of(DTRACE_CHARBUF_NAME(buffer_name)) should be used.
Diffstat (limited to 'erts/emulator/beam/erl_process.c')
-rw-r--r--erts/emulator/beam/erl_process.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/erts/emulator/beam/erl_process.c b/erts/emulator/beam/erl_process.c
index 1efd070afd..dbe54a25c3 100644
--- a/erts/emulator/beam/erl_process.c
+++ b/erts/emulator/beam/erl_process.c
@@ -8349,7 +8349,7 @@ send_exit_signal(Process *c_p, /* current process if and only
dtrace_pid_str(from, sender_str);
dtrace_proc_str(rp, receiver_str);
- erts_snprintf(reason_buf, sizeof(reason_buf) - 1, "%T", reason);
+ erts_snprintf(reason_buf, sizeof(DTRACE_CHARBUF_NAME(reason_buf)) - 1, "%T", reason);
DTRACE3(process_exit_signal, sender_str, receiver_str, reason_buf);
}
#endif