pygobject3-3.48.2-2.fc41

List of Defects

Error: GCC_ANALYZER_WARNING (CWE-476): [#def1]
pygobject3-3.48.2-build/pygobject-3.48.2/gi/gimodule.c: scope_hint: In function ‘add_signals’
pygobject3-3.48.2-build/pygobject-3.48.2/gi/gimodule.c:845:41: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘c’
/usr/include/python3.13/Python.h:68: included_from: Included from here.
pygobject3-3.48.2-build/pygobject-3.48.2/gi/gimodule.c:24: included_from: Included from here.
/usr/include/python3.13/unicodeobject.h:107:5: note: in expansion of macro ‘PyType_FastSubclass’
pygobject3-3.48.2-build/pygobject-3.48.2/gi/gimodule.c:831:14: note: in expansion of macro ‘PyUnicode_Check’
/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.
pygobject3-3.48.2-build/pygobject-3.48.2/gi/gimodule.c:25: included_from: Included from here.
pygobject3-3.48.2-build/pygobject-3.48.2/gi/gimodule.c:844:33: note: in expansion of macro ‘g_strdup’
pygobject3-3.48.2-build/pygobject-3.48.2/gi/gimodule.c: scope_hint: In function ‘add_signals’
#  843|                 /* canonicalize signal name, replacing '-' with '_' */
#  844|               signal_name_canon = g_strdup(signal_name);
#  845|->             for (c = signal_name_canon; *c; ++c)
#  846|                   if (*c == '-')
#  847|                       *c = '_';

Error: CLANG_WARNING: [#def2]
pygobject3-3.48.2-build/pygobject-3.48.2/gi/gimodule.c:1613:5: warning[unix.Malloc]: Potential leak of memory pointed to by 'enum_value'
# 1611|       }
# 1612|   
# 1613|->     g_free (full_name);
# 1614|       return pyg_enum_add (NULL, type_name, NULL, g_type);
# 1615|   }

Error: CLANG_WARNING: [#def3]
pygobject3-3.48.2-build/pygobject-3.48.2/gi/gimodule.c:1613:5: warning[unix.Malloc]: Potential leak of memory pointed to by 'g_enum_values'
# 1611|       }
# 1612|   
# 1613|->     g_free (full_name);
# 1614|       return pyg_enum_add (NULL, type_name, NULL, g_type);
# 1615|   }

Error: CLANG_WARNING: [#def4]
pygobject3-3.48.2-build/pygobject-3.48.2/gi/gimodule.c:1732:5: warning[unix.Malloc]: Potential leak of memory pointed to by 'flags_value'
# 1730|       }
# 1731|   
# 1732|->     g_free (full_name);
# 1733|       return pyg_flags_add (NULL, type_name, NULL, g_type);
# 1734|   }

Error: CLANG_WARNING: [#def5]
pygobject3-3.48.2-build/pygobject-3.48.2/gi/gimodule.c:1732:5: warning[unix.Malloc]: Potential leak of memory pointed to by 'g_flags_values'
# 1730|       }
# 1731|   
# 1732|->     g_free (full_name);
# 1733|       return pyg_flags_add (NULL, type_name, NULL, g_type);
# 1734|   }

Error: CLANG_WARNING: [#def6]
pygobject3-3.48.2-build/pygobject-3.48.2/gi/pygi-cache.c:25: included_from: Included from here.
pygobject3-3.48.2-build/pygobject-3.48.2/gi/pygi-info.h:26: included_from: Included from here.
pygobject3-3.48.2-build/pygobject-3.48.2/gi/pygi-cache.h:321:12: warning[core.NullDereference]: Access to field 'len' results in a dereference of a null pointer (loaded from field 'args_cache')
#  319|   inline static guint
#  320|   _pygi_callable_cache_args_len (PyGICallableCache *cache) {
#  321|->     return ((cache)->args_cache)->len;
#  322|   }
#  323|   

Error: CLANG_WARNING: [#def7]
pygobject3-3.48.2-build/pygobject-3.48.2/gi/pygi-array.c:24: included_from: Included from here.
pygobject3-3.48.2-build/pygobject-3.48.2/gi/pygi-array.h:24: included_from: Included from here.
pygobject3-3.48.2-build/pygobject-3.48.2/gi/pygi-cache.h:326:29: warning[core.NullDereference]: Access to field 'args_cache' results in a dereference of a null pointer (loaded from variable 'cache')
#  324|   inline static PyGIArgCache *
#  325|   _pygi_callable_cache_get_arg (PyGICallableCache *cache, guint index) {
#  326|->     return (PyGIArgCache *) g_ptr_array_index (cache->args_cache, index);
#  327|   }
#  328|   

Error: CLANG_WARNING: [#def8]
pygobject3-3.48.2-build/pygobject-3.48.2/gi/pygi-closure.c:20: included_from: Included from here.
pygobject3-3.48.2-build/pygobject-3.48.2/gi/pygi-closure.h:25: included_from: Included from here.
pygobject3-3.48.2-build/pygobject-3.48.2/gi/pygi-cache.h:331:5: warning[core.NullDereference]: Access to field 'args_cache' results in a dereference of a null pointer (loaded from variable 'cache')
#  329|   inline static void
#  330|   _pygi_callable_cache_set_arg (PyGICallableCache *cache, guint index, PyGIArgCache *arg_cache) {
#  331|->     cache->args_cache->pdata[index] = arg_cache;
#  332|   }
#  333|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def9]
pygobject3-3.48.2-build/pygobject-3.48.2/gi/pygi-fundamental.c: scope_hint: In function ‘pygi_fundamental_ref’
pygobject3-3.48.2-build/pygobject-3.48.2/gi/pygi-fundamental.c:202:13: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘self’
/usr/include/glib-2.0/gobject/gobject.h:26: included_from: Included from here.
/usr/include/glib-2.0/gobject/gbinding.h:31: included_from: Included from here.
/usr/include/glib-2.0/glib-object.h:24: included_from: Included from here.
/usr/include/gobject-introspection-1.0/girepository.h:26: included_from: Included from here.
pygobject3-3.48.2-build/pygobject-3.48.2/gi/pygi-fundamental.c:27: included_from: Included from here.
/usr/include/glib-2.0/gobject/gtype.h:657:82: note: in definition of macro ‘G_TYPE_FROM_CLASS’
pygobject3-3.48.2-build/pygobject-3.48.2/gi/pygi-fundamental.c:155:13: note: in expansion of macro ‘G_TYPE_FROM_INSTANCE’
#  200|   pygi_fundamental_ref (PyGIFundamental *self)
#  201|   {
#  202|->     if (self->ref_func && self->instance)
#  203|           self->ref_func (self->instance);
#  204|   }

Error: CLANG_WARNING: [#def10]
pygobject3-3.48.2-build/pygobject-3.48.2/gi/pygi-invoke.c:589:13: warning[core.NullDereference]: Access to field 'is_skipped' results in a dereference of a null pointer (loaded from field 'return_cache')
#  587|   
#  588|       if (n_out_args == 0) {
#  589|->         if (cache->return_cache->is_skipped && state->error == NULL) {
#  590|               /* we skip the return value and have no (out) arguments to return,
#  591|                * so py_return should be NULL. But we must not return NULL,

Error: GCC_ANALYZER_WARNING (CWE-476): [#def11]
pygobject3-3.48.2-build/pygobject-3.48.2/gi/pygi-invoke.c: scope_hint: In function ‘_invoke_marshal_out_args’
pygobject3-3.48.2-build/pygobject-3.48.2/gi/pygi-invoke.c:589:32: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘*(PyGICallableCache *)function_cache.return_cache’
#  587|   
#  588|       if (n_out_args == 0) {
#  589|->         if (cache->return_cache->is_skipped && state->error == NULL) {
#  590|               /* we skip the return value and have no (out) arguments to return,
#  591|                * so py_return should be NULL. But we must not return NULL,

Error: CLANG_WARNING: [#def12]
pygobject3-3.48.2-build/pygobject-3.48.2/gi/pygi-object.c:107:36: warning[core.NullDereference]: Access to field 'ref_count' results in a dereference of a null pointer (loaded from variable 'gobj')
#  105|        */
#  106|       gobj = arg->v_pointer;
#  107|->     if (Py_REFCNT (py_arg) == 1 && gobj->ref_count == 1) {
#  108|           /* If both object ref counts are only 1 at this point (the reference held
#  109|            * in a return tuple), we assume the GObject will be free'd before reaching

Error: GCC_ANALYZER_WARNING (CWE-476): [#def13]
pygobject3-3.48.2-build/pygobject-3.48.2/gi/pygi-object.c: scope_hint: In function ‘pygi_arg_gobject_out_arg_from_py’
pygobject3-3.48.2-build/pygobject-3.48.2/gi/pygi-object.c:107:40: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘gobj’
#  105|        */
#  106|       gobj = arg->v_pointer;
#  107|->     if (Py_REFCNT (py_arg) == 1 && gobj->ref_count == 1) {
#  108|           /* If both object ref counts are only 1 at this point (the reference held
#  109|            * in a return tuple), we assume the GObject will be free'd before reaching

Error: CLANG_WARNING: [#def14]
pygobject3-3.48.2-build/pygobject-3.48.2/gi/pygi-property.c:374:13: warning[unix.Malloc]: Potential leak of memory pointed to by 'strings'
#  372|               strings[arg_items->len] = NULL;
#  373|               g_value_take_boxed (&value, strings);
#  374|->             g_array_free (arg_items, TRUE);
#  375|               break;
#  376|           }

Error: CLANG_WARNING: [#def15]
pygobject3-3.48.2-build/pygobject-3.48.2/gi/pygi-type.c:614:6: warning[deadcode.DeadStores]: Value stored to 'res' is never read
#  612|   	else {
#  613|   	    PyErr_SetString(PyExc_TypeError, "could not convert string to enum because there is no GType associated to look up the value");
#  614|-> 	    res = -1;
#  615|   	}
#  616|   	info = g_enum_get_value_by_name(eclass, str);

Error: CLANG_WARNING: [#def16]
pygobject3-3.48.2-build/pygobject-3.48.2/gi/pygi-type.c:671:6: warning[deadcode.DeadStores]: Value stored to 'res' is never read
#  669|   	else {
#  670|   	    PyErr_SetString(PyExc_TypeError, "could not convert string to flag because there is no GType associated to look up the value");
#  671|-> 	    res = -1;
#  672|   	}
#  673|   	info = g_flags_get_value_by_name(fclass, str);

Error: CLANG_WARNING: [#def17]
pygobject3-3.48.2-build/pygobject-3.48.2/gi/pygi-type.c:1341:5: warning[unix.Malloc]: Potential leak of memory pointed to by 'argv'
# 1339|       argv[i] = NULL;
# 1340|       g_value_take_boxed (value, argv);
# 1341|->     return 0;
# 1342|   
# 1343|   error:

Error: CLANG_WARNING: [#def18]
pygobject3-3.48.2-build/pygobject-3.48.2/gi/pygobject-object.c:123:11: warning[deadcode.DeadStores]: Although the value stored to 'closures' is used in the enclosing expression, the value is never actually read from 'closures'
#  121|       }
#  122|   
#  123|->     tmp = closures = data->closures;
#  124|   #ifndef NDEBUG
#  125|       data->closures = NULL;

Error: CPPCHECK_WARNING: [#def19]
pygobject3-3.48.2-build/pygobject-3.48.2/redhat-linux-build/tmp-introspectcxsi5end/GIMarshallingTests-1.0.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def20]
pygobject3-3.48.2-build/pygobject-3.48.2/redhat-linux-build/tmp-introspectcxsi5end/GIMarshallingTests-1.0.c:799:27: warning[core.NullDereference]: Access to field 'message' results in a dereference of a null pointer (loaded from variable 'error')

Error: CPPCHECK_WARNING: [#def21]
pygobject3-3.48.2-build/pygobject-3.48.2/redhat-linux-build/tmp-introspectu0n_lcdg/Regress-1.0.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def22]
pygobject3-3.48.2-build/pygobject-3.48.2/redhat-linux-build/tmp-introspectu0n_lcdg/Regress-1.0.c:799:27: warning[core.NullDereference]: Access to field 'message' results in a dereference of a null pointer (loaded from variable 'error')

Error: CPPCHECK_WARNING (CWE-758): [#def23]
pygobject3-3.48.2-build/pygobject-3.48.2/tests/gimarshallingtestsextra.h:36: error[shiftTooManyBitsSigned]: Shifting signed 32-bit value by 31 bits is undefined behaviour
#   34|   {
#   35|     GI_MARSHALLING_TESTS_EXTRA_FLAGS_VALUE1 = 0,
#   36|->   GI_MARSHALLING_TESTS_EXTRA_FLAGS_VALUE2 = (gint)(1 << 31),
#   37|   } GIMarshallingTestsExtraFlags;
#   38|   

Error: CLANG_WARNING: [#def24]
pygobject3-3.48.2-build/pygobject-3.48.2/tests/testhelpermodule.c:758:8: warning[deadcode.DeadStores]: Although the value stored to 'm' is used in the enclosing expression, the value is never actually read from 'm'
#  756|     d = PyModule_GetDict(module);
#  757|   
#  758|->   if ((m = PyImport_ImportModule("gi.repository.GObject")) == NULL) {
#  759|       PyErr_SetString(PyExc_ImportError,
#  760|   		    "could not import gobject");

Scan Properties

analyzer-version-clang18.1.7
analyzer-version-cppcheck2.14.2
analyzer-version-gcc14.1.1
analyzer-version-gcc-analyzer14.1.1
analyzer-version-shellcheck0.10.0
enabled-pluginsclang, cppcheck, gcc, shellcheck
exit-code0
hostip-172-16-1-40.us-west-2.compute.internal
mock-configfedora-41-x86_64
project-namepygobject3-3.48.2-2.fc41
store-results-to/tmp/tmpbr_s8lfh/pygobject3-3.48.2-2.fc41.tar.xz
time-created2024-07-03 17:07:10
time-finished2024-07-03 17:08:33
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-41-x86_64' '-t' 'cppcheck,gcc,clang,shellcheck' '-o' '/tmp/tmpbr_s8lfh/pygobject3-3.48.2-2.fc41.tar.xz' '--gcc-analyze' '/tmp/tmpbr_s8lfh/pygobject3-3.48.2-2.fc41.src.rpm'
tool-versioncsmock-3.5.3-1.el9