Error: GCC_ANALYZER_WARNING (CWE-401): [#def1] xdg-desktop-portal-1.19.0-build/xdg-desktop-portal-1.19.0/src/xdp-app-info-flatpak.c: scope_hint: In function ‘get_bwrap_pidfd’ xdg-desktop-portal-1.19.0-build/xdg-desktop-portal-1.19.0/src/xdp-app-info-flatpak.c:565:10: warning[-Wanalyzer-malloc-leak]: leak of ‘opendir("/proc")’ /usr/lib64/glib-2.0/include/glibconfig.h:9: included_from: Included from here. /usr/include/glib-2.0/glib/gtypes.h:34: included_from: Included from here. /usr/include/glib-2.0/glib/galloca.h:34: included_from: Included from here. /usr/include/glib-2.0/glib.h:32: 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/json-glib-1.0/json-glib/json-types.h:32: included_from: Included from here. /usr/include/json-glib-1.0/json-glib/json-glib.h:29: included_from: Included from here. xdg-desktop-portal-1.19.0-build/xdg-desktop-portal-1.19.0/src/xdp-app-info-flatpak.c:28: included_from: Included from here. /usr/include/glib-2.0/glib/gmacros.h:1249:31: note: in expansion of macro ‘_G_BOOLEAN_EXPR_IMPL’ /usr/include/glib-2.0/glib/gmacros.h:1250:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ /usr/include/glib-2.0/glib/gmessages.h:664:9: note: in expansion of macro ‘G_LIKELY’ xdg-desktop-portal-1.19.0-build/xdg-desktop-portal-1.19.0/src/xdp-app-info-flatpak.c:505:3: note: in expansion of macro ‘g_return_val_if_fail’ /usr/include/json-glib-1.0/json-glib/json-types.h:74:42: note: in expansion of macro ‘JSON_NODE_HOLDS’ xdg-desktop-portal-1.19.0-build/xdg-desktop-portal-1.19.0/src/xdp-app-info-flatpak.c:531:8: note: in expansion of macro ‘JSON_NODE_HOLDS_OBJECT’ xdg-desktop-portal-1.19.0-build/xdg-desktop-portal-1.19.0/src/xdp-app-info-flatpak.c: scope_hint: In function ‘get_bwrap_pidfd’ /usr/include/glib-2.0/glib/gmacros.h:1365:7: note: in expansion of macro ‘_GLIB_AUTOPTR_CLEAR_FUNC_NAME’ /usr/include/glib-2.0/glib/gmacros.h:1381:3: note: in expansion of macro ‘_GLIB_DEFINE_AUTOPTR_CLEANUP_FUNCS’ /usr/include/json-glib-1.0/json-glib/json-types.h:533:1: note: in expansion of macro ‘G_DEFINE_AUTOPTR_CLEANUP_FUNC’ /usr/include/glib-2.0/glib/gmacros.h:1381:3: note: in expansion of macro ‘_GLIB_DEFINE_AUTOPTR_CLEANUP_FUNCS’ /usr/include/json-glib-1.0/json-glib/json-types.h:533:1: note: in expansion of macro ‘G_DEFINE_AUTOPTR_CLEANUP_FUNC’ xdg-desktop-portal-1.19.0-build/xdg-desktop-portal-1.19.0/src/xdp-app-info-flatpak.c: scope_hint: In function ‘get_bwrap_pidfd’ /usr/include/glib-2.0/glib/gmacros.h:1365:7: note: in expansion of macro ‘_GLIB_AUTOPTR_CLEAR_FUNC_NAME’ /usr/include/glib-2.0/glib/gmacros.h:1381:3: note: in expansion of macro ‘_GLIB_DEFINE_AUTOPTR_CLEANUP_FUNCS’ /usr/include/json-glib-1.0/json-glib/json-parser.h:243:1: note: in expansion of macro ‘G_DEFINE_AUTOPTR_CLEANUP_FUNC’ /usr/include/glib-2.0/glib/gmacros.h:1381:3: note: in expansion of macro ‘_GLIB_DEFINE_AUTOPTR_CLEANUP_FUNCS’ /usr/include/json-glib-1.0/json-glib/json-parser.h:243:1: note: in expansion of macro ‘G_DEFINE_AUTOPTR_CLEANUP_FUNC’ xdg-desktop-portal-1.19.0-build/xdg-desktop-portal-1.19.0/src/xdp-app-info-flatpak.c: scope_hint: In function ‘get_bwrap_pidfd’ # 563| return -1; # 564| # 565|-> proc = opendir ("/proc"); # 566| if (proc == NULL) # 567| { Error: GCC_ANALYZER_WARNING (CWE-775): [#def2] xdg-desktop-portal-1.19.0-build/xdg-desktop-portal-1.19.0/src/xdp-app-info-snap.c: scope_hint: In function ‘pid_is_snap’ xdg-desktop-portal-1.19.0-build/xdg-desktop-portal-1.19.0/src/xdp-app-info-snap.c:106:8: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(g_strdup_printf("/proc/%u/cgroup", (unsigned int)pid), 524544)’ /usr/lib64/glib-2.0/include/glibconfig.h:9: included_from: Included from here. /usr/include/glib-2.0/glib/gtypes.h:34: included_from: Included from here. /usr/include/glib-2.0/glib/galloca.h:34: included_from: Included from here. /usr/include/glib-2.0/glib.h:32: 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. xdg-desktop-portal-1.19.0-build/xdg-desktop-portal-1.19.0/src/xdp-utils.h:31: included_from: Included from here. xdg-desktop-portal-1.19.0-build/xdg-desktop-portal-1.19.0/src/xdp-app-info-private.h:22: included_from: Included from here. xdg-desktop-portal-1.19.0-build/xdg-desktop-portal-1.19.0/src/xdp-app-info-snap-private.h:22: included_from: Included from here. xdg-desktop-portal-1.19.0-build/xdg-desktop-portal-1.19.0/src/xdp-app-info-snap.c:28: included_from: Included from here. /usr/include/glib-2.0/glib/gmacros.h:1249:31: note: in expansion of macro ‘_G_BOOLEAN_EXPR_IMPL’ /usr/include/glib-2.0/glib/gmacros.h:1250:43: note: in expansion of macro ‘_G_BOOLEAN_EXPR’ /usr/include/glib-2.0/glib/gmessages.h:664:9: note: in expansion of macro ‘G_LIKELY’ xdg-desktop-portal-1.19.0-build/xdg-desktop-portal-1.19.0/src/xdp-app-info-snap.c:103:3: note: in expansion of macro ‘g_return_val_if_fail’ # 104| # 105| cgroup_path = g_strdup_printf ("/proc/%u/cgroup", (guint) pid); # 106|-> fd = open (cgroup_path, O_RDONLY | O_CLOEXEC | O_NOCTTY); # 107| if (fd == -1) # 108| {
analyzer-version-clippy | 1.82.0 |
analyzer-version-cppcheck | 2.16.0 |
analyzer-version-gcc | 14.2.1 |
analyzer-version-gcc-analyzer | 15.0.0 |
analyzer-version-shellcheck | 0.10.0 |
analyzer-version-unicontrol | 0.0.2 |
diffbase-analyzer-version-clippy | 1.82.0 |
diffbase-analyzer-version-cppcheck | 2.16.0 |
diffbase-analyzer-version-gcc | 14.2.1 |
diffbase-analyzer-version-gcc-analyzer | 15.0.0 |
diffbase-analyzer-version-shellcheck | 0.10.0 |
diffbase-analyzer-version-unicontrol | 0.0.2 |
diffbase-enabled-plugins | clippy, cppcheck, gcc, shellcheck, unicontrol |
diffbase-exit-code | 0 |
diffbase-host | ip-172-16-1-190.us-west-2.compute.internal |
diffbase-mock-config | fedora-rawhide-gcc-latest-x86_64 |
diffbase-project-name | xdg-desktop-portal-1.18.4-2.fc41 |
diffbase-store-results-to | /tmp/tmpyggh2v3l/xdg-desktop-portal-1.18.4-2.fc41.tar.xz |
diffbase-time-created | 2024-11-13 03:41:39 |
diffbase-time-finished | 2024-11-13 03:45:35 |
diffbase-tool | csmock |
diffbase-tool-args | '/usr/bin/csmock' '-r' 'fedora-rawhide-gcc-latest-x86_64' '-t' 'clippy,cppcheck,gcc,unicontrol,shellcheck' '-o' '/tmp/tmpyggh2v3l/xdg-desktop-portal-1.18.4-2.fc41.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install=gcc-latest' '--gcc-analyzer-bin=/opt/gcc-latest/bin/gcc' '/tmp/tmpyggh2v3l/xdg-desktop-portal-1.18.4-2.fc41.src.rpm' |
diffbase-tool-version | csmock-3.7.1.20241107.094801.gb3f0f26.pr_192-1.el9 |
enabled-plugins | clippy, cppcheck, gcc, shellcheck, unicontrol |
exit-code | 0 |
host | ip-172-16-1-190.us-west-2.compute.internal |
mock-config | fedora-rawhide-gcc-latest-x86_64 |
project-name | xdg-desktop-portal-1.19.0-1.fc42 |
store-results-to | /tmp/tmpuyi8d_ty/xdg-desktop-portal-1.19.0-1.fc42.tar.xz |
time-created | 2024-11-13 03:45:46 |
time-finished | 2024-11-13 03:49:40 |
title | Newly introduced findings |
tool | csmock |
tool-args | '/usr/bin/csmock' '-r' 'fedora-rawhide-gcc-latest-x86_64' '-t' 'clippy,cppcheck,gcc,unicontrol,shellcheck' '-o' '/tmp/tmpuyi8d_ty/xdg-desktop-portal-1.19.0-1.fc42.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install=gcc-latest' '--gcc-analyzer-bin=/opt/gcc-latest/bin/gcc' '/tmp/tmpuyi8d_ty/xdg-desktop-portal-1.19.0-1.fc42.src.rpm' |
tool-version | csmock-3.7.1.20241107.094801.gb3f0f26.pr_192-1.el9 |