Actions
Bug #1355
closedPointers are rejected by integer element compile time assertion for array and sequence
Start date:
05/20/2022
Due date:
% Done:
100%
Estimated time:
Description
I've used the following tracepoint definition without any issues (build, runtime, or data analysis) with LTTng-UST 2.11:
TRACEPOINT_EVENT(
TRACEPOINT_PROVIDER,
message_link_periodic_async,
TP_ARGS(
const void **, subs_arg,
const size_t, num_subs_arg,
const void **, pubs_arg,
const size_t, num_pubs_arg
),
TP_FIELDS(
ctf_sequence_hex(const void *, subs, subs_arg, size_t, num_subs_arg)
ctf_sequence_hex(const void *, pubs, pubs_arg, size_t, num_pubs_arg)
)
)
This fails to build with LTTng-UST 2.13:
In file included from /usr/include/x86_64-linux-gnu/lttng/tracepoint-event.h:69, from /builds/ros-tracing/ros2_tracing/build/tracetools/include/tracetools/tp_call.h:443, from /builds/ros-tracing/ros2_tracing/tracetools/src/tp_call.c:18: /builds/ros-tracing/ros2_tracing/build/tracetools/include/tracetools/tp_call.h:421:5: error: static assertion failed: "Non-integer type `subs` not supported as element of LTTNG_UST_FIELD_ARRAY or LTTNG_UST_FIELD_SEQUENCE" 421 | ctf_sequence_hex(const void *, subs, subs_arg, size_t, num_subs_arg) | ^~~~~~~~~~~~~~~~ /builds/ros-tracing/ros2_tracing/build/tracetools/include/tracetools/tp_call.h:422:5: error: static assertion failed: "Non-integer type `pubs` not supported as element of LTTNG_UST_FIELD_ARRAY or LTTNG_UST_FIELD_SEQUENCE" 422 | ctf_sequence_hex(const void *, pubs, pubs_arg, size_t, num_pubs_arg) | ^~~~~~~~~~~~~~~~
I have not tested on 2.12, but from looking at the original commit, this should only affect 2.13: https://github.com/lttng/lttng-ust/commit/2df82195d140b39c40abfb43d526804a9d14d3da
This does not look like it is intended behaviour. I'm assuming I can work around this by explicitly using the pointers as integers, but of course a fix would be better (and a new/bugfix update for LTTng-UST 2.13 from the default packages on Ubuntu 22.04 would be ideal).
Actions