* Babeltrace 2.1: filter.lttng-utils.debug-info aborts unless event class IDs are 0…n-1
@ 2026-11-11 11:29 Moessbauer, Felix via lttng-dev
0 siblings, 0 replies; only message in thread
From: Moessbauer, Felix via lttng-dev @ 2026-11-11 11:29 UTC (permalink / raw)
To: Moessbauer, Felix via lttng-dev
Hi,
I just stumbled upon the following bug in the Babeltrace 2.1
filter.lttng-utils.debug-info plugin:
When passing a trace (e.g. an already pre-filtered one) with event
classes with non sequential event ids, the plugin crashes with the
following assertion:
plugins/lttng-utils/debug-info/trace-ir-mapping.hpp:246:
borrow_metadata_maps_from_input_event_class(): Assertion
`in_event_class' failed.
LTTng's own traces work, because LTTng numbers event classes 0...n in
each stream class.
The cause is in src/plugins/lttng-utils/debug-info/trace-ir-metadata-
copy.cpp, copy_stream_class_content() (around lines 442–447 on stable-
2.1), the loop over a stream class's event classes looks them up by ID
using the loop index:
ec_number = bt_stream_class_get_event_class_count(in_stream_class);
for (ec_idx = 0; ec_idx < ec_number; ec_idx++) {
const bt_event_class *in_event_class =
bt_stream_class_borrow_event_class_by_id_const(in_stream_class,
ec_idx);
out_event_class =
trace_ir_mapping_borrow_mapped_event_class(ir_maps, in_event_class);
...
A simple fix is to lookup the event class up by index:
const bt_event_class *in_event_class =
bt_stream_class_borrow_event_class_by_index_const(in_stream_class,
ec_idx);
Best regards,
Felix Moessbauer
--
Siemens AG
Linux Expert Center
Friedrich-Ludwig-Bauer-Str. 3
85748 Garching, Germany
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2026-11-11 11:29 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-11 11:29 Babeltrace 2.1: filter.lttng-utils.debug-info aborts unless event class IDs are 0…n-1 Moessbauer, Felix via lttng-dev
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox