diff options
author | Michal Ptaszek <[email protected]> | 2014-03-12 16:22:08 +0100 |
---|---|---|
committer | Michal Ptaszek <[email protected]> | 2014-03-12 16:22:08 +0100 |
commit | effb1c0a593e71664dec5b06da72518e74254c1b (patch) | |
tree | eb655e969705d9b28a9d4f46094be12630f7aed9 /erts/emulator/beam/copy.c | |
parent | 8acc644e162bad52f7ab81c76c0cad15628e4f3d (diff) | |
download | otp-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/copy.c')
-rw-r--r-- | erts/emulator/beam/copy.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/erts/emulator/beam/copy.c b/erts/emulator/beam/copy.c index 23c0fca6aa..ff2ce975ea 100644 --- a/erts/emulator/beam/copy.c +++ b/erts/emulator/beam/copy.c @@ -47,7 +47,8 @@ copy_object(Eterm obj, Process* to) if (DTRACE_ENABLED(copy_object)) { DTRACE_CHARBUF(proc_name, 64); - erts_snprintf(proc_name, sizeof(proc_name), "%T", to->common.id); + erts_snprintf(proc_name, sizeof(DTRACE_CHARBUF_NAME(proc_name)), + "%T", to->common.id); DTRACE2(copy_object, proc_name, size); } #endif |