From effb1c0a593e71664dec5b06da72518e74254c1b Mon Sep 17 00:00:00 2001 From: Michal Ptaszek Date: Wed, 12 Mar 2014 16:22:08 +0100 Subject: 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. --- erts/emulator/beam/beam_emu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'erts/emulator/beam/beam_emu.c') diff --git a/erts/emulator/beam/beam_emu.c b/erts/emulator/beam/beam_emu.c index 78ab6fa30f..b8688608c2 100644 --- a/erts/emulator/beam/beam_emu.c +++ b/erts/emulator/beam/beam_emu.c @@ -1270,7 +1270,7 @@ void process_main(void) (Eterm)fptr[1], (Uint)fptr[2], NULL, fun_buf); } else { - erts_snprintf(fun_buf, sizeof(fun_buf), + erts_snprintf(fun_buf, sizeof(DTRACE_CHARBUF_NAME(fun_buf)), "", next); } } -- cgit v1.2.3