Error: GCC_ANALYZER_WARNING (CWE-688): [#def1] tevent-0.16.2/bin/default/../../lib/replace/tests/os2_delete.c:114:14: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘opendir("test.dir")’ where non-null expected tevent-0.16.2/bin/default/../../lib/replace/tests/os2_delete.c:95:5: enter_function: entry to ‘test_readdir_os2_delete’ tevent-0.16.2/bin/default/../../lib/replace/tests/os2_delete.c:104:9: call_function: calling ‘create_files’ from ‘test_readdir_os2_delete’ tevent-0.16.2/bin/default/../../lib/replace/tests/os2_delete.c:104:9: return_function: returning to ‘test_readdir_os2_delete’ from ‘create_files’ tevent-0.16.2/bin/default/../../lib/replace/tests/os2_delete.c:109:12: branch_false: following ‘false’ branch... tevent-0.16.2/bin/default/../../lib/replace/tests/os2_delete.c:111:13: branch_false: ...to here tevent-0.16.2/bin/default/../../lib/replace/tests/os2_delete.c:111:13: acquire_memory: this call could return NULL tevent-0.16.2/bin/default/../../lib/replace/tests/os2_delete.c:114:14: danger: argument 1 (‘opendir("test.dir")’) from [(9)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/8) could be NULL where non-null expected # 112| # 113| /* skip past . and .. */ # 114|-> de = readdir(d); # 115| strcmp(de->d_name, ".") == 0 || FAILED("match ."); # 116| de = readdir(d); Error: GCC_ANALYZER_WARNING (CWE-688): [#def2] tevent-0.16.2/bin/default/../../lib/replace/tests/testsuite.c:172:15: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘x’ where non-null expected tevent-0.16.2/bin/default/../../lib/replace/tests/testsuite.c:170:13: acquire_memory: this call could return NULL tevent-0.16.2/bin/default/../../lib/replace/tests/testsuite.c:172:15: danger: argument 2 (‘x’) from [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0) could be NULL where non-null expected # 170| x = strdup("bla"); # 171| # 172|-> cmp = strcmp("bla", x); # 173| if (cmp != 0) { # 174| printf("failure: strdup [\nfailed: expected \"bla\", got \"%s\"\n]\n", Error: GCC_ANALYZER_WARNING (CWE-476): [#def3] tevent-0.16.2/bin/default/../../lib/replace/tests/testsuite.c:271:15: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘x’ tevent-0.16.2/bin/default/../../lib/replace/tests/testsuite.c:270:13: acquire_memory: this call could return NULL tevent-0.16.2/bin/default/../../lib/replace/tests/testsuite.c:271:15: danger: ‘x’ could be NULL: unchecked value from [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0) # 269| printf("test: strndup\n"); # 270| x = strndup("bla", 0); # 271|-> cmp = strcmp(x, ""); # 272| free(x); # 273| if (cmp != 0) { Error: GCC_ANALYZER_WARNING (CWE-688): [#def4] tevent-0.16.2/bin/default/../../lib/replace/tests/testsuite.c:279:15: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘x’ where non-null expected tevent-0.16.2/bin/default/../../lib/replace/tests/testsuite.c:270:13: acquire_memory: this call could return NULL tevent-0.16.2/bin/default/../../lib/replace/tests/testsuite.c:273:12: branch_false: following ‘false’ branch... tevent-0.16.2/bin/default/../../lib/replace/tests/testsuite.c:278:13: branch_false: ...to here tevent-0.16.2/bin/default/../../lib/replace/tests/testsuite.c:278:13: acquire_memory: this call could return NULL tevent-0.16.2/bin/default/../../lib/replace/tests/testsuite.c:279:15: danger: argument 1 (‘x’) from [(5)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/4) could be NULL where non-null expected # 277| # 278| x = strndup("bla", 2); # 279|-> cmp = strcmp(x, "bl"); # 280| free(x); # 281| if (cmp != 0) { Error: GCC_ANALYZER_WARNING (CWE-775): [#def5] tevent-0.16.2/bin/default/../../lib/replace/tests/testsuite.c:1108:25: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’ tevent-0.16.2/bin/default/../../lib/replace/tests/testsuite.c:1096:19: branch_true: following ‘true’ branch (when ‘i != 100’)... tevent-0.16.2/bin/default/../../lib/replace/tests/testsuite.c:1097:22: branch_true: ...to here tevent-0.16.2/bin/default/../../lib/replace/tests/testsuite.c:1097:22: acquire_resource: opened here tevent-0.16.2/bin/default/../../lib/replace/tests/testsuite.c:1098:20: branch_false: following ‘false’ branch (when ‘fd != -1’)... tevent-0.16.2/bin/default/../../lib/replace/tests/testsuite.c:1106:20: branch_false: ...to here tevent-0.16.2/bin/default/../../lib/replace/tests/testsuite.c:1108:25: danger: ‘fd’ leaks here; was opened at [(3)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/2) # 1106| if (fd >= 1000) { # 1107| printf("fd=%d\n", fd); # 1108|-> closefrom(3); # 1109| return false; # 1110| } Error: GCC_ANALYZER_WARNING (CWE-465): [#def6] tevent-0.16.2/bin/default/../../tevent_standard.c:116:12: warning[-Wanalyzer-deref-before-check]: check of ‘*<unknown>.epoll_ops’ for NULL after already dereferencing it # 114| * signify fallback to poll_ops. # 115| */ # 116|-> if (glue->epoll_ops != NULL) { # 117| /* No fallback */ # 118| return ret; Error: GCC_ANALYZER_WARNING (CWE-465): [#def7] tevent-0.16.2/bin/default/../../tevent_standard.c:147:12: warning[-Wanalyzer-deref-before-check]: check of ‘*<unknown>.epoll_ops’ for NULL after already dereferencing it # 145| * signify fallback to poll_ops. # 146| */ # 147|-> if (glue->epoll_ops != NULL) { # 148| /* No fallback */ # 149| return ret; Error: CPPCHECK_WARNING (CWE-476): [#def8] tevent-0.16.2/lib/replace/tests/testsuite.c:172: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: x # 170| x = strdup("bla"); # 171| # 172|-> cmp = strcmp("bla", x); # 173| if (cmp != 0) { # 174| printf("failure: strdup [\nfailed: expected \"bla\", got \"%s\"\n]\n", Error: CPPCHECK_WARNING (CWE-562): [#def9] tevent-0.16.2/tevent_epoll.c:254: error[autoVariables]: Address of local auto-variable assigned to a function parameter. # 252| # 253| epoll_ev->pid = pid; # 254|-> epoll_ev->panic_state = &panic_triggered; # 255| for (fde=epoll_ev->ev->fd_events;fde;fde=fde->next) { # 256| /*
analyzer-version-clippy | 1.86.0 |
analyzer-version-cppcheck | 2.17.1 |
analyzer-version-gcc | 15.0.1 |
analyzer-version-gcc-analyzer | 15.0.1 |
analyzer-version-shellcheck | 0.10.0 |
analyzer-version-unicontrol | 0.0.2 |
enabled-plugins | clippy, cppcheck, gcc, shellcheck, unicontrol |
exit-code | 0 |
host | ip-172-16-1-199.us-west-2.compute.internal |
known-false-positives | /usr/share/csmock/known-false-positives.js |
known-false-positives-rpm | known-false-positives-0.0.0.20250425.124705.g1c7c448.main-1.el9.noarch |
mock-config | fedora-rawhide-x86_64 |
project-name | libtevent-0.16.2-2.fc43 |
store-results-to | /tmp/tmp8sgtjsw8/libtevent-0.16.2-2.fc43.tar.xz |
time-created | 2025-04-25 14:12:12 |
time-finished | 2025-04-25 14:14:10 |
tool | csmock |
tool-args | '/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'unicontrol,cppcheck,gcc,clippy,shellcheck' '-o' '/tmp/tmp8sgtjsw8/libtevent-0.16.2-2.fc43.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmp8sgtjsw8/libtevent-0.16.2-2.fc43.src.rpm' |
tool-version | csmock-3.8.1.20250422.172604.g26bc3d6-1.el9 |