Fix: ustcomm: serialize variant_nestable type
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Tue, 25 Jan 2022 02:08:35 +0000 (21:08 -0500)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Tue, 25 Jan 2022 19:07:50 +0000 (14:07 -0500)
commit61c70d3794a4e8c965bbdbdd19934374ab83a70d
treecbf539a3432e0f0aa5494935012f03a830a1946f
parent464c475658ae29039b3b9e769b5b02195688a94a
Fix: ustcomm: serialize variant_nestable type

LTTng-UST 2.13 serializes the contents of the variant_nestable union
field, but keeps the "atype" as lttng_ust_ctl_atype_variant.

It happens to work by pure chance because the binary layout of the
variant_nestable and legacy.variant union fields are the same, except
for the alignment field of variant_nestable which is zeroed padding in
the legacy.variant. Therefore, as long as the variant_nestable has a
padding of 0, everything works out fine (which is currently the case).

But it's better to fix this discrepancy in case we ever plan to use a
nonzero variant alignment.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Change-Id: I96a3e1f6bfbe410ed61ea59313eb49b6c4f4b40d
src/common/ustcomm.c
This page took 0.024316 seconds and 4 git commands to generate.