From: Mathieu Desnoyers Date: Tue, 4 Sep 2012 16:17:07 +0000 (-0400) Subject: Fix filter: pointer to string, not string, should be on stack X-Git-Tag: v2.1.0-rc1~6 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=27f4b6094f399f2fe231b58801dce98cbd21baa9;p=lttng-ust.git Fix filter: pointer to string, not string, should be on stack Fixes #329 Signed-off-by: Mathieu Desnoyers --- diff --git a/include/lttng/ust-tracepoint-event.h b/include/lttng/ust-tracepoint-event.h index 398f3efa..30414e81 100644 --- a/include/lttng/ust-tracepoint-event.h +++ b/include/lttng/ust-tracepoint-event.h @@ -298,7 +298,7 @@ size_t __event_get_size__##_provider##___##_name(size_t *__dynamic_len, _TP_ARGS unsigned long __ctf_tmp_ulong = (unsigned long) (_length); \ memcpy(__stack_data, &__ctf_tmp_ulong, sizeof(unsigned long)); \ __stack_data += sizeof(unsigned long); \ - memcpy(__stack_data, (_src), sizeof(void **)); \ + memcpy(__stack_data, &(_src), sizeof(void **)); \ __stack_data += sizeof(void **); \ } @@ -309,15 +309,15 @@ size_t __event_get_size__##_provider##___##_name(size_t *__dynamic_len, _TP_ARGS unsigned long __ctf_tmp_ulong = (unsigned long) (_src_length); \ memcpy(__stack_data, &__ctf_tmp_ulong, sizeof(unsigned long)); \ __stack_data += sizeof(unsigned long); \ - memcpy(__stack_data, (_src), sizeof(void **)); \ + memcpy(__stack_data, &(_src), sizeof(void **)); \ __stack_data += sizeof(void **); \ } #undef _ctf_string #define _ctf_string(_item, _src, _written) \ { \ - memcpy(__stack_data, (_src), sizeof(void **)); \ - __stack_data += sizeof(void *); \ + memcpy(__stack_data, &(_src), sizeof(void **)); \ + __stack_data += sizeof(void **); \ } #undef TP_ARGS