From d312cd3577acb87d606c97dc0dae26499847dac6 Mon Sep 17 00:00:00 2001 From: Francis Deslauriers Date: Tue, 14 Apr 2020 17:07:23 -0400 Subject: [PATCH] bytecode: set register type to `REG_PTR` even if not used There was no need to set the field when using filter as the next instruction would assume that the top of stack is a `REG_PTR`. With the upcoming capture feature, we need to ensure this field is consistent for extraction. Signed-off-by: Francis Deslauriers Signed-off-by: Mathieu Desnoyers Change-Id: I8790618ddde23b29ef2a55698524c45b39ef4793 --- liblttng-ust/lttng-filter-interpreter.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/liblttng-ust/lttng-filter-interpreter.c b/liblttng-ust/lttng-filter-interpreter.c index 32610e6c..14f6a464 100644 --- a/liblttng-ust/lttng-filter-interpreter.c +++ b/liblttng-ust/lttng-filter-interpreter.c @@ -456,6 +456,9 @@ static int dynamic_get_index(struct lttng_ctx *ctx, stack_top->u.ptr.field = gid->field; break; } + + stack_top->type = REG_PTR; + return 0; end: -- 2.34.1