Error: GCC_ANALYZER_WARNING (CWE-401): [#def1] tevent-0.17.1/lib/replace/tests/os2_delete.c:109:24: warning[-Wanalyzer-malloc-leak]: leak of ‘opendir("test.dir/test0.txt")’ tevent-0.17.1/lib/replace/tests/os2_delete.c:95:5: enter_function: entry to ‘test_readdir_os2_delete’ tevent-0.17.1/lib/replace/tests/os2_delete.c:104:9: call_function: calling ‘create_files’ from ‘test_readdir_os2_delete’ tevent-0.17.1/lib/replace/tests/os2_delete.c:104:9: return_function: returning to ‘test_readdir_os2_delete’ from ‘create_files’ tevent-0.17.1/lib/replace/tests/os2_delete.c:106:13: acquire_memory: allocated here tevent-0.17.1/lib/replace/tests/os2_delete.c:107:12: branch_true: following ‘true’ branch... tevent-0.17.1/lib/replace/tests/os2_delete.c:107:24: branch_true: ...to here tevent-0.17.1/lib/replace/tests/os2_delete.c:109:12: branch_true: following ‘true’ branch... tevent-0.17.1/lib/replace/tests/os2_delete.c:109:24: branch_true: ...to here tevent-0.17.1/lib/replace/tests/os2_delete.c:109:24: danger: ‘opendir("test.dir/test0.txt")’ leaks here; was allocated at [(7)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/6) # 107| if (d != NULL) FAILED("opendir() on file succeed"); # 108| if (errno != ENOTDIR) FAILED("opendir() on file didn't give ENOTDIR"); # 109|-> if (d != NULL) closedir(d); # 110| # 111| d = opendir(TESTDIR); Error: GCC_ANALYZER_WARNING (CWE-401): [#def2] tevent-0.17.1/lib/replace/tests/os2_delete.c:114:14: warning[-Wanalyzer-malloc-leak]: leak of ‘opendir("test.dir")’ tevent-0.17.1/lib/replace/tests/os2_delete.c:95:5: enter_function: entry to ‘test_readdir_os2_delete’ tevent-0.17.1/lib/replace/tests/os2_delete.c:104:9: call_function: calling ‘create_files’ from ‘test_readdir_os2_delete’ tevent-0.17.1/lib/replace/tests/os2_delete.c:104:9: return_function: returning to ‘test_readdir_os2_delete’ from ‘create_files’ tevent-0.17.1/lib/replace/tests/os2_delete.c:109:12: branch_false: following ‘false’ branch... tevent-0.17.1/lib/replace/tests/os2_delete.c:111:13: branch_false: ...to here tevent-0.17.1/lib/replace/tests/os2_delete.c:111:13: acquire_memory: allocated here tevent-0.17.1/lib/replace/tests/os2_delete.c:114:14: danger: ‘opendir("test.dir")’ leaks here; was allocated at [(9)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/8) # 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): [#def3] tevent-0.17.1/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.17.1/lib/replace/tests/os2_delete.c:95:5: enter_function: entry to ‘test_readdir_os2_delete’ tevent-0.17.1/lib/replace/tests/os2_delete.c:104:9: call_function: calling ‘create_files’ from ‘test_readdir_os2_delete’ tevent-0.17.1/lib/replace/tests/os2_delete.c:104:9: return_function: returning to ‘test_readdir_os2_delete’ from ‘create_files’ tevent-0.17.1/lib/replace/tests/os2_delete.c:109:12: branch_false: following ‘false’ branch... tevent-0.17.1/lib/replace/tests/os2_delete.c:111:13: branch_false: ...to here tevent-0.17.1/lib/replace/tests/os2_delete.c:111:13: acquire_memory: this call could return NULL tevent-0.17.1/lib/replace/tests/os2_delete.c:114:14: danger: argument 1 (‘opendir("test.dir")’) from [(9)](sarif:/runs/0/results/1/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: CPPCHECK_WARNING (CWE-476): [#def4] tevent-0.17.1/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: GCC_ANALYZER_WARNING (CWE-688): [#def5] tevent-0.17.1/lib/replace/tests/testsuite.c:172:15: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘x’ where non-null expected tevent-0.17.1/lib/replace/tests/testsuite.c:170:13: acquire_memory: this call could return NULL tevent-0.17.1/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): [#def6] tevent-0.17.1/lib/replace/tests/testsuite.c:271:15: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘x’ tevent-0.17.1/lib/replace/tests/testsuite.c:270:13: acquire_memory: this call could return NULL tevent-0.17.1/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): [#def7] tevent-0.17.1/lib/replace/tests/testsuite.c:279:15: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘x’ where non-null expected tevent-0.17.1/lib/replace/tests/testsuite.c:270:13: acquire_memory: this call could return NULL tevent-0.17.1/lib/replace/tests/testsuite.c:273:12: branch_false: following ‘false’ branch... tevent-0.17.1/lib/replace/tests/testsuite.c:278:13: branch_false: ...to here tevent-0.17.1/lib/replace/tests/testsuite.c:278:13: acquire_memory: this call could return NULL tevent-0.17.1/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): [#def8] tevent-0.17.1/lib/replace/tests/testsuite.c:1114:25: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’ tevent-0.17.1/lib/replace/tests/testsuite.c:1102:19: branch_true: following ‘true’ branch (when ‘i != 100’)... tevent-0.17.1/lib/replace/tests/testsuite.c:1103:22: branch_true: ...to here tevent-0.17.1/lib/replace/tests/testsuite.c:1103:22: acquire_resource: opened here tevent-0.17.1/lib/replace/tests/testsuite.c:1104:20: branch_false: following ‘false’ branch (when ‘fd != -1’)... tevent-0.17.1/lib/replace/tests/testsuite.c:1112:20: branch_false: ...to here tevent-0.17.1/lib/replace/tests/testsuite.c:1114:25: danger: ‘fd’ leaks here; was opened at [(3)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/2) # 1112| if (fd >= 1000) { # 1113| printf("fd=%d\n", fd); # 1114|-> closefrom(3); # 1115| return false; # 1116| } Error: GCC_ANALYZER_WARNING (CWE-404): [#def9] tevent-0.17.1/tevent_debug.c:128:9: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’ tevent-0.17.1/tevent_debug.c:115:12: branch_false: following ‘false’ branch (when ‘ev’ is non-NULL)... tevent-0.17.1/tevent_debug.c:118:13: branch_false: ...to here tevent-0.17.1/tevent_debug.c:121:12: branch_false: following ‘false’ branch... tevent-0.17.1/tevent_debug.c:124:13: branch_false: ...to here tevent-0.17.1/tevent_debug.c:124:12: branch_false: following ‘false’ branch... tevent-0.17.1/tevent_debug.c:127:9: branch_false: ...to here tevent-0.17.1/tevent_debug.c:127:9: acquire_resource: ‘va_start’ called here tevent-0.17.1/tevent_debug.c:128:9: danger: missing call to ‘va_end’ to match ‘va_start’ at [(7)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/6) # 126| } # 127| va_start(ap, fmt); # 128|-> ev->debug_ops.debug(ev->debug_ops.context, level, fmt, ap); # 129| va_end(ap); # 130| } Error: CPPCHECK_WARNING (CWE-562): [#def10] tevent-0.17.1/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| /* Error: GCC_ANALYZER_WARNING (CWE-126): [#def11] tevent-0.17.1/tevent_epoll.c:632:41: warning[-Wanalyzer-out-of-bounds]: stack-based buffer over-read tevent-0.17.1/tevent_epoll.c:890:12: enter_function: entry to ‘epoll_event_loop_once’ tevent-0.17.1/tevent_epoll.c:913:12: branch_false: following ‘false’ branch... tevent-0.17.1/tevent_epoll.c:917:13: branch_false: ...to here tevent-0.17.1/tevent_epoll.c:917:12: branch_false: following ‘false’ branch... tevent-0.17.1/tevent_epoll.c:929:16: branch_false: ...to here tevent-0.17.1/tevent_epoll.c:929:16: call_function: calling ‘epoll_event_loop’ from ‘epoll_event_loop_once’ # 630| # 631| for (i=0;i<ret;i++) { # 632|-> struct tevent_fd *fde = talloc_get_type(events[i].data.ptr, # 633| struct tevent_fd); # 634| struct tevent_fd *selected = NULL; Error: GCC_ANALYZER_WARNING (CWE-126): [#def12] tevent-0.17.1/tevent_epoll.c:644:21: warning[-Wanalyzer-out-of-bounds]: stack-based buffer over-read tevent-0.17.1/tevent_epoll.c:890:12: enter_function: entry to ‘epoll_event_loop_once’ tevent-0.17.1/tevent_epoll.c:913:12: branch_false: following ‘false’ branch... tevent-0.17.1/tevent_epoll.c:917:13: branch_false: ...to here tevent-0.17.1/tevent_epoll.c:917:12: branch_false: following ‘false’ branch... tevent-0.17.1/tevent_epoll.c:929:16: branch_false: ...to here tevent-0.17.1/tevent_epoll.c:929:16: call_function: calling ‘epoll_event_loop’ from ‘epoll_event_loop_once’ # 642| } # 643| effective_flags = tevent_common_fd_mpx_flags(fde); # 644|-> if (events[i].events & (EPOLLHUP|EPOLLERR|EPOLLRDHUP)) { # 645| uint64_t add_flags = 0; # 646| Error: GCC_ANALYZER_WARNING (CWE-465): [#def13] tevent-0.17.1/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): [#def14] tevent-0.17.1/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;
| analyzer-version-clippy | 1.90.0 |
| analyzer-version-cppcheck | 2.18.3 |
| analyzer-version-gcc | 15.2.1 |
| analyzer-version-gcc-analyzer | 16.0.0 |
| analyzer-version-shellcheck | 0.11.0 |
| analyzer-version-unicontrol | 0.0.2 |
| enabled-plugins | clippy, cppcheck, gcc, shellcheck, unicontrol |
| exit-code | 0 |
| host | ip-172-16-1-122.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.20250521.132812.g8eff701.main-1.el9.noarch |
| mock-config | fedora-rawhide-gcc-latest-x86_64 |
| project-name | libtevent-0.17.1-3.fc44 |
| store-results-to | /tmp/tmpuf_ocpgm/libtevent-0.17.1-3.fc44.tar.xz |
| time-created | 2025-10-28 19:12:21 |
| time-finished | 2025-10-28 19:14:28 |
| tool | csmock |
| tool-args | '/usr/bin/csmock' '-r' 'fedora-rawhide-gcc-latest-x86_64' '-t' 'gcc,cppcheck,shellcheck,clippy,unicontrol' '-o' '/tmp/tmpuf_ocpgm/libtevent-0.17.1-3.fc44.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--install=gcc-latest' '--gcc-analyzer-bin=/opt/gcc-latest/bin/gcc' '/tmp/tmpuf_ocpgm/libtevent-0.17.1-3.fc44.src.rpm' |
| tool-version | csmock-3.8.3.20251027.143044.ge6b947b-1.el9 |