On Wed, 2019-03-13 at 08:59 -0400, Philippe Proulx wrote: > On Wed, Mar 13, 2019 at 8:46 AM Doug Schaefer < > [email protected]> wrote: > > Very cool. Would explicitly setting the byte order for each field be > a short term workaround? > > You found a very specific scenario highlighting this bug. > > Some field types are copied behind the scenes for resolving purposes. > This is done in bt_ctf_stream_class_add_event_class() and > bt_ctf_writer_create_stream(). The effective byte order of the > original > (`data_length_type` for example) remains unset, while the internal > copy > is set. However you use the originals to create fields. > > Without the patch, a temporary fix would be to put all the field type > references and get the copies (which have the correct byte order) > using > bt_ctf_event_class_get_field_by_name() and > bt_ctf_field_sequence_get_field() _after_ calling > bt_ctf_writer_create_stream() in your specific case. >
I'll use the patch ☺. I was somewhat following the CTF Writer API python example which implied I could use the original. Is that not the case? Thanks! Doug _______________________________________________ lttng-dev mailing list [email protected] https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
