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:28:04 +0000 (00:28 +0100)
commitbdff256c6ce6d8ccb873050b51480f9abf1435cc
treec500f7e0104c52fed448a1adedea1639ae3717c8
parentb6a0d2d9bd21345c993fe7d1c9dee5ec17d15b0c
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.024459 seconds and 4 git commands to generate.