Fix: double length of __dynamic_len array
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fri, 5 Jul 2013 02:20:25 +0000 (22:20 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fri, 5 Jul 2013 02:21:37 +0000 (22:21 -0400)
This is required by the newly introduced __dynamic_array_enc_ext_2() and
tp_memcpy_dyn_2().

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
probes/lttng-events.h

index 96062042d038ab4303fd9f2b71fce4401ea33e42..bf2e2b9d1df5364cc3213fc70345c38f21d7fd5a 100644 (file)
@@ -744,6 +744,11 @@ __assign_##dest##_3:                                                       \
 #define _TP_SESSION_CHECK(session, csession)   1
 #endif /* TP_SESSION_CHECK */
 
+/*
+ * __dynamic_len array length is twice the number of fields due to
+ * __dynamic_array_enc_ext_2() and tp_memcpy_dyn_2(), which are the
+ * worse case, needing 2 entries per field.
+ */
 #undef DECLARE_EVENT_CLASS
 #define DECLARE_EVENT_CLASS(_name, _proto, _args, _tstruct, _assign, _print)  \
 static void __event_probe__##_name(void *__data, _proto)                     \
@@ -753,7 +758,7 @@ static void __event_probe__##_name(void *__data, _proto)                  \
        struct lib_ring_buffer_ctx __ctx;                                     \
        size_t __event_len, __event_align;                                    \
        size_t __dynamic_len_idx = 0;                                         \
-       size_t __dynamic_len[ARRAY_SIZE(__event_fields___##_name)];           \
+       size_t __dynamic_len[2 * ARRAY_SIZE(__event_fields___##_name)];       \
        struct __event_typemap__##_name __typemap;                            \
        int __ret;                                                            \
                                                                              \
This page took 0.029562 seconds and 4 git commands to generate.