From: Gregory LEOCADIE Date: Thu, 29 Mar 2018 10:52:30 +0000 (+0200) Subject: Fix: use off_t type for lseek function return value to avoid overflow X-Git-Tag: v2.11.0-rc1~280 X-Git-Url: https://git.lttng.org/?a=commitdiff_plain;h=a5df8828164272c26e88028b00e6e1ec88ee222d;hp=a5df8828164272c26e88028b00e6e1ec88ee222d;p=lttng-tools.git Fix: use off_t type for lseek function return value to avoid overflow Context: LTTng is configured in live mode with only one channel, getting traces for a long-running application (days of uptime) The trace file gets bigger (many GBs), so the offset (bigger than int.MaxValue). When getting a packet for such offset, the lseek returns bigger than int.MaxValue. This value is stored in a variable "ret" of type int. We have an overflow which leads to sending an error to the viewer (babeltrace), which stops. [error] get_data_packet: error. [error] get_data_packet failed [error] Unknown return code 0 Signed-off-by: Gregory LEOCADIE Signed-off-by: Jérémie Galarneau ---