Mathieu Desnoyers [Tue, 17 May 2016 15:46:10 +0000 (11:46 -0400)]
Fix: Dereference after NULL check in consumer
Dereference after NULL check in consumer discarded events/lost packets
commands.
Found by Coverity:
CID
1040158 (#1 of 2): Dereference after null check (FORWARD_NULL)24.
var_deref_op: Dereferencing null pointer channel.
CID
1040158 (#2 of 2): Dereference after null check (FORWARD_NULL)24.
var_deref_op: Dereferencing null pointer channel.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Jérémie Galarneau [Wed, 18 May 2016 18:40:51 +0000 (14:40 -0400)]
Tests: abort test on memory allocation failure
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Mathieu Desnoyers [Tue, 17 May 2016 14:48:39 +0000 (10:48 -0400)]
Fix: pointer dereference after NULL check in test_create_ust_event_exclusion
CID
1256182 (#2 of 2): Dereference after null check (FORWARD_NULL)16.
var_deref_op: Dereferencing null pointer exclusion.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Mathieu Desnoyers [Tue, 17 May 2016 14:44:25 +0000 (10:44 -0400)]
Fix: NULL pointer dereference in relay_index_get_by_id_or_create
Found by Coverity:
CID
1323134 (#1 of 1): Dereference after null check (FORWARD_NULL)34.
var_deref_op: Dereferencing null pointer index.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Jérémie Galarneau [Wed, 18 May 2016 18:22:14 +0000 (14:22 -0400)]
Clean-up verbosity incrementation in set_option
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Jérémie Galarneau [Wed, 18 May 2016 17:20:08 +0000 (13:20 -0400)]
Fix: Deference after null check in sessiond set_option
Found by Coverity:
2. var_compare_op: Comparing arg to null implies that arg might be null.
CID
1256137 (#1 of 9): Dereference after null check (FORWARD_NULL)14.
var_deref_model: Passing null pointer arg to strdup, which dereferences
it.
[... same for #2 through #9 ]
This should not really be an issue since
1) options that use the "arg" parameter will not be set by popt if one
is not provided,
2) the configuration file parser will never invoke set_option with
a NULL argument; if no "value" is provided in the file, an empty
string is passed.
The second point is the reason for the "arg && arg[0] == '\0'" check;
we already know that the argument is invalid since an empty string
is never a valid argument for the supported options.
Nonetheless, it makes sense for Coverity to flag this and moving
the check to individual cases, although very verbose, is clear.
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Jérémie Galarneau [Wed, 18 May 2016 16:28:53 +0000 (12:28 -0400)]
Docs: clarify comment in parse_pid_string()
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Mathieu Desnoyers [Tue, 17 May 2016 13:23:50 +0000 (09:23 -0400)]
Fix: Wrong sizeof argument in pid tracker
Found by Coverity:
CID
1292557 (#1 of 1): Wrong sizeof argument
(SIZEOF_MISMATCH)suspicious_sizeof: Passing argument 8UL /* sizeof
(*_pid_list) */ to function zmalloc and then casting the return value to
int * is suspicious.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Mathieu Desnoyers [Tue, 17 May 2016 13:20:17 +0000 (09:20 -0400)]
Fix: tests: incorrect uri index
Initial issue found by Coverity:
CID
1322864 (#1 of 1): Constant expression result
(CONSTANT_EXPRESSION_RESULT)impossible_and: The "and" condition size ==
2L && (uri + 0).dtype == LTTNG_DST_IPV4 && (uri + 0).utype ==
LTTNG_URI_DST && (uri + 0).stype == 0U && (uri + 0).port == 8989 &&
strcmp((uri + 0).subdir, "my/test/path") == 0 && strcmp((uri +
0).dst.ipv4, "127.0.0.1") == 0 && (uri + 1).dtype == LTTNG_DST_IPV4 &&
(uri + 1).utype == LTTNG_URI_DST && (uri + 1).stype == 0U && (uri +
1).port == 4242 && strcmp((uri + 0).subdir, "my/test/path") == 0 &&
strcmp((uri + 1).dst.ipv4, "127.0.0.1") == 0 can never be true because
(uri + 0).subdir cannot be equal to two different values at the same
time.
Review of the test source file led to further fixes.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Mathieu Desnoyers [Tue, 17 May 2016 13:11:39 +0000 (09:11 -0400)]
Fix: Integer overflowed argument
Found by Coverity:
CID
1242317 (#1 of 2): Integer overflowed argument (INTEGER_OVERFLOW)25.
overflow_sink: Overflowed or truncated value (or a value computed from
an overflowed or truncated value) new_nbmem * 304UL used as critical
argument to function.
CID
1242317 (#2 of 2): Integer overflowed argument (INTEGER_OVERFLOW)27.
overflow_sink: Overflowed or truncated value (or a value computed from
an overflowed or truncated value) (new_nbmem - nbmem) * 304UL used as
critical argument to function.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Mathieu Desnoyers [Tue, 17 May 2016 13:01:51 +0000 (09:01 -0400)]
Fix: macro compares unsigned to 0 (no effect)
Found by Coverity:
CID
1262117 (#1 of 1): Macro compares unsigned to 0
(NO_EFFECT)unsigned_compare: This greater-than-or-equal-to-zero
comparison of an unsigned value is always true. events->nb_fd >= 0U.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Michael Jeanson [Tue, 17 May 2016 18:12:09 +0000 (14:12 -0400)]
Fix: Free variable before strdup() in process_event_node
Fixes coverity #
1243040
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Michael Jeanson [Tue, 17 May 2016 18:08:00 +0000 (14:08 -0400)]
Fix: Free variables before strdup()
Fixes coverity #
1243047 and #
1243050
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Michael Jeanson [Mon, 16 May 2016 23:33:08 +0000 (19:33 -0400)]
Fix: Add missing free() in spawn_viewer
Fixes coverity #
1291948
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Michael Jeanson [Mon, 16 May 2016 23:27:30 +0000 (19:27 -0400)]
Fix: Add missing free() in utils_partial_realpath
Fixes coverity #
1328401
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Michael Jeanson [Mon, 16 May 2016 23:07:25 +0000 (19:07 -0400)]
Fix: Use distinct variables for ret and discarded_events
Fix coverity #
1352682
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Michael Jeanson [Mon, 16 May 2016 22:55:57 +0000 (18:55 -0400)]
Fix: Don't try to show manpage when argv is null
Fixes coverity #
1353461
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Michael Jeanson [Mon, 16 May 2016 22:48:54 +0000 (18:48 -0400)]
Fix: Use secure_getenv() in get_man_bin_path
Fixes coverity #
1353462
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Mathieu Desnoyers [Tue, 17 May 2016 01:43:03 +0000 (21:43 -0400)]
Fix: illegal memory access in test_create_ust_event_exclusion
Found by Coverity:
CID
1243019 (#1 of 1): Buffer not null terminated
(BUFFER_SIZE_WARNING)1. buffer_size_warning: Calling strncpy with a
maximum size argument of 256 bytes on destination array ev.name of size
256 bytes might leave the destination string unterminated.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Mathieu Desnoyers [Tue, 17 May 2016 01:43:02 +0000 (21:43 -0400)]
Fix: illegal memory access in test_create_ust_event
Found by Coverity:
CID
1243026 (#1 of 1): Buffer not null terminated
(BUFFER_SIZE_WARNING)1. buffer_size_warning: Calling strncpy with a
maximum size argument of 256 bytes on destination array ev.name of size
256 bytes might leave the destination string unterminated.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Mathieu Desnoyers [Tue, 17 May 2016 01:43:01 +0000 (21:43 -0400)]
Fix: illegal memory access in test_create_kernel_event
Found by Coverity:
CID
1243030 (#1 of 1): Buffer not null terminated (BUFFER_SIZE_WARNING)1.
buffer_size_warning: Calling strncpy with a maximum size argument of 256
bytes on destination array ev.name of size 256 bytes might leave the
destination string unterminated.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Mathieu Desnoyers [Tue, 17 May 2016 01:43:00 +0000 (21:43 -0400)]
Fix: illegal memory access in test_create_ust_channel
Found by Coverity:
CID
1243032 (#1 of 1): Buffer not null terminated (BUFFER_SIZE)1.
buffer_size: Calling strncpy with a source string whose length (8 chars)
is greater than or equal to the size argument (8) will fail to
null-terminate attr.name.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Mathieu Desnoyers [Tue, 17 May 2016 01:42:59 +0000 (21:42 -0400)]
Fix: illegal memory access in send_viewer_streams
Found by Coverity:
CID
1243037 (#1 of 2): Buffer not null terminated
(BUFFER_SIZE_WARNING)18. buffer_size_warning: Calling strncpy with a
maximum size argument of 4096 bytes on destination array
send_stream.path_name of size 4096 bytes might leave the destination
string unterminated.
CID
1243037 (#2 of 2): Buffer not null terminated
(BUFFER_SIZE_WARNING)18. buffer_size_warning: Calling strncpy with a
maximum size argument of 255 bytes on destination array
send_stream.channel_name of size 255 bytes might leave the destination
string unterminated.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Jérémie Galarneau [Tue, 17 May 2016 05:52:18 +0000 (01:52 -0400)]
Simplify rcu locking in viewer_list_sessions
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Mathieu Desnoyers [Tue, 17 May 2016 01:42:58 +0000 (21:42 -0400)]
Fix: illegal memory access in viewer_list_sessions
Found by Coverity:
CID
1243025 (#1 of 2): Buffer not null terminated
(BUFFER_SIZE_WARNING)17. buffer_size_warning: Calling strncpy with a
maximum size argument of 64 bytes on destination array
send_session->hostname of size 64 bytes might leave the destination
string unterminated.
CID
1243025 (#2 of 2): Buffer not null terminated
(BUFFER_SIZE_WARNING)17. buffer_size_warning: Calling strncpy with a
maximum size argument of 255 bytes on destination array
send_session->session_name of size 255 bytes might leave the destination
string unterminated.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Mathieu Desnoyers [Tue, 17 May 2016 01:42:57 +0000 (21:42 -0400)]
Fix: illegal memory access in relayd_add_stream
Found by Coverity:
CID
1243017 (#1 of 4): Buffer not null terminated
(BUFFER_SIZE_WARNING)14. buffer_size_warning: Calling strncpy with a
maximum size argument of 264 bytes on destination array msg.channel_name
of size 264 bytes might leave the destination string unterminated.
ID
1243017 (#2 of 4): Buffer not null terminated
(BUFFER_SIZE_WARNING)14. buffer_size_warning: Calling strncpy with a
maximum size argument of 264 bytes on destination array
msg_2_2.channel_name of size 264 bytes might leave the destination
string unterminated.
CID
1243017 (#3 of 4): Buffer not null terminated
(BUFFER_SIZE_WARNING)15. buffer_size_warning: Calling strncpy with a
maximum size argument of 4096 bytes on destination array msg.pathname of
size 4096 bytes might leave the destination string unterminated.
CID
1243017 (#4 of 4): Buffer not null terminated
(BUFFER_SIZE_WARNING)15. buffer_size_warning: Calling strncpy with a
maximum size argument of 4096 bytes on destination array
msg_2_2.pathname of size 4096 bytes might leave the destination string
unterminated.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Mathieu Desnoyers [Tue, 17 May 2016 01:42:56 +0000 (21:42 -0400)]
Fix: illegal memory access in relayd_create_session_2_4
Found by Coverity:
CID
1243024 (#1 of 2): Buffer not null terminated
(BUFFER_SIZE_WARNING)2. buffer_size_warning: Calling strncpy with a
maximum size argument of 255 bytes on destination array msg.session_name
of size 255 bytes might leave the destination string unterminated.
CID
1243024 (#2 of 2): Buffer not null terminated
(BUFFER_SIZE_WARNING)3. buffer_size_warning: Calling strncpy with a
maximum size argument of 64 bytes on destination array msg.hostname of
size 64 bytes might leave the destination string unterminated.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Mathieu Desnoyers [Tue, 17 May 2016 01:42:55 +0000 (21:42 -0400)]
Fix: illegal memory access in session_create
Found by Coverity:
CID
1323138 (#1 of 2): Buffer not null terminated
(BUFFER_SIZE_WARNING)3. buffer_size_warning: Calling strncpy with a
maximum size argument of 64 bytes on destination array session->hostname
of size 64 bytes might leave the destination string unterminated.
CID
1323138 (#2 of 2): Buffer not null terminated
(BUFFER_SIZE_WARNING)3. buffer_size_warning: Calling strncpy with a
maximum size argument of 255 bytes on destination array
session->session_name of size 255 bytes might leave the destination
string unterminated.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Mathieu Desnoyers [Tue, 17 May 2016 01:42:54 +0000 (21:42 -0400)]
Fix: illegal memory access in consumer_set_subdir
Found by Coverity:
CID
1243015 (#1 of 1): Buffer not null terminated
(BUFFER_SIZE_WARNING)8. buffer_size_warning: Calling strncpy with a
maximum size argument of 4096 bytes on destination array
consumer->subdir of size 4096 bytes might leave the destination string
unterminated.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Mathieu Desnoyers [Tue, 17 May 2016 01:42:53 +0000 (21:42 -0400)]
Fix: illegal memory access in syscall_init_table
Found by Coverity:
CID
1243021 (#1 of 1): Buffer not null terminated
(BUFFER_SIZE_WARNING)25. buffer_size_warning: Calling strncpy with a
maximum size argument of 255 bytes on destination array (syscall_table +
index).name of size 255 bytes might leave the destination string
unterminated.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Mathieu Desnoyers [Tue, 17 May 2016 01:42:52 +0000 (21:42 -0400)]
Fix: illegal memory access in write_pidfile
Found by Coverity:
CID
1243023 (#1 of 1): Buffer not null terminated
(BUFFER_SIZE_WARNING)3. buffer_size_warning: Calling strncpy with a
maximum size argument of 4096 bytes on destination array pidfile_path of
size 4096 bytes might leave the destination string unterminated.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Mathieu Desnoyers [Tue, 17 May 2016 01:42:51 +0000 (21:42 -0400)]
Fix: illegal memory access in list_lttng_channels
Found by Coverity:
CID
1243018 (#1 of 1): Buffer not null terminated
(BUFFER_SIZE_WARNING)11. buffer_size_warning: Calling strncpy with a
maximum size argument of 256 bytes on destination array (channels +
i).name of size 256 bytes might leave the destination string
unterminated.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Mathieu Desnoyers [Tue, 17 May 2016 01:42:50 +0000 (21:42 -0400)]
Fix: illegal memory access in cmd_snapshot_record
Found by Coverity:
CID
1243027 (#1 of 1): Buffer not null terminated
(BUFFER_SIZE_WARNING)20. buffer_size_warning: Calling strncpy with a
maximum size argument of 255 bytes on destination array tmp_output.name
of size 255 bytes might leave the destination string unterminated.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Mathieu Desnoyers [Tue, 17 May 2016 01:42:49 +0000 (21:42 -0400)]
Fix: illegal memory access in output_init
Found by Coverity:
CID
1243028 (#1 of 2): Buffer not null terminated
(BUFFER_SIZE_WARNING)5. buffer_size_warning: Calling strncpy with a
maximum size argument of 255 bytes on destination array output->name of
size 255 bytes might leave the destination string unterminated.
CID
1243028 (#2 of 2): Buffer not null terminated
(BUFFER_SIZE_WARNING)10. buffer_size_warning: Calling strncpy with a
maximum size argument of 4096 bytes on destination array
output->consumer->dst.trace_path of size 4096 bytes might leave the
destination string unterminated.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Mathieu Desnoyers [Tue, 17 May 2016 01:42:48 +0000 (21:42 -0400)]
Fix: illegal memory access in consumer_set_network_uri
Found by Coverity:
CID
1243029 (#1 of 1): Buffer not null terminated
(BUFFER_SIZE_WARNING)31. buffer_size_warning: Calling strncpy with a
maximum size argument of 4096 bytes on destination array obj->subdir of
size 4096 bytes might leave the destination string unterminated.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Mathieu Desnoyers [Tue, 17 May 2016 01:42:47 +0000 (21:42 -0400)]
Fix: illegal memory access in cmd_snapshot_list_outputs
Found by Coverity:
CID
1243031 (#1 of 2): Buffer not null terminated
(BUFFER_SIZE_WARNING)22. buffer_size_warning: Calling strncpy with a
maximum size argument of 4096 bytes on destination array (list +
idx).ctrl_url of size 4096 bytes might leave the destination string
unterminated.
CID
1243031 (#2 of 2): Buffer not null terminated
(BUFFER_SIZE_WARNING)26. buffer_size_warning: Calling strncpy with a
maximum size argument of 255 bytes on destination array (list +
idx).name of size 255 bytes might leave the destination string
unterminated.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Mathieu Desnoyers [Tue, 17 May 2016 01:42:46 +0000 (21:42 -0400)]
Fix: illegal memory access in list_events
Found by Coverity:
CID
1243022 (#1 of 1): Buffer not null terminated
(BUFFER_SIZE_WARNING)23. buffer_size_warning: Calling strncpy with a
maximum size argument of 256 bytes on destination array (tmp_events +
i).name of size 256 bytes might leave the destination string
unterminated.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Mathieu Desnoyers [Tue, 17 May 2016 01:42:45 +0000 (21:42 -0400)]
Fix: illegal memory access in disable_event
Found by Coverity:
CID
1243016 (#1 of 1): Buffer not null terminated
(BUFFER_SIZE_WARNING)14. buffer_size_warning: Calling strncpy with a
maximum size argument of 256 bytes on destination array msg.name of size
256 bytes might leave the destination string unterminated.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Mathieu Desnoyers [Tue, 17 May 2016 01:42:44 +0000 (21:42 -0400)]
Fix: illegal memory access in enable_event
Found by Coverity:
CID
1243033 (#1 of 1): Buffer not null terminated
(BUFFER_SIZE_WARNING)16. buffer_size_warning: Calling strncpy with a
maximum size argument of 256 bytes on destination array msg.name of size
256 bytes might leave the destination string unterminated.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Mathieu Desnoyers [Tue, 17 May 2016 01:42:43 +0000 (21:42 -0400)]
Fix: illegal memory access in add_uri_to_consumer
Found by Coverity:
CID
1243038 (#1 of 1): Buffer not null terminated
(BUFFER_SIZE_WARNING)15. buffer_size_warning: Calling strncpy with a
maximum size argument of 4096 bytes on destination array
consumer->dst.trace_path of size 4096 bytes might leave the destination
string unterminated.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Mathieu Desnoyers [Tue, 17 May 2016 01:42:42 +0000 (21:42 -0400)]
Fix: illegal memory access in init_ust_event_from_agent_event
Found by Coverity:
CID
1321741 (#1 of 1): Buffer not null terminated
(BUFFER_SIZE_WARNING)1. buffer_size_warning: Calling strncpy with a
maximum size argument of 256 bytes on destination array
ust_event->attr.name of size 256 bytes might leave the destination
string unterminated.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Jérémie Galarneau [Tue, 17 May 2016 02:39:59 +0000 (22:39 -0400)]
Simplify free() of channel attribute
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Mathieu Desnoyers [Tue, 17 May 2016 01:42:41 +0000 (21:42 -0400)]
Fix: illegal memory access in _cmd_enable_event
Found by Coverity:
CID
1321742 (#1 of 2): Buffer not null terminated
(BUFFER_SIZE_WARNING)21. buffer_size_warning: Calling strncpy with a
maximum size argument of 256 bytes on destination array attr->name of
size 256 bytes might leave the destination string unterminated.
CID
1321742 (#2 of 2): Buffer not null terminated
(BUFFER_SIZE_WARNING)22. buffer_size_warning: Calling strncpy with a
maximum size argument of 256 bytes on destination array attr->name of
size 256 bytes might leave the destination string unterminated.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Mathieu Desnoyers [Tue, 17 May 2016 01:42:40 +0000 (21:42 -0400)]
Implement lttng_strncpy safe string copy
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Jérémie Galarneau [Mon, 16 May 2016 18:10:54 +0000 (14:10 -0400)]
Add missing symbol to preserve ABI compatibility of liblttng-ctl
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Jérémie Galarneau [Mon, 16 May 2016 16:10:19 +0000 (12:10 -0400)]
Fix: loading a session prints an error message but the load is successful
Fixes #1013
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Jérémie Galarneau [Mon, 16 May 2016 05:20:47 +0000 (01:20 -0400)]
Snapshot warning if there are no events in one of the domains
Remove the "no data" check from the UST snapshot code since
1) It would report that no data was recorded in the snapshot even
if the kernel tracer had recorded events,
2) The kernel consumer does not seem to report such a condition,
making it hard to perform the check without modifying the
consumer.
The consumer interfaces could be modified to reliably provide
this information in the future.
However, this warning is not provided in the other tracing
modes, making its usefulness questionable. An empty snapshot is
still a valid trace and users should not always expect a trace
to contain events. Moreover, "warning" that no data was produced
implies an error may have occured and is probably as confusing
as opening an empty trace to the average user.
Fixes #1012
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Jérémie Galarneau [Mon, 16 May 2016 04:21:20 +0000 (00:21 -0400)]
Clarify kernel version check error messages
Refs #949
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Jonathan Rajotte [Mon, 26 Oct 2015 14:21:05 +0000 (10:21 -0400)]
Tests: same event name with different descriptor on load
Refs #959
Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Jonathan Rajotte [Fri, 23 Oct 2015 15:32:44 +0000 (11:32 -0400)]
Fix: load event state (enabled/disabled) correctly
This bug fix is a workaround due to limitations of lttng_disable_event_ext
regarding the disabling of events with similar name but different
characteristics. Although lttng_disable_event_ext provides support for
disabling by name and filter string it does not support exclusion.
The loading of events is cut in 3 phases.
1 - Create all events regardless of their state.
2 - Disable all events.
3 - Enable only the events with the 'enabled' state.
Fixes #959
Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Jérémie Galarneau [Mon, 16 May 2016 02:06:01 +0000 (22:06 -0400)]
Fix: Error reported if no domain is provided for start/stop
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Jérémie Galarneau [Sun, 15 May 2016 21:38:55 +0000 (17:38 -0400)]
Handle unknown domain in MI
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Jérémie Galarneau [Sun, 15 May 2016 21:38:41 +0000 (17:38 -0400)]
Handle unknown domain on session start
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Jérémie Galarneau [Thu, 5 Nov 2015 21:19:38 +0000 (16:19 -0500)]
Fix: loading of live session within userspace domains
The output of a session is session-specific and not bound to
a domain. The "lttng_set_consumer_url" already acts on a
session-wide basis.
Fixes #973
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Jonathan Rajotte [Thu, 5 Nov 2015 21:42:50 +0000 (16:42 -0500)]
Test: expose session url bug on load with multiple domains
When loading a live session with multiple domain lttng return code
21 which corresponds to the URL being already set.
Refs #973
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Jérémie Galarneau [Sun, 15 May 2016 20:20:48 +0000 (16:20 -0400)]
OOT build fix: asciidoc.conf is now generated at configure
asciidoc.conf is now generated at configure-time and must be
retrieved from the build directory, not the source directory.
This causes the out-of-tree build to fail.
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Jonathan Rajotte [Fri, 13 Nov 2015 15:36:47 +0000 (10:36 -0500)]
Snapshot: record: use same datetime for snapshot folder output
Make sure that the ust snapshot is put under the same folder as the
kernel snapshot.
Fixes #970
Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Jonathan Rajotte [Fri, 13 Nov 2015 15:30:01 +0000 (10:30 -0500)]
Refactor: move the snapshot type check into output type check
Since for both sub-session type the boilerplate is the same
simply move the check for sub-session type presence to the inner
check of type output.
Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Philippe Proulx [Thu, 7 Apr 2016 03:57:36 +0000 (23:57 -0400)]
ust-metadata.c: nest/indent enumeration entries
Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Philippe Proulx [Tue, 10 May 2016 19:31:58 +0000 (15:31 -0400)]
lttng.c: show basic help when no arguments are provided
Fixes #1011
Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Philippe Proulx [Tue, 10 May 2016 19:08:00 +0000 (15:08 -0400)]
Define command short descriptions in configure.ac
Refs #1011
Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Philippe Proulx [Wed, 4 May 2016 20:48:28 +0000 (16:48 -0400)]
lttng-relayd(8): $HOME -> $LTTNG_HOME
Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Philippe Proulx [Wed, 4 May 2016 20:47:51 +0000 (16:47 -0400)]
doc/man: use propagated default values in man pages
Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Philippe Proulx [Wed, 4 May 2016 20:24:10 +0000 (16:24 -0400)]
Propagate default values from configure.ac to asciidoc.conf
Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Philippe Proulx [Wed, 4 May 2016 19:57:36 +0000 (15:57 -0400)]
Define default values in configure.ac
This patch moves the definitions of the various default values of
LTTng-tools to configure.ac, so that the code and the man pages can
share the same default values.
Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Philippe Proulx [Wed, 4 May 2016 16:39:03 +0000 (12:39 -0400)]
lttng-load(1): use lists to explain the input path behaviour
Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Philippe Proulx [Wed, 4 May 2016 16:35:47 +0000 (12:35 -0400)]
lttng-sessiond(8): fix load directories and behaviour
Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Philippe Proulx [Wed, 4 May 2016 15:19:32 +0000 (11:19 -0400)]
lttng-load(1): specify default search order
Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Philippe Proulx [Wed, 4 May 2016 15:00:50 +0000 (11:00 -0400)]
doc/man: use configured directories in man pages
Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Philippe Proulx [Thu, 7 Apr 2016 07:19:29 +0000 (03:19 -0400)]
doc/man/asciidoc.conf: add doctype-manpage conditions
Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Philippe Proulx [Thu, 7 Apr 2016 07:17:21 +0000 (03:17 -0400)]
doc/man: linklttng macro -> man macro
This macro is shorter, and some referenced man pages are not
LTTng man pages, so the linklttng name makes little sense.
Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Philippe Proulx [Thu, 7 Apr 2016 07:13:14 +0000 (03:13 -0400)]
doc/man/Makefile.am: add failing dist-hook on --disable-man-pages
Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Philippe Proulx [Thu, 7 Apr 2016 07:13:03 +0000 (03:13 -0400)]
doc/man/Makefile.am: fix top comment
Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Philippe Proulx [Thu, 7 Apr 2016 07:12:44 +0000 (03:12 -0400)]
configure.ac: fix --enable-man-pages help string
Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Philippe Proulx [Sat, 2 Apr 2016 20:14:17 +0000 (16:14 -0400)]
Fix: standardize parser/lexer building
This patch makes the build system act as follows:
if in Git repo:
require bison/flex (configure)
build parser/lexer (make, make clean)
else:
if bison exists:
build parser (make, make clean)
else:
warn that bison is missing (configure)
create "error" parser target in Makefile (make)
do not clean parser (make clean not available)
if flex exists:
build lexer (make, make clean)
else:
warn that flex is missing (configure)
create "error" lexer target in Makefile (make)
do not clean lexer (make clean not available)
Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Philippe Proulx [Sat, 2 Apr 2016 02:15:53 +0000 (22:15 -0400)]
Fix: standardize man pages building/installing
This patch makes the build system act as follows:
if --enable-man-pages:
if in Git repo:
require asciidoc/xmlto (configure)
build man pages (make, make clean)
install man pages (make install)
distribute man pages (make dist)
else:
if asciidoc/xmlto both exist:
build man pages (make, make clean)
install man pages (make install)
distribute man pages (make dist)
else:
warn that asciidoc/xmlto are missing (configure)
create "error" man page targets in Makefile (make)
do not clean man pages (make clean not available)
install distributed man pages (make install)
distribute distributed man pages (make dist)
else if --disable-man-pages:
do not build man pages (make, make clean not available)
do not install man pages (make install not available)
do not distribute man pages (make dist not available)
Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Philippe Proulx [Tue, 10 May 2016 20:00:28 +0000 (16:00 -0400)]
configure.ac: check for an existing liburcu-cds symbol
Fixes #1001
Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Philippe Proulx [Tue, 10 May 2016 19:51:17 +0000 (15:51 -0400)]
configure.ac: use macro for wrong liburcu error message
Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Jérémie Galarneau [Sat, 14 May 2016 21:31:39 +0000 (17:31 -0400)]
Hide parse_application_context utility function
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Jérémie Galarneau [Sat, 14 May 2016 21:29:15 +0000 (17:29 -0400)]
Re-add deprecated MI symbols to preserve ABI compatibility
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Jérémie Galarneau [Sat, 14 May 2016 21:28:35 +0000 (17:28 -0400)]
Hide new MI symbols introduced as part of 2.8
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Jérémie Galarneau [Sat, 14 May 2016 21:23:34 +0000 (17:23 -0400)]
Re-add default size symbols which were erroneously exposed
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Jérémie Galarneau [Sat, 14 May 2016 21:09:45 +0000 (17:09 -0400)]
Hide config symbols introduced in 2.8
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Jérémie Galarneau [Sat, 14 May 2016 21:01:43 +0000 (17:01 -0400)]
Hide internal _lttng_destroy_session symbol
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Jérémie Galarneau [Sat, 14 May 2016 21:01:16 +0000 (17:01 -0400)]
Hide bytecode symbol iterator API symbols
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Jérémie Galarneau [Sat, 14 May 2016 20:27:20 +0000 (16:27 -0400)]
Tests: wording of trace_matches is misleading
trace_matches reports a number of "events found" in a trace while it
actually counts the number of event_name matches.
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Mathieu Desnoyers [Wed, 11 May 2016 17:15:25 +0000 (13:15 -0400)]
Test lttng-modules clock override plugin
[ For both master and stable-2.8 branches. ]
Fixes: #939
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Jérémie Galarneau [Sat, 14 May 2016 19:30:35 +0000 (15:30 -0400)]
Warning fix: uninitialized variable may be used
GCC warns that discarded_events and lost_packets may be used
uninitialized (NULL).
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Michael Jeanson [Thu, 12 May 2016 19:20:33 +0000 (15:20 -0400)]
Tests: Replace prove by autotools tap runner
This patch removes the dependency on the prove perl script
to run the TAP test suite. It replaces it with the autotools
shell TAP driver that only requires a shell and awk.
Custom arguments can be passed to the test runner with
env variables as follow:
env LOG_DRIVER_FLAGS='--comments --ignore-exit' \
TESTS='foo.test baz.test' make -e check
This tap driver also creates a log file for each test that
can then be used by another system to build a test report.
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Michael Jeanson [Thu, 12 May 2016 16:07:56 +0000 (12:07 -0400)]
Drop installcheck target
The installcheck target is supposed to be used to run tests on the
installed files, however our current implementation runs the exact same
tests in the build directory as the check target, which makes it useless.
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Mathieu Desnoyers [Thu, 12 May 2016 20:08:47 +0000 (16:08 -0400)]
Fix: distcheck requires that we clean version.h
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Mathieu Desnoyers [Thu, 12 May 2016 20:08:46 +0000 (16:08 -0400)]
Fix: configure: forbid Python bindings if shared libraries are disabled
Fixes: #977
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Mathieu Desnoyers [Thu, 12 May 2016 20:08:45 +0000 (16:08 -0400)]
Fix: tests: don't match command line arguments, match static build binary names
Don't match command line arguments for lttng-sessiond, lttng-relayd,
lttng-consumerd, lttng-runas, lt-lttng-sessiond, lt-lttng-relayd, only
match the executables.
Otherwise, if any unrelated command on the system match those as
arguments (e.g. text editor opening a text file), it hangs the tests.
Static build don't generate a lt-lttng-sessiond as binary name. Expect
lttng-session for this case.
Static build don't generate a lt-lttng-relayd as binary name. Expect
lttng-relayd for this case.
Fixes: #977
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Mathieu Desnoyers [Thu, 12 May 2016 20:08:44 +0000 (16:08 -0400)]
Fix: tests: skip tests on static build
Skip tests that depend on shared objects on static build rather than
bailing out, which will let the overall test suite succeed.
Fixes: #977
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Mathieu Desnoyers [Thu, 12 May 2016 20:08:43 +0000 (16:08 -0400)]
Fix: tests: don't build dynamic lib tests if support disabled
Fixes: #977
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Jérémie Galarneau [Thu, 12 May 2016 16:44:14 +0000 (12:44 -0400)]
bootstrap: Standardize on autoreconf -vi
Don't overwrite already generated files.
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Jérémie Galarneau [Thu, 5 May 2016 02:49:31 +0000 (22:49 -0400)]
Move unix.h wrapper from sessiond-comm to common
Fixes #951
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Antoine Busque [Wed, 20 Apr 2016 19:57:35 +0000 (15:57 -0400)]
Fix: update tests following renaming of UST statedump event
This fixes regression tests that failed due to the renaming of
`lttng_ust_statedump:soinfo` to `lttng_ust_statedump:bin_info`.
Signed-off-by: Antoine Busque <abusque@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Michael Jeanson [Tue, 19 Apr 2016 20:34:55 +0000 (16:34 -0400)]
Typo: catched -> caught
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Jérémie Galarneau [Thu, 14 Apr 2016 19:35:33 +0000 (15:35 -0400)]
Add comment describing ioctl number duplication
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
This page took 0.053734 seconds and 4 git commands to generate.