#include <babeltrace/align.h> is missing. I've added it and merged. Also, note that you should use git format-patch's --subject-prefix="PATCH project_name" option. It makes it easier to keep track of patches since this mailing list is shared between multiple projects.
Thanks! Jérémie On Thu, May 15, 2014 at 10:10 PM, <[email protected]> wrote: > From: Fredrik Markström <[email protected]> > > The buffers from objstack_alloc will store the pointer, so it must > be aligned on pointer, or else it will cause issue on the cpu > which does not support unaligned addresses access > > Signed-off-by: Fredrik Markstrom <[email protected]> > Signed-off-by: Roy Li <[email protected]> > --- > formats/ctf/metadata/objstack.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/formats/ctf/metadata/objstack.c b/formats/ctf/metadata/objstack.c > index 9e264a4..0e7d04e 100644 > --- a/formats/ctf/metadata/objstack.c > +++ b/formats/ctf/metadata/objstack.c > @@ -39,7 +39,7 @@ struct objstack_node { > struct bt_list_head node; > size_t len; > size_t used_len; > - char data[]; > + char __attribute__ ((aligned (sizeof(void *)))) data[]; > }; > > BT_HIDDEN > @@ -118,6 +118,8 @@ void *objstack_alloc(struct objstack *objstack, size_t > len) > struct objstack_node *last_node; > void *p; > > + len = ALIGN(len, sizeof(void *)); > + > /* Get last node */ > last_node = bt_list_entry(objstack->head.prev, > struct objstack_node, node); > -- > 1.7.10.4 > -- Jérémie Galarneau EfficiOS Inc. http://www.efficios.com _______________________________________________ lttng-dev mailing list [email protected] http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
