Fix: bytecode interpreter: LOAD_FIELD: handle user fields
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Tue, 6 Sep 2022 19:10:17 +0000 (15:10 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 8 Sep 2022 13:39:05 +0000 (09:39 -0400)
commit8c36b1385480103f12373817016ff22d20301f5b
tree69a1c6bb8b54ddd0a0ebd5a185c677b7ded3f1f2
parent07aafa15e9c655db53f575f7b9c8ea30ec7f6e26
Fix: bytecode interpreter: LOAD_FIELD: handle user fields

The instructions for recursive traversal through composed types
are used by the capture bytecode, and by filter expressions which
access fields nested within composed types.

Instructions BYTECODE_OP_LOAD_FIELD_STRING and
BYTECODE_OP_LOAD_FIELD_SEQUENCE were leaving the "user" attribute
uninitialized. Initialize those to 0.

The handling of userspace strings and integers is missing in LOAD_FIELD
instructions. Therefore, ensure that the specialization leaves the
generic LOAD_FIELD instruction in place for userspace input.

Add a "user" attribute to:
- struct bytecode_get_index_data elem field (produced by the
  specialization),
- struct vstack_load used by the specialization,
- struct load_ptr used by the interpreter.
- struct lttng_interpreter_output used by the event notification
  capture.

Use this "user" attribute in dynamic_load_field() for integer, string
and string_sequence object types to ensure that the proper
userspace-aware accesses are performed when loading those fields.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Change-Id: Ib8d4db5b7da5064e5897ab3802ab47e063607036
include/lttng/lttng-bytecode.h
src/lttng-bytecode-interpreter.c
src/lttng-bytecode-specialize.c
This page took 0.027553 seconds and 4 git commands to generate.