Error: GCC_ANALYZER_WARNING (CWE-835): [#def1] SDL3-3.2.20/src/video/SDL_surface.c:3003:12: warning[-Wanalyzer-infinite-loop]: infinite loop SDL3-3.2.20/src/video/SDL_surface.c:2863:6: enter_function: entry to ‘SDL_WriteSurfacePixel_REAL’ # 3001| SDL_InvalidateMap(&surface->map); # 3002| # 3003|-> while (surface->locked > 0) { # 3004| SDL_UnlockSurface(surface); # 3005| } Error: GCC_ANALYZER_WARNING (CWE-775): [#def2] SDL3-3.2.20/src/video/wayland/SDL_waylanddatamanager.c:376:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipefd[0]’ SDL3-3.2.20/src/video/wayland/SDL_waylanddatamanager.c:363:8: branch_false: following ‘false’ branch (when ‘offer’ is non-NULL)... SDL3-3.2.20/src/video/wayland/SDL_waylanddatamanager.c:367:5: branch_false: ...to here SDL3-3.2.20/src/video/wayland/SDL_waylanddatamanager.c:368:8: branch_false: following ‘false’ branch (when ‘data_device’ is non-NULL)... SDL3-3.2.20/src/video/wayland/SDL_waylanddatamanager.c:370:16: branch_false: ...to here SDL3-3.2.20/src/video/wayland/SDL_waylanddatamanager.c:370:15: branch_false: following ‘false’ branch... SDL3-3.2.20/src/video/wayland/SDL_waylanddatamanager.c:373:56: branch_false: ...to here SDL3-3.2.20/src/video/wayland/SDL_waylanddatamanager.c:376:9: danger: ‘pipefd[0]’ leaks here # 374| # 375| // TODO: Needs pump and flush? # 376|-> WAYLAND_wl_display_flush(data_device->video_data->display); # 377| # 378| close(pipefd[1]); Error: GCC_ANALYZER_WARNING (CWE-775): [#def3] SDL3-3.2.20/src/video/wayland/SDL_waylanddatamanager.c:412:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipefd[0]’ SDL3-3.2.20/src/video/wayland/SDL_waylanddatamanager.c:399:8: branch_false: following ‘false’ branch (when ‘offer’ is non-NULL)... SDL3-3.2.20/src/video/wayland/SDL_waylanddatamanager.c:403:5: branch_false: ...to here SDL3-3.2.20/src/video/wayland/SDL_waylanddatamanager.c:404:8: branch_false: following ‘false’ branch (when ‘primary_selection_device’ is non-NULL)... SDL3-3.2.20/src/video/wayland/SDL_waylanddatamanager.c:406:16: branch_false: ...to here SDL3-3.2.20/src/video/wayland/SDL_waylanddatamanager.c:406:15: branch_false: following ‘false’ branch... SDL3-3.2.20/src/video/wayland/SDL_waylanddatamanager.c:409:73: branch_false: ...to here SDL3-3.2.20/src/video/wayland/SDL_waylanddatamanager.c:412:9: danger: ‘pipefd[0]’ leaks here # 410| # 411| // TODO: Needs pump and flush? # 412|-> WAYLAND_wl_display_flush(primary_selection_device->video_data->display); # 413| # 414| close(pipefd[1]); Error: CPPCHECK_WARNING (CWE-457): [#def4] SDL3-3.2.20/src/video/wayland/SDL_waylandevents.c:156: error[uninitvar]: Uninitialized variable: tp->surface # 154| # 155| wl_list_for_each (tp, &touch_points, link) { # 156|-> if (tp->surface == surface) { # 157| return true; # 158| } Error: CPPCHECK_WARNING (CWE-457): [#def5] SDL3-3.2.20/src/video/wayland/SDL_waylandevents.c:1220: error[uninitvar]: Uninitialized variable: tp->surface # 1218| bool removed = false; # 1219| # 1220|-> if (tp->surface) { # 1221| SDL_WindowData *window_data = (SDL_WindowData *)wl_surface_get_user_data(tp->surface); # 1222| Error: CPPCHECK_WARNING (CWE-457): [#def6] SDL3-3.2.20/src/video/wayland/SDL_waylandevents.c:3204: error[uninitvar]: Uninitialized variables: tp.id, tp.fx, tp.fy, tp.surface, tp.link # 3202| wl_list_for_each_safe (tp, tmp, &touch_points, link) { # 3203| WAYLAND_wl_list_remove(&tp->link); # 3204|-> SDL_free(tp); # 3205| } # 3206| } Error: CPPCHECK_WARNING (CWE-457): [#def7] SDL3-3.2.20/src/video/wayland/SDL_waylandmouse.c:618: error[uninitvar]: Uninitialized variables: c.scale, c.node # 616| wl_list_for_each_safe(c, temp, &d->cursor_data.custom.scaled_cursor_cache, node) { # 617| Wayland_ReleaseSHMBuffer(&c->shmBuffer); # 618|-> SDL_free(c); # 619| } # 620| Error: GCC_ANALYZER_WARNING (CWE-775): [#def8] SDL3-3.2.20/src/video/x11/SDL_x11messagebox.c:201:21: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[1]’ SDL3-3.2.20/src/video/x11/SDL_x11messagebox.c:854:6: enter_function: entry to ‘X11_ShowMessageBox’ SDL3-3.2.20/src/video/x11/SDL_x11messagebox.c:863:8: branch_false: following ‘false’ branch... SDL3-3.2.20/src/video/x11/SDL_x11messagebox.c:867:11: branch_false: ...to here SDL3-3.2.20/src/video/x11/SDL_x11messagebox.c:868:8: branch_false: following ‘false’ branch (when ‘pid != -1’)... SDL3-3.2.20/src/video/x11/SDL_x11messagebox.c:872:15: branch_false: ...to here SDL3-3.2.20/src/video/x11/SDL_x11messagebox.c:872:15: branch_true: following ‘true’ branch (when ‘pid == 0’)... SDL3-3.2.20/src/video/x11/SDL_x11messagebox.c:874:9: branch_true: ...to here SDL3-3.2.20/src/video/x11/SDL_x11messagebox.c:875:18: call_function: calling ‘X11_ShowMessageBoxImpl’ from ‘X11_ShowMessageBox’ # 199| data->pbuttonid = pbuttonid; # 200| # 201|-> data->display = X11_XOpenDisplay(NULL); # 202| if (!data->display) { # 203| return SDL_SetError("Couldn't open X11 display"); Error: GCC_ANALYZER_WARNING (CWE-775): [#def9] SDL3-3.2.20/src/video/x11/SDL_x11messagebox.c:212:30: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[1]’ SDL3-3.2.20/src/video/x11/SDL_x11messagebox.c:854:6: enter_function: entry to ‘X11_ShowMessageBox’ SDL3-3.2.20/src/video/x11/SDL_x11messagebox.c:863:8: branch_false: following ‘false’ branch... SDL3-3.2.20/src/video/x11/SDL_x11messagebox.c:867:11: branch_false: ...to here SDL3-3.2.20/src/video/x11/SDL_x11messagebox.c:868:8: branch_false: following ‘false’ branch (when ‘pid != -1’)... SDL3-3.2.20/src/video/x11/SDL_x11messagebox.c:872:15: branch_false: ...to here SDL3-3.2.20/src/video/x11/SDL_x11messagebox.c:872:15: branch_true: following ‘true’ branch (when ‘pid == 0’)... SDL3-3.2.20/src/video/x11/SDL_x11messagebox.c:874:9: branch_true: ...to here SDL3-3.2.20/src/video/x11/SDL_x11messagebox.c:875:18: call_function: calling ‘X11_ShowMessageBoxImpl’ from ‘X11_ShowMessageBox’ # 210| int i_font; # 211| for (i_font = 0; g_MessageBoxFont[i_font]; ++i_font) { # 212|-> data->font_set = X11_XCreateFontSet(data->display, g_MessageBoxFont[i_font], # 213| &missing, &num_missing, NULL); # 214| if (missing) { Error: GCC_ANALYZER_WARNING (CWE-775): [#def10] SDL3-3.2.20/src/video/x11/SDL_x11messagebox.c:813:10: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[1]’ SDL3-3.2.20/src/video/x11/SDL_x11messagebox.c:854:6: enter_function: entry to ‘X11_ShowMessageBox’ SDL3-3.2.20/src/video/x11/SDL_x11messagebox.c:863:8: branch_false: following ‘false’ branch... SDL3-3.2.20/src/video/x11/SDL_x11messagebox.c:867:11: branch_false: ...to here SDL3-3.2.20/src/video/x11/SDL_x11messagebox.c:868:8: branch_false: following ‘false’ branch (when ‘pid != -1’)... SDL3-3.2.20/src/video/x11/SDL_x11messagebox.c:872:15: branch_false: ...to here SDL3-3.2.20/src/video/x11/SDL_x11messagebox.c:872:15: branch_true: following ‘true’ branch (when ‘pid == 0’)... SDL3-3.2.20/src/video/x11/SDL_x11messagebox.c:874:9: branch_true: ...to here SDL3-3.2.20/src/video/x11/SDL_x11messagebox.c:875:18: call_function: calling ‘X11_ShowMessageBoxImpl’ from ‘X11_ShowMessageBox’ # 811| SDL_zero(data); # 812| # 813|-> if (!SDL_X11_LoadSymbols()) { # 814| return false; # 815| } Error: GCC_ANALYZER_WARNING (CWE-775): [#def11] SDL3-3.2.20/src/video/x11/SDL_x11messagebox.c:829:5: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[1]’ SDL3-3.2.20/src/video/x11/SDL_x11messagebox.c:854:6: enter_function: entry to ‘X11_ShowMessageBox’ SDL3-3.2.20/src/video/x11/SDL_x11messagebox.c:863:8: branch_false: following ‘false’ branch... SDL3-3.2.20/src/video/x11/SDL_x11messagebox.c:867:11: branch_false: ...to here SDL3-3.2.20/src/video/x11/SDL_x11messagebox.c:868:8: branch_false: following ‘false’ branch (when ‘pid != -1’)... SDL3-3.2.20/src/video/x11/SDL_x11messagebox.c:872:15: branch_false: ...to here SDL3-3.2.20/src/video/x11/SDL_x11messagebox.c:872:15: branch_true: following ‘true’ branch (when ‘pid == 0’)... SDL3-3.2.20/src/video/x11/SDL_x11messagebox.c:874:9: branch_true: ...to here SDL3-3.2.20/src/video/x11/SDL_x11messagebox.c:875:18: call_function: calling ‘X11_ShowMessageBoxImpl’ from ‘X11_ShowMessageBox’ # 827| # 828| // This code could get called from multiple threads maybe? # 829|-> X11_XInitThreads(); # 830| # 831| // Initialize the return buttonID value to -1 (for error or dialogbox closed). Error: GCC_ANALYZER_WARNING (CWE-775): [#def12] SDL3-3.2.20/src/video/x11/SDL_x11messagebox.c:876:13: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[1]’ SDL3-3.2.20/src/video/x11/SDL_x11messagebox.c:863:8: branch_false: following ‘false’ branch... SDL3-3.2.20/src/video/x11/SDL_x11messagebox.c:867:11: branch_false: ...to here SDL3-3.2.20/src/video/x11/SDL_x11messagebox.c:868:8: branch_false: following ‘false’ branch (when ‘pid != -1’)... SDL3-3.2.20/src/video/x11/SDL_x11messagebox.c:872:15: branch_false: ...to here SDL3-3.2.20/src/video/x11/SDL_x11messagebox.c:872:15: branch_true: following ‘true’ branch (when ‘pid == 0’)... SDL3-3.2.20/src/video/x11/SDL_x11messagebox.c:874:9: branch_true: ...to here SDL3-3.2.20/src/video/x11/SDL_x11messagebox.c:876:13: danger: ‘fds[1]’ leaks here # 874| close(fds[0]); # 875| result = X11_ShowMessageBoxImpl(messageboxdata, buttonID); # 876|-> if (write(fds[1], &result, sizeof(result)) != sizeof(result)) { # 877| exitcode = 1; # 878| } else if (write(fds[1], buttonID, sizeof(*buttonID)) != sizeof(*buttonID)) { Error: GCC_ANALYZER_WARNING (CWE-775): [#def13] SDL3-3.2.20/src/video/x11/SDL_x11messagebox.c:885:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[1]’ SDL3-3.2.20/src/video/x11/SDL_x11messagebox.c:863:8: branch_false: following ‘false’ branch... SDL3-3.2.20/src/video/x11/SDL_x11messagebox.c:867:11: branch_false: ...to here SDL3-3.2.20/src/video/x11/SDL_x11messagebox.c:868:8: branch_false: following ‘false’ branch (when ‘pid != -1’)... SDL3-3.2.20/src/video/x11/SDL_x11messagebox.c:872:15: branch_false: ...to here SDL3-3.2.20/src/video/x11/SDL_x11messagebox.c:872:15: branch_false: following ‘false’ branch (when ‘pid != 0’)... SDL3-3.2.20/src/video/x11/SDL_x11messagebox.c:885:9: branch_false: ...to here SDL3-3.2.20/src/video/x11/SDL_x11messagebox.c:885:9: danger: ‘fds[1]’ leaks here # 883| } else { // we're the parent # 884| pid_t rc; # 885|-> close(fds[1]); # 886| do { # 887| rc = waitpid(pid, &status, 0); Error: GCC_ANALYZER_WARNING (CWE-775): [#def14] SDL3-3.2.20/src/video/x11/SDL_x11messagebox.c:885:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[status]’ SDL3-3.2.20/src/video/x11/SDL_x11messagebox.c:863:8: branch_false: following ‘false’ branch... SDL3-3.2.20/src/video/x11/SDL_x11messagebox.c:867:11: branch_false: ...to here SDL3-3.2.20/src/video/x11/SDL_x11messagebox.c:868:8: branch_false: following ‘false’ branch (when ‘pid != -1’)... SDL3-3.2.20/src/video/x11/SDL_x11messagebox.c:872:15: branch_false: ...to here SDL3-3.2.20/src/video/x11/SDL_x11messagebox.c:872:15: branch_false: following ‘false’ branch (when ‘pid != 0’)... SDL3-3.2.20/src/video/x11/SDL_x11messagebox.c:885:9: branch_false: ...to here SDL3-3.2.20/src/video/x11/SDL_x11messagebox.c:885:9: danger: ‘fds[status]’ leaks here # 883| } else { // we're the parent # 884| pid_t rc; # 885|-> close(fds[1]); # 886| do { # 887| rc = waitpid(pid, &status, 0); Error: GCC_ANALYZER_WARNING (CWE-775): [#def15] SDL3-3.2.20/src/video/x11/SDL_x11messagebox.c:887:18: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[0]’ SDL3-3.2.20/src/video/x11/SDL_x11messagebox.c:863:8: branch_false: following ‘false’ branch... SDL3-3.2.20/src/video/x11/SDL_x11messagebox.c:867:11: branch_false: ...to here SDL3-3.2.20/src/video/x11/SDL_x11messagebox.c:868:8: branch_false: following ‘false’ branch (when ‘pid != -1’)... SDL3-3.2.20/src/video/x11/SDL_x11messagebox.c:872:15: branch_false: ...to here SDL3-3.2.20/src/video/x11/SDL_x11messagebox.c:872:15: branch_false: following ‘false’ branch (when ‘pid != 0’)... SDL3-3.2.20/src/video/x11/SDL_x11messagebox.c:885:9: branch_false: ...to here SDL3-3.2.20/src/video/x11/SDL_x11messagebox.c:888:18: branch_true: following ‘true’ branch... SDL3-3.2.20/src/video/x11/SDL_x11messagebox.c:887:18: danger: ‘fds[0]’ leaks here # 885| close(fds[1]); # 886| do { # 887|-> rc = waitpid(pid, &status, 0); # 888| } while ((rc == -1) && (errno == EINTR)); # 889| Error: GCC_ANALYZER_WARNING (CWE-775): [#def16] SDL3-3.2.20/src/video/x11/SDL_x11messagebox.c:887:18: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[status]’ SDL3-3.2.20/src/video/x11/SDL_x11messagebox.c:863:8: branch_false: following ‘false’ branch... SDL3-3.2.20/src/video/x11/SDL_x11messagebox.c:867:11: branch_false: ...to here SDL3-3.2.20/src/video/x11/SDL_x11messagebox.c:868:8: branch_false: following ‘false’ branch (when ‘pid != -1’)... SDL3-3.2.20/src/video/x11/SDL_x11messagebox.c:872:15: branch_false: ...to here SDL3-3.2.20/src/video/x11/SDL_x11messagebox.c:872:15: branch_false: following ‘false’ branch (when ‘pid != 0’)... SDL3-3.2.20/src/video/x11/SDL_x11messagebox.c:885:9: branch_false: ...to here SDL3-3.2.20/src/video/x11/SDL_x11messagebox.c:887:18: danger: ‘fds[status]’ leaks here # 885| close(fds[1]); # 886| do { # 887|-> rc = waitpid(pid, &status, 0); # 888| } while ((rc == -1) && (errno == EINTR)); # 889| Error: GCC_ANALYZER_WARNING (CWE-775): [#def17] SDL3-3.2.20/src/video/x11/SDL_x11messagebox.c:899:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[0]’ SDL3-3.2.20/src/video/x11/SDL_x11messagebox.c:863:8: branch_false: following ‘false’ branch... SDL3-3.2.20/src/video/x11/SDL_x11messagebox.c:867:11: branch_false: ...to here SDL3-3.2.20/src/video/x11/SDL_x11messagebox.c:868:8: branch_false: following ‘false’ branch (when ‘pid != -1’)... SDL3-3.2.20/src/video/x11/SDL_x11messagebox.c:872:15: branch_false: ...to here SDL3-3.2.20/src/video/x11/SDL_x11messagebox.c:872:15: branch_false: following ‘false’ branch (when ‘pid != 0’)... SDL3-3.2.20/src/video/x11/SDL_x11messagebox.c:885:9: branch_false: ...to here SDL3-3.2.20/src/video/x11/SDL_x11messagebox.c:899:9: danger: ‘fds[0]’ leaks here # 897| *buttonID = 0; # 898| } # 899|-> close(fds[0]); # 900| # 901| return result;
| 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 |
| diffbase-analyzer-version-clippy | 1.90.0 |
| diffbase-analyzer-version-cppcheck | 2.18.3 |
| diffbase-analyzer-version-gcc | 15.2.1 |
| diffbase-analyzer-version-gcc-analyzer | 16.0.0 |
| diffbase-analyzer-version-shellcheck | 0.11.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-40.us-west-2.compute.internal |
| diffbase-known-false-positives | /usr/share/csmock/known-false-positives.js |
| diffbase-known-false-positives-rpm | known-false-positives-0.0.0.20250521.132812.g8eff701.main-1.el9.noarch |
| diffbase-mock-config | fedora-rawhide-gcc-latest-x86_64 |
| diffbase-project-name | SDL3-3.3.2-1.fc44 |
| diffbase-store-results-to | /tmp/tmphgtq5jm8/SDL3-3.3.2-1.fc44.tar.xz |
| diffbase-time-created | 2025-10-28 17:33:26 |
| diffbase-time-finished | 2025-10-28 17:44:31 |
| diffbase-tool | csmock |
| diffbase-tool-args | '/usr/bin/csmock' '-r' 'fedora-rawhide-gcc-latest-x86_64' '-t' 'gcc,cppcheck,shellcheck,clippy,unicontrol' '-o' '/tmp/tmphgtq5jm8/SDL3-3.3.2-1.fc44.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--install=gcc-latest' '--gcc-analyzer-bin=/opt/gcc-latest/bin/gcc' '/tmp/tmphgtq5jm8/SDL3-3.3.2-1.fc44.src.rpm' |
| diffbase-tool-version | csmock-3.8.3.20251027.143044.ge6b947b-1.el9 |
| enabled-plugins | clippy, cppcheck, gcc, shellcheck, unicontrol |
| exit-code | 0 |
| host | ip-172-16-1-40.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 | SDL3-3.2.20-1.fc43 |
| store-results-to | /tmp/tmp7u1vbpkw/SDL3-3.2.20-1.fc43.tar.xz |
| time-created | 2025-10-28 17:22:05 |
| time-finished | 2025-10-28 17:32:58 |
| title | Fixed findings |
| tool | csmock |
| tool-args | '/usr/bin/csmock' '-r' 'fedora-rawhide-gcc-latest-x86_64' '-t' 'gcc,cppcheck,shellcheck,clippy,unicontrol' '-o' '/tmp/tmp7u1vbpkw/SDL3-3.2.20-1.fc43.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--install=gcc-latest' '--gcc-analyzer-bin=/opt/gcc-latest/bin/gcc' '/tmp/tmp7u1vbpkw/SDL3-3.2.20-1.fc43.src.rpm' |
| tool-version | csmock-3.8.3.20251027.143044.ge6b947b-1.el9 |