for (;;) {
int escaped_r0 = 0;
- if (unlikely(p - estack_bx(stack, top)->u.s.str > estack_bx(stack, top)->u.s.seq_len || *p == '\0')) {
- if (q - estack_ax(stack, top)->u.s.str > estack_ax(stack, top)->u.s.seq_len || *q == '\0') {
+ if (unlikely(p - estack_bx(stack, top)->u.s.str >= estack_bx(stack, top)->u.s.seq_len || *p == '\0')) {
+ if (q - estack_ax(stack, top)->u.s.str >= estack_ax(stack, top)->u.s.seq_len || *q == '\0') {
return 0;
} else {
if (estack_ax(stack, top)->u.s.literal) {
return -1;
}
}
- if (unlikely(q - estack_ax(stack, top)->u.s.str > estack_ax(stack, top)->u.s.seq_len || *q == '\0')) {
- if (p - estack_bx(stack, top)->u.s.str > estack_bx(stack, top)->u.s.seq_len || *p == '\0') {
+ if (unlikely(q - estack_ax(stack, top)->u.s.str >= estack_ax(stack, top)->u.s.seq_len || *q == '\0')) {
+ if (p - estack_bx(stack, top)->u.s.str >= estack_bx(stack, top)->u.s.seq_len || *p == '\0') {
return 0;
} else {
if (estack_bx(stack, top)->u.s.literal) {
const char *filter_stack_data)
{
struct bytecode_runtime *bytecode = filter_data;
- struct lttng_ctx *ctx = bytecode->p.bc->enabler->chan->ctx;
void *pc, *next_pc, *start_pc;
int ret = -EINVAL;
uint64_t retval = 0;
dbg_printf("get context ref offset %u type string\n",
ref->offset);
- ctx_field = &ctx->fields[ref->offset];
+ ctx_field = <tng_static_ctx->fields[ref->offset];
ctx_field->get_value(ctx_field, &v);
estack_push(stack, top, ax, bx);
estack_ax(stack, top)->u.s.str = v.str;
dbg_printf("get context ref offset %u type s64\n",
ref->offset);
- ctx_field = &ctx->fields[ref->offset];
+ ctx_field = <tng_static_ctx->fields[ref->offset];
ctx_field->get_value(ctx_field, &v);
estack_push(stack, top, ax, bx);
estack_ax_v = v.s64;
dbg_printf("get context ref offset %u type double\n",
ref->offset);
- ctx_field = &ctx->fields[ref->offset];
+ ctx_field = <tng_static_ctx->fields[ref->offset];
ctx_field->get_value(ctx_field, &v);
estack_push(stack, top, ax, bx);
memcpy(&estack_ax(stack, top)->u.d, &v.d, sizeof(struct literal_double));