libxmlb-0.3.18-1.fc41

List of Defects

Error: CLANG_WARNING: [#def1]
libxmlb-0.3.18/redhat-linux-build/tmp-introspecttztsak5k/Xmlb-2.0.c:799:27: warning[core.NullDereference]: Access to field 'message' results in a dereference of a null pointer (loaded from variable 'error')

Error: CLANG_WARNING: [#def2]
libxmlb-0.3.18/src/xb-builder.c:841:11: warning[unix.Malloc]: Potential leak of memory pointed to by 'helper'
#  839|   		XbBuilderFixup *fixup = g_ptr_array_index(priv->fixups, i);
#  840|   		if (!xb_builder_fixup_node(fixup, helper->root, error))
#  841|-> 			return NULL;
#  842|   	}
#  843|   

Error: GCC_ANALYZER_WARNING (CWE-688): [#def3]
libxmlb-0.3.18/src/xb-machine.c: scope_hint: In function ‘xb_machine_opcode_tokenize’
libxmlb-0.3.18/src/xb-machine.c:1469:17: warning[-Wanalyzer-null-argument]: use of NULL where non-null expected
/usr/include/glib-2.0/glib/gstring.h:37: included_from: Included from here.
/usr/include/glib-2.0/glib/giochannel.h:36: included_from: Included from here.
/usr/include/glib-2.0/glib.h:56: included_from: Included from here.
/usr/include/glib-2.0/gobject/gbinding.h:30: included_from: Included from here.
/usr/include/glib-2.0/glib-object.h:24: included_from: Included from here.
/usr/include/glib-2.0/gio/gioenums.h:30: included_from: Included from here.
/usr/include/glib-2.0/gio/giotypes.h:30: included_from: Included from here.
/usr/include/glib-2.0/gio/gio.h:28: included_from: Included from here.
libxmlb-0.3.18/src/xb-machine.c:11: included_from: Included from here.
libxmlb-0.3.18/src/xb-machine.c:1443:18: note: in expansion of macro ‘g_strdup’
libxmlb-0.3.18/src/xb-machine.c: scope_hint: In function ‘xb_machine_opcode_tokenize’
libxmlb-0.3.18/src/xb-machine.c:19: included_from: Included from here.
libxmlb-0.3.18/src/xb-opcode-private.h:75:1: note: argument 2 of ‘xb_opcode_append_token’ must be non-null
# 1467|   		if (!xb_string_token_valid(ascii_tokens[i]))
# 1468|   			continue;
# 1469|-> 		xb_opcode_append_token(op, xb_machine_intern_token(self, ascii_tokens[i]));
# 1470|   	}
# 1471|   }

Error: CLANG_WARNING: [#def4]
libxmlb-0.3.18/src/xb-silo.c:700:3: warning[deadcode.DeadStores]: Value stored to 'locker' is never read
#  698|   	/* no longer valid */
#  699|   	if (priv->enable_node_cache) {
#  700|-> 		locker = g_mutex_locker_new(&priv->nodes_mutex);
#  701|   		if (priv->nodes != NULL)
#  702|   			g_hash_table_remove_all(priv->nodes);

Error: CLANG_WARNING: [#def5]
libxmlb-0.3.18/src/xb-silo.c:1140:2: warning[deadcode.DeadStores]: Value stored to 'locker' is never read
# 1138|   		return xb_node_new(self, sn);
# 1139|   
# 1140|-> 	locker = g_mutex_locker_new(&priv->nodes_mutex);
# 1141|   
# 1142|   	/* ensure the cache exists */

Error: GCC_ANALYZER_WARNING (CWE-688): [#def6]
libxmlb-0.3.18/src/xb-silo.c: scope_hint: In function ‘xb_silo_machine_func_text_cb’
libxmlb-0.3.18/src/xb-silo.c:1383:17: warning[-Wanalyzer-null-argument]: use of NULL where non-null expected
libxmlb-0.3.18/src/xb-silo.c:41: included_from: Included from here.
libxmlb-0.3.18/src/xb-opcode-private.h:75:1: note: argument 2 of ‘xb_opcode_append_token’ must be non-null
# 1381|   	for (guint i = 0; i < token_count; i++) {
# 1382|   		guint32 stridx = xb_silo_node_get_token_idx(query_data->sn, i);
# 1383|-> 		xb_opcode_append_token(op, xb_silo_from_strtab(silo, stridx));
# 1384|   	}
# 1385|   

Error: CLANG_WARNING: [#def7]
libxmlb-0.3.18/src/xb-value-bindings.c:147:12: warning[deadcode.DeadStores]: Value stored to 'copied' during its initialization is never read
#  145|   
#  146|   	for (gsize i = 0; i < G_N_ELEMENTS(_self->values); i++) {
#  147|-> 		gboolean copied = xb_value_bindings_copy_binding(self, i, copy, i);
#  148|   		g_assert(copied);
#  149|   	}

Error: COMPILER_WARNING (CWE-563): [#def8]
libxmlb-0.3.18/src/xb-value-bindings.c: scope_hint: In function ‘xb_value_bindings_copy’
libxmlb-0.3.18/src/xb-value-bindings.c:147:26: warning[-Wunused-variable]: unused variable ‘copied’
#  147 |                 gboolean copied = xb_value_bindings_copy_binding(self, i, copy, i);
#      |                          ^~~~~~
#  145|   
#  146|   	for (gsize i = 0; i < G_N_ELEMENTS(_self->values); i++) {
#  147|-> 		gboolean copied = xb_value_bindings_copy_binding(self, i, copy, i);
#  148|   		g_assert(copied);
#  149|   	}

Scan Properties

analyzer-version-clang18.1.3
analyzer-version-cppcheck2.13.0
analyzer-version-gcc14.0.1
analyzer-version-gcc-analyzer14.0.1
analyzer-version-shellcheck0.10.0
enabled-pluginsclang, cppcheck, gcc, shellcheck
exit-code0
hostip-172-16-1-56.us-west-2.compute.internal
mock-configfedora-41-x86_64
project-namelibxmlb-0.3.18-1.fc41
store-results-to/tmp/tmp1pfrtr0_/libxmlb-0.3.18-1.fc41.tar.xz
time-created2024-04-22 11:06:28
time-finished2024-04-22 11:08:13
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-41-x86_64' '-t' 'cppcheck,gcc,clang,shellcheck' '-o' '/tmp/tmp1pfrtr0_/libxmlb-0.3.18-1.fc41.tar.xz' '--gcc-analyze' '/tmp/tmp1pfrtr0_/libxmlb-0.3.18-1.fc41.src.rpm'
tool-versioncsmock-3.5.3-1.el9