Fix: string length calculation reversed user vs kernel args
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 23 Apr 2015 21:13:41 +0000 (17:13 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 23 Apr 2015 21:13:41 +0000 (17:13 -0400)
Only affects feature recently merged into master.

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

index 58f4e1200d860f6b01294e6a1b6f341300cb1d09..a6c36b088dfba22ab12a7cf162c7880087dff578 100644 (file)
@@ -327,10 +327,10 @@ static void __event_probe__##_name(void *__data);
 #define _ctf_string(_item, _src, _user, _nowrite)                             \
        if (_user)                                                             \
                __event_len += __dynamic_len[__dynamic_len_idx++] =            \
-                       strlen(_src) + 1;                                      \
+                       max_t(size_t, lttng_strlen_user_inatomic(_src), 1);    \
        else                                                                   \
                __event_len += __dynamic_len[__dynamic_len_idx++] =            \
-                       max_t(size_t, lttng_strlen_user_inatomic(_src), 1);
+                       strlen(_src) + 1;
 
 #undef TP_PROTO
 #define TP_PROTO(...)  __VA_ARGS__
This page took 0.035013 seconds and 4 git commands to generate.