From: Jérémie Galarneau Date: Fri, 13 Sep 2019 20:48:18 +0000 (-0400) Subject: consumer: fix: unaligned accesses to index fields X-Git-Tag: v2.12.0-rc1~391 X-Git-Url: http://git.liburcu.org/?a=commitdiff_plain;h=85d1db9fbef6b3e6148bbaf3235b01d446c6c07f;hp=85d1db9fbef6b3e6148bbaf3235b01d446c6c07f;p=lttng-tools.git consumer: fix: unaligned accesses to index fields The ctf_index structure, being part of the ABI, is explicitly packed using the LTTNG_PACKED macro. However, populating it by using pointers to its members is not acceptable as it may cause the ust and kernel tracer APIs to populate write their return values using unaligned pointers. Use automatic storage variables to fetch the various index fields and populate the index at-once using a compound literal. Signed-off-by: Jérémie Galarneau ---