X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=src%2Flib%2Flttng-ctl%2Ffilter%2Ffilter-visitor-generate-bytecode.c;h=699273c3d984f7e9aba6f4ee51b0d77e2fa666d1;hb=d44f9a1878031bfdb6ceee49d817430b11f0a58b;hp=1ab98138e61e16f4120f3be7ae508b518dac65cc;hpb=116d3c01872d62ee86bdbd0aea575b12fbc9c272;p=lttng-tools.git diff --git a/src/lib/lttng-ctl/filter/filter-visitor-generate-bytecode.c b/src/lib/lttng-ctl/filter/filter-visitor-generate-bytecode.c index 1ab98138e..699273c3d 100644 --- a/src/lib/lttng-ctl/filter/filter-visitor-generate-bytecode.c +++ b/src/lib/lttng-ctl/filter/filter-visitor-generate-bytecode.c @@ -3,20 +3,10 @@ * * LTTng filter bytecode generation * - * Copyright 2012 - Mathieu Desnoyers + * Copyright 2012 Mathieu Desnoyers * - * This library is free software; you can redistribute it and/or modify it - * under the terms of the GNU Lesser General Public License, version 2.1 only, - * as published by the Free Software Foundation. + * SPDX-License-Identifier: LGPL-2.1-only * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this library; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #include @@ -295,6 +285,9 @@ int visit_node_load_expression_legacy(struct filter_parser_ctx *ctx, } ret = bytecode_push(&ctx->bytecode_reloc, symbol, 1, strlen(symbol) + 1); + if (ret) { + goto end; + } ret = 1; /* legacy */ end: free(insn); @@ -319,6 +312,10 @@ int visit_node_load_expression(struct filter_parser_ctx *ctx, return -EINVAL; } + /* + * TODO: if we remove legacy load for application contexts, we + * need to update session bytecode parser as well. + */ ret = visit_node_load_expression_legacy(ctx, exp, op); if (ret < 0) { return ret;