From: Mathieu Desnoyers Date: Thu, 29 Sep 2022 20:07:41 +0000 (-0400) Subject: Fix: bytecode interpreter context_get_index() leaves byte order uninitialized X-Git-Tag: v2.12.11~5 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=fd6f8c5b5963cd84454314fce8870e75fb23de64;p=lttng-modules.git Fix: bytecode interpreter context_get_index() leaves byte order uninitialized Within the bytecode interpreter, context_get_index() leaves the "rev_bo" field uninitialized in the top of stack. Initialize the rev_bo field based on the context field type reserve_byte_order field. Signed-off-by: Mathieu Desnoyers Change-Id: I76576a3b9dd87f218e7226095c85590e1eb0beec --- diff --git a/lttng-filter-interpreter.c b/lttng-filter-interpreter.c index d9dc6195..821c12d3 100644 --- a/lttng-filter-interpreter.c +++ b/lttng-filter-interpreter.c @@ -290,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: { @@ -306,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: