Fix: src.ctf.fs: use BT_COMP_OR_COMP_CLASS_LOGE_APPEND_CAUSE when applicable
Some functions in src.ctf.fs use BT_COMP_LOGE_APPEND_CAUSE when they
encounter an error. However, they can be called in component class
context (as part of query handling). A NULL self_comp can therefore be
passed to BT_COMP_LOGE_APPEND_CAUSE, which results in assertions like:
LIB/CUR-THREAD bt_current_thread_error_append_cause_from_component@current-thread.c:132 Babeltrace 2 library precondition not satisfied; error is:
LIB/CUR-THREAD bt_current_thread_error_append_cause_from_component@current-thread.c:132 Component is NULL:
LIB/CUR-THREAD bt_current_thread_error_append_cause_from_component@current-thread.c:132 Aborting...
These functions should use BT_COMP_OR_COMP_CLASS_LOGE_APPEND_CAUSE and
receive both a self_comp and a self_comp_class. This requires adding a
self_comp_class field to ctf_fs_create, which is mutually exclusive with
the self_comp field (since we are only in one of these contexts, not
both).
Change-Id: I9fc3ed1ac03a6f3bdb5b7c25b38264015d073116
Signed-off-by: Simon Marchi <simon.marchi@efficios.com>
Reviewed-on: https://review.lttng.org/c/babeltrace/+/2213
Reviewed-by: Francis Deslauriers <francis.deslauriers@efficios.com>
Tested-by: jenkins <jenkins@lttng.org>
This page took 0.026971 seconds and 4 git commands to generate.