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:26:52 +0000 (11:26 -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 4fffab981affbd2064bc2724bb03eabe67f0acc5..e882f4936316eb95e9bbc3a74dc64c89bec00133 100644 (file)
@@ -124,7 +124,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 3c9a3d8f100c84c433b06e6b2ffbd22ed3db505a..fe1abb7b6dfe827bcf2918633d2cdd298fda3edf 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.027508 seconds and 4 git commands to generate.