Fix: invalid alignment of enumeration fields
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Tue, 30 Oct 2018 23:19:14 +0000 (00:19 +0100)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Tue, 30 Oct 2018 23:21:28 +0000 (00:21 +0100)
commit89e9af0167601eb962981bf56961eccc48bb3a64
tree8d1d32f490d167b6c708a686268676fceecf83b3
parent7845e95f389ea93625ddbfb98c94ae794b533e1f
Fix: invalid alignment of enumeration fields

Issue
---

According to the CTF specification, the alignment of an enumeration is
that of its container integer field type. However, ctf-ir does not
forward the alignment of an enumeration field type's alignment in
bt_field_type_get_alignment().

This causes babeltrace to fail to read traces produced by lttng-ust
following a fix that causes it to generate extended event headers. The
problem is observed on ARM platforms since lttng-ust will produce
a layout that does not result in unaligned memory accesses.

Solution
---

The alignment of the enumeration field type's container is sampled
when the enumeration field type is frozen.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
lib/ctf-ir/field-types.c
This page took 0.024401 seconds and 4 git commands to generate.