Fix: report truncated files while reading
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Tue, 6 Feb 2018 20:40:19 +0000 (15:40 -0500)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Tue, 20 Feb 2018 16:03:03 +0000 (11:03 -0500)
commit7f965b97207a777ffd9b6b9e5bff514067aa9f5f
tree708ccebd0d7d96582306100e7bd63f56ab9af6bc
parentc33acfecd877bbdfff04aec03844d6a894a1a15e
Fix: report truncated files while reading

When index files are available, this ensures we report the issue
properly before mapping a truncated packet rather than hitting a
SIGBUS.

For traces without index files, remove the check that was done at
index creation, and use the new check done when mapping the packet
instead. This ensures babeltrace can print stream data prior to the
truncated packet for this stream.

TODO: What is _not_ done in this patch is changing handling of truncated
packets: this should be treated as a warning rather than an error, so
processing of other streams continue.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
CC: Jonathan Rajotte-Julien <jonathan.rajotte-julien@efficios.com>
CC: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
formats/ctf/ctf.c
include/babeltrace/ctf/types.h
This page took 0.025591 seconds and 4 git commands to generate.