Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package libtraceevent for openSUSE:Factory checked in at 2024-09-05 15:46:19 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/libtraceevent (Old) and /work/SRC/openSUSE:Factory/.libtraceevent.new.10096 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "libtraceevent" Thu Sep 5 15:46:19 2024 rev:14 rq:1198707 version:1.8.3 Changes: -------- --- /work/SRC/openSUSE:Factory/libtraceevent/libtraceevent.changes 2024-07-03 20:28:48.169776637 +0200 +++ /work/SRC/openSUSE:Factory/.libtraceevent.new.10096/libtraceevent.changes 2024-09-05 15:46:42.686885838 +0200 @@ -1,0 +2,14 @@ +Sat Aug 31 15:45:06 UTC 2024 - Dirk Müller <dmuel...@suse.com> + +- update to 1.8.3: + * Fix a double free in process_op() + * Do not return a local stack pointer in get_field_str() + * prevent a memory leak in tep_plugin_add_option() + * Prevent a memory leak in process_fields() + * Close shared object in the error path of load_plugin() + * Avoid a simple asprintf case + * Fix event-parse memory leak in process_cond + * Have single quotes represent characters + * Fix tests running on big endian arch + +------------------------------------------------------------------- Old: ---- libtraceevent-1.8.2.tar.gz New: ---- libtraceevent-1.8.3.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ libtraceevent.spec ++++++ --- /var/tmp/diff_new_pack.5nca5C/_old 2024-09-05 15:46:43.114903602 +0200 +++ /var/tmp/diff_new_pack.5nca5C/_new 2024-09-05 15:46:43.114903602 +0200 @@ -22,7 +22,7 @@ %define sodname %{dname}%{sonum} Name: libtraceevent -Version: 1.8.2 +Version: 1.8.3 Release: 0 Summary: Linux kernel trace event library License: GPL-2.0-only AND LGPL-2.1-only ++++++ libtraceevent-1.8.2.tar.gz -> libtraceevent-1.8.3.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libtraceevent-1.8.2/Makefile new/libtraceevent-1.8.3/Makefile --- old/libtraceevent-1.8.2/Makefile 2024-01-09 03:32:09.000000000 +0100 +++ new/libtraceevent-1.8.3/Makefile 2024-07-24 19:28:57.000000000 +0200 @@ -2,7 +2,7 @@ # libtraceevent version EP_VERSION = 1 EP_PATCHLEVEL = 8 -EP_EXTRAVERSION = 2 +EP_EXTRAVERSION = 3 EVENT_PARSE_VERSION = $(EP_VERSION).$(EP_PATCHLEVEL).$(EP_EXTRAVERSION) MAKEFLAGS += --no-print-directory @@ -352,7 +352,7 @@ install: install_libs -clean: clean_plugins clean_src +clean: clean_plugins clean_src clean_meson $(Q)$(call do_clean,\ $(VERSION_FILE) $(obj)/tags $(obj)/TAGS $(PKG_CONFIG_FILE) \ $(LIBTRACEEVENT_STATIC) $(LIBTRACEEVENT_SHARED) \ @@ -436,6 +436,19 @@ clean_src: $(Q)$(call descend_clean,src) +meson: + $(MAKE) -f Makefile.meson + +meson_install: + $(MAKE) -f Makefile.meson install + +meson_docs: + $(MAKE) -f Makefile.meson docs + +PHONY += clean_meson +clean_meson: + $(Q)$(MAKE) -f Makefile.meson $@ + force: # Declare the contents of the .PHONY variable as phony. We keep that diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libtraceevent-1.8.2/Makefile.meson new/libtraceevent-1.8.3/Makefile.meson --- old/libtraceevent-1.8.2/Makefile.meson 1970-01-01 01:00:00.000000000 +0100 +++ new/libtraceevent-1.8.3/Makefile.meson 2024-07-24 19:28:57.000000000 +0200 @@ -0,0 +1,40 @@ +# SPDX-License-Identifier: GPL-2.0 + +undefine CFLAGS + +# Makefiles suck: This macro sets a default value of $(2) for the +# variable named by $(1), unless the variable has been set by +# environment or command line. This is necessary for CC and AR +# because make sets default values, so the simpler ?= approach +# won't work as expected. +define allow-override + $(if $(or $(findstring environment,$(origin $(1))),\ + $(findstring command line,$(origin $(1)))),,\ + $(eval $(1) = $(2))) +endef + +$(call allow-override,MESON,meson) +$(call allow-override,MESON_BUILD_DIR,build) + + +all: compile + +PHONY += compile +compile: $(MESON_BUILD_DIR) force + $(MESON) compile -C $(MESON_BUILD_DIR) + +$(MESON_BUILD_DIR): + $(MESON) setup --prefix=$(prefix) $(MESON_BUILD_DIR) + +install: compile + $(MESON) install -C $(MESON_BUILD_DIR) + +docs: $(MESON_BUILD_DIR) + $(MESON) compile -C build docs + +PHONY += clean_meson +clean_meson: + $(Q)$(RM) -rf $(MESON_BUILD_DIR) + +PHONY += force +force: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libtraceevent-1.8.2/meson.build new/libtraceevent-1.8.3/meson.build --- old/libtraceevent-1.8.2/meson.build 2024-01-09 03:32:09.000000000 +0100 +++ new/libtraceevent-1.8.3/meson.build 2024-07-24 19:28:57.000000000 +0200 @@ -6,7 +6,7 @@ 'libtraceevent', ['c'], meson_version: '>= 0.58.0', license: 'LGPL-2.1', - version: '1.8.2', + version: '1.8.3', default_options: [ 'c_std=gnu99', 'buildtype=debug', @@ -25,7 +25,7 @@ libdir = join_paths(prefixdir, get_option('libdir')) plugindir = get_option('plugindir') if plugindir == '' - plugindir = join_paths(libdir, 'libtraceevent/plugins') + plugindir = join_paths(libdir, 'traceevent/plugins') endif add_project_arguments( diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libtraceevent-1.8.2/plugins/meson.build new/libtraceevent-1.8.3/plugins/meson.build --- old/libtraceevent-1.8.2/plugins/meson.build 2024-01-09 03:32:09.000000000 +0100 +++ new/libtraceevent-1.8.3/plugins/meson.build 2024-07-24 19:28:57.000000000 +0200 @@ -19,11 +19,10 @@ pdeps = [] foreach plugin : plugins - pdeps += library( + pdeps += shared_module( plugin.replace('.c', ''), plugin, name_prefix: '', - version: library_version, dependencies: [libtraceevent_dep], include_directories: [incdir], install: true, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libtraceevent-1.8.2/src/event-parse.c new/libtraceevent-1.8.3/src/event-parse.c --- old/libtraceevent-1.8.2/src/event-parse.c 2024-01-09 03:32:09.000000000 +0100 +++ new/libtraceevent-1.8.3/src/event-parse.c 2024-07-24 19:28:57.000000000 +0200 @@ -1232,9 +1232,11 @@ switch (type) { case TEP_EVENT_NEWLINE: case TEP_EVENT_DELIM: - if (asprintf(tok, "%c", ch) < 0) + *tok = malloc(2); + if (!*tok) return TEP_EVENT_ERROR; - + (*tok)[0] = ch; + (*tok)[1] = '\0'; return type; case TEP_EVENT_OP: @@ -2195,21 +2197,24 @@ return arg->op.prio; } -static int consolidate_op_arg(struct tep_print_arg *arg) +static int consolidate_op_arg(enum tep_event_type type, struct tep_print_arg *arg) { unsigned long long val, left, right; int ret = 0; + if (type == TEP_EVENT_ERROR) + return -1; + if (arg->type != TEP_PRINT_OP) return 0; if (arg->op.left) - ret = consolidate_op_arg(arg->op.left); + ret = consolidate_op_arg(type, arg->op.left); if (ret < 0) return ret; if (arg->op.right) - ret = consolidate_op_arg(arg->op.right); + ret = consolidate_op_arg(type, arg->op.right); if (ret < 0) return ret; @@ -2583,7 +2588,7 @@ if (type == TEP_EVENT_OP) { type = process_op(event, field, &token); - if (consolidate_op_arg(field) < 0) + if (consolidate_op_arg(type, field) < 0) type = TEP_EVENT_ERROR; if (type == TEP_EVENT_ERROR) @@ -2959,7 +2964,7 @@ free_arg(arg); arg = alloc_arg(); if (!arg) - goto out_free; + goto out_free_field; free_token(token); type = process_arg(event, arg, &token); @@ -3732,9 +3737,20 @@ arg->atom.atom = atom; break; - case TEP_EVENT_DQUOTE: case TEP_EVENT_SQUOTE: arg->type = TEP_PRINT_ATOM; + /* Make characters into numbers */ + if (asprintf(&arg->atom.atom, "%d", token[0]) < 0) { + free_token(token); + *tok = NULL; + arg->atom.atom = NULL; + return TEP_EVENT_ERROR; + } + free_token(token); + type = read_token_item(event->tep, &token); + break; + case TEP_EVENT_DQUOTE: + arg->type = TEP_PRINT_ATOM; arg->atom.atom = token; type = read_token_item(event->tep, &token); break; @@ -3803,7 +3819,7 @@ type = process_op(event, arg, &token); free_token(token); - if (consolidate_op_arg(arg) < 0) + if (consolidate_op_arg(type, arg) < 0) type = TEP_EVENT_ERROR; if (type == TEP_EVENT_ERROR) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libtraceevent-1.8.2/src/event-plugin.c new/libtraceevent-1.8.3/src/event-plugin.c --- old/libtraceevent-1.8.2/src/event-plugin.c 2024-01-09 03:32:09.000000000 +0100 +++ new/libtraceevent-1.8.3/src/event-plugin.c 2024-07-24 19:28:57.000000000 +0200 @@ -327,7 +327,7 @@ return -ENOMEM; if (parse_option_name(&option_str, &plugin) < 0) - return -ENOMEM; + goto out_free; /* If the option exists, update the val */ for (op = trace_plugin_options; op; op = op->next) { @@ -474,7 +474,7 @@ while (options->name) { ret = update_option(alias, options); if (ret < 0) - goto out_free; + goto out_close; options++; } } @@ -483,13 +483,13 @@ if (!func) { tep_warning("could not find func '%s' in plugin '%s'\n%s\n", TEP_PLUGIN_LOADER_NAME, plugin, dlerror()); - goto out_free; + goto out_close; } list = malloc(sizeof(*list)); if (!list) { tep_warning("could not allocate plugin memory\n"); - goto out_free; + goto out_close; } list->next = *plugin_list; @@ -501,6 +501,8 @@ func(tep); return; +out_close: + dlclose(handle); out_free: free(plugin); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libtraceevent-1.8.2/src/parse-filter.c new/libtraceevent-1.8.3/src/parse-filter.c --- old/libtraceevent-1.8.2/src/parse-filter.c 2024-01-09 03:32:09.000000000 +0100 +++ new/libtraceevent-1.8.3/src/parse-filter.c 2024-07-24 19:28:57.000000000 +0200 @@ -1704,8 +1704,8 @@ struct tep_handle *tep; unsigned long long addr; const char *val = NULL; + static char hex[64]; unsigned int size; - char hex[64]; /* If the field is not a string convert it */ if (arg->str.field->flags & TEP_FIELD_IS_STRING) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libtraceevent-1.8.2/utest/trace-utest.c new/libtraceevent-1.8.3/utest/trace-utest.c --- old/libtraceevent-1.8.2/utest/trace-utest.c 2024-01-09 03:32:09.000000000 +0100 +++ new/libtraceevent-1.8.3/utest/trace-utest.c 2024-07-24 19:28:57.000000000 +0200 @@ -6,6 +6,7 @@ * Copyright (C) 2021, VMware, Steven Rostedt <rost...@goodmis.org> * */ +#include <libgen.h> #include <stdio.h> #include <unistd.h> #include <getopt.h> @@ -36,6 +37,7 @@ { CU_BasicRunMode verbose = CU_BRM_VERBOSE; enum unit_tests tests = RUN_NONE; + int failed_tests; for (;;) { int c; @@ -81,6 +83,7 @@ CU_basic_set_mode(verbose); CU_basic_run_tests(); + failed_tests = CU_get_number_of_tests_failed(); CU_cleanup_registry(); - return 0; + return failed_tests != 0; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libtraceevent-1.8.2/utest/traceevent-utest.c new/libtraceevent-1.8.3/utest/traceevent-utest.c --- old/libtraceevent-1.8.2/utest/traceevent-utest.c 2024-01-09 03:32:09.000000000 +0100 +++ new/libtraceevent-1.8.3/utest/traceevent-utest.c 2024-07-24 19:28:57.000000000 +0200 @@ -216,7 +216,7 @@ #define CPUMASK_BYTEP2_FMT "cpumask=0,23" DECL_CPUMASK_EVENT_DATA(bytepn, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01); -#define CPUMASK_BYTEPN "ARRAY[80, 00, 00, 00, 00, 00, 80, 01]" +#define CPUMASK_BYTEPN "ARRAY[80, 00, 00, 00, 00, 00, 00, 01]" #define CPUMASK_BYTEPN_FMT "cpumask=0,63" #endif @@ -392,6 +392,9 @@ test_tep = tep_alloc(); if (!test_tep) return 1; +#if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ + tep_set_file_bigendian(test_tep, TEP_BIG_ENDIAN); +#endif return 0; }