Fix: bfcr_get_sequence_length_cb(): do not set text array's length
Issue
=====
In `msg-iter.c`, bfcr_get_sequence_length_cb() gets called when starting
the decoding of any sequence, including text sequences. However, text
arrays are translated into trace IR string field classes.
bfcr_get_sequence_length_cb() calls bt_field_dynamic_array_set_length()
unconditionally, but its field argument can be a string field at this
point. This is a precondition break.
Solution
========
In bt_field_dynamic_array_set_length(), only call
bt_field_dynamic_array_set_length() if the CTF IR field class is NOT a
text sequence. I'm also adding an assertion to confirm that the trace IR
field is a dynamic array field.
Known drawbacks
===============
None.
Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
This page took 0.027533 seconds and 4 git commands to generate.