Error: GCC_ANALYZER_WARNING (CWE-775): [#def1] libgpg-error-1.50-build/libgpg-error-1.50/src/spawn-posix.c: scope_hint: In function 'my_exec' libgpg-error-1.50-build/libgpg-error-1.50/src/spawn-posix.c:331:12: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'dup2(*act.fd[i], i)' # 329| if (act->fd[i] != i) # 330| { # 331|-> if (dup2 (act->fd[i], i) == -1) # 332| _gpgrt_log_fatal ("dup2 std%s failed: %s\n", # 333| i==0?"in":i==1?"out":"err", strerror (errno)); Error: GCC_ANALYZER_WARNING (CWE-775): [#def2] libgpg-error-1.50-build/libgpg-error-1.50/src/spawn-posix.c:511:12: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'fd_in[0]' libgpg-error-1.50-build/libgpg-error-1.50/src/spawn-posix.c:550:13: note: in expansion of macro 'xtrycalloc' libgpg-error-1.50-build/libgpg-error-1.50/src/spawn-posix.c:604:15: note: in expansion of macro 'xfree' # 509| argv = xtrycalloc (i+2, sizeof *argv); # 510| if (!argv) # 511|-> return _gpg_err_code_from_syserror (); # 512| if (pgmname) # 513| argv[0] = strrchr (pgmname, '/'); Error: GCC_ANALYZER_WARNING (CWE-775): [#def3] libgpg-error-1.50-build/libgpg-error-1.50/src/spawn-posix.c: scope_hint: In function '_gpgrt_process_spawn' libgpg-error-1.50-build/libgpg-error-1.50/src/spawn-posix.c:511:12: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'fd_in[1]' libgpg-error-1.50-build/libgpg-error-1.50/src/spawn-posix.c:58: included_from: Included from here. libgpg-error-1.50-build/libgpg-error-1.50/src/spawn-posix.c:550:13: note: in expansion of macro 'xtrycalloc' libgpg-error-1.50-build/libgpg-error-1.50/src/spawn-posix.c:604:15: note: in expansion of macro 'xfree' # 509| argv = xtrycalloc (i+2, sizeof *argv); # 510| if (!argv) # 511|-> return _gpg_err_code_from_syserror (); # 512| if (pgmname) # 513| argv[0] = strrchr (pgmname, '/'); Error: GCC_ANALYZER_WARNING (CWE-775): [#def4] libgpg-error-1.50-build/libgpg-error-1.50/src/spawn-posix.c:511:12: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'fd_out[1]' libgpg-error-1.50-build/libgpg-error-1.50/src/spawn-posix.c:550:13: note: in expansion of macro 'xtrycalloc' # 509| argv = xtrycalloc (i+2, sizeof *argv); # 510| if (!argv) # 511|-> return _gpg_err_code_from_syserror (); # 512| if (pgmname) # 513| argv[0] = strrchr (pgmname, '/'); Error: CLANG_WARNING: [#def5] libgpg-error-1.50-build/libgpg-error-1.50/src/spawn-posix.c:695:22: warning[core.NullDereference]: Dereference of null pointer (loaded from variable 'r_process') # 693| xfree (process); # 694| xfree (argv); # 695|-> *r_process = NULL; # 696| return 0; # 697| }
analyzer-version-clang | 18.1.7 |
analyzer-version-cppcheck | 2.14.2 |
analyzer-version-gcc | 14.1.1 |
analyzer-version-gcc-analyzer | 14.1.1 |
analyzer-version-shellcheck | 0.10.0 |
diffbase-analyzer-version-clang | 18.1.7 |
diffbase-analyzer-version-cppcheck | 2.14.2 |
diffbase-analyzer-version-gcc | 14.1.1 |
diffbase-analyzer-version-gcc-analyzer | 14.1.1 |
diffbase-analyzer-version-shellcheck | 0.10.0 |
diffbase-enabled-plugins | clang, cppcheck, gcc, shellcheck |
diffbase-exit-code | 0 |
diffbase-host | ip-172-16-1-231.us-west-2.compute.internal |
diffbase-mock-config | fedora-41-x86_64 |
diffbase-project-name | libgpg-error-1.48-1.fc40 |
diffbase-store-results-to | /tmp/tmptn_k6l4f/libgpg-error-1.48-1.fc40.tar.xz |
diffbase-time-created | 2024-07-03 14:40:38 |
diffbase-time-finished | 2024-07-03 14:42:33 |
diffbase-tool | csmock |
diffbase-tool-args | '/usr/bin/csmock' '-r' 'fedora-41-x86_64' '-t' 'cppcheck,gcc,clang,shellcheck' '-o' '/tmp/tmptn_k6l4f/libgpg-error-1.48-1.fc40.tar.xz' '--gcc-analyze' '/tmp/tmptn_k6l4f/libgpg-error-1.48-1.fc40.src.rpm' |
diffbase-tool-version | csmock-3.5.3-1.el9 |
enabled-plugins | clang, cppcheck, gcc, shellcheck |
exit-code | 0 |
host | ip-172-16-1-231.us-west-2.compute.internal |
mock-config | fedora-41-x86_64 |
project-name | libgpg-error-1.50-1.fc41 |
store-results-to | /tmp/tmpkc9tahrl/libgpg-error-1.50-1.fc41.tar.xz |
time-created | 2024-07-03 14:42:43 |
time-finished | 2024-07-03 14:44:14 |
title | Newly introduced defects |
tool | csmock |
tool-args | '/usr/bin/csmock' '-r' 'fedora-41-x86_64' '-t' 'cppcheck,gcc,clang,shellcheck' '-o' '/tmp/tmpkc9tahrl/libgpg-error-1.50-1.fc41.tar.xz' '--gcc-analyze' '/tmp/tmpkc9tahrl/libgpg-error-1.50-1.fc41.src.rpm' |
tool-version | csmock-3.5.3-1.el9 |