Fix: header size larger than 256 bytes
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Sun, 25 Oct 2015 15:23:31 +0000 (11:23 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Sun, 25 Oct 2015 15:27:02 +0000 (11:27 -0400)
When adding large context (e.g. callstack), headers larger than 256
bytes cause discrepancy between calculated size and size written into
the trace buffers. This generates a corrupted trace and triggers a
warning in ring buffer backend, which triggers a safety net disabling
tracing for the current channel.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
lttng-ring-buffer-client.h
lttng-ring-buffer-metadata-client.h

index 7055e770734e52a6f339f3c6b78e1c7913f07a1d..a675e48cf678cc6a00741e12678895e478ae9d3b 100644 (file)
@@ -122,7 +122,7 @@ void ctx_record(struct lib_ring_buffer_ctx *bufctx,
  * contains.
  */
 static __inline__
-unsigned char record_header_size(const struct lib_ring_buffer_config *config,
+size_t record_header_size(const struct lib_ring_buffer_config *config,
                                 struct channel *chan, size_t offset,
                                 size_t *pre_header_padding,
                                 struct lib_ring_buffer_ctx *ctx)
index 9e0353042517e5fbb38dd191778aab51e3ed7800..4945ce463ed565a977edb738120c3ae64ab5101f 100644 (file)
@@ -55,7 +55,7 @@ u64 lib_ring_buffer_clock_read(struct channel *chan)
 }
 
 static inline
-unsigned char record_header_size(const struct lib_ring_buffer_config *config,
+size_t record_header_size(const struct lib_ring_buffer_config *config,
                                 struct channel *chan, size_t offset,
                                 size_t *pre_header_padding,
                                 struct lib_ring_buffer_ctx *ctx)
This page took 0.028613 seconds and 4 git commands to generate.