]> git.lttng.org Git - lttng-ust.git/commitdiff
Fix filter: pointer to string, not string, should be on stack
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Tue, 4 Sep 2012 16:17:07 +0000 (12:17 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Tue, 4 Sep 2012 16:17:07 +0000 (12:17 -0400)
Fixes #329

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
include/lttng/ust-tracepoint-event.h

index 398f3efae5d44fcc0193e8e37016b6314dd7e06e..30414e8176c73c891b0b8a3994693447c5d10d91 100644 (file)
@@ -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
This page took 0.029713 seconds and 4 git commands to generate.