Fix: bytecode interpreter context_get_index() leaves byte order uninitialized
[lttng-modules.git] / lttng-filter-interpreter.c
index 6e5a5139e3dfd285fe0500c2558b8c1982fb49ba..821c12d3ba9679e5ae605ae5189a639529b8c5fd 100644 (file)
@@ -7,6 +7,7 @@
  * Copyright (C) 2010-2016 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
  */
 
+#include <wrapper/compiler_attributes.h>
 #include <wrapper/uaccess.h>
 #include <wrapper/objtool.h>
 #include <wrapper/types.h>
@@ -289,6 +290,7 @@ static int context_get_index(struct lttng_probe_ctx *lttng_probe_ctx,
                        ptr->u.u64 = v.s64;     /* Cast. */
                        ptr->ptr = &ptr->u.u64;
                }
+               ptr->rev_bo = field->type.u.basic.integer.reverse_byte_order;
                break;
        case atype_enum:
        {
@@ -305,6 +307,7 @@ static int context_get_index(struct lttng_probe_ctx *lttng_probe_ctx,
                        ptr->u.u64 = v.s64;     /* Cast. */
                        ptr->ptr = &ptr->u.u64;
                }
+               ptr->rev_bo = itype->reverse_byte_order;
                break;
        }
        case atype_array:
@@ -419,7 +422,8 @@ static int dynamic_get_index(struct lttng_probe_ctx *lttng_probe_ctx,
                }
                break;
        case LOAD_ROOT_CONTEXT:
-       case LOAD_ROOT_APP_CONTEXT:     /* Fall-through */
+               lttng_fallthrough;
+       case LOAD_ROOT_APP_CONTEXT:
        {
                ret = context_get_index(lttng_probe_ctx,
                                &stack_top->u.ptr,
This page took 0.024726 seconds and 4 git commands to generate.