bytecode: set register type to `REG_PTR` even if not used
authorFrancis Deslauriers <francis.deslauriers@efficios.com>
Tue, 14 Apr 2020 21:07:23 +0000 (17:07 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 26 Nov 2020 18:26:45 +0000 (13:26 -0500)
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 <francis.deslauriers@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Change-Id: I8790618ddde23b29ef2a55698524c45b39ef4793

liblttng-ust/lttng-filter-interpreter.c

index 32610e6ca29b009b249ecd150dcad481ef462102..14f6a464fc1e4cfbe872f480a3bb70a3ddc23f95 100644 (file)
@@ -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:
This page took 0.02564 seconds and 4 git commands to generate.