Task #119511 - added.err
back to task #119511download
Error: GCC_ANALYZER_WARNING (CWE-476):
vim92/src/buffer.c:684:40: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘win’
vim92/src/buffer.c:6569:1: enter_function: entry to ‘wipe_buffer’
vim92/src/buffer.c:6579:5: call_function: calling ‘close_buffer’ from ‘wipe_buffer’
# 682|
# 683| // When the buffer is no longer in a window, trigger BufWinLeave
# 684|-> if ((win_valid || closed_popup) && win->w_buffer == buf
# 685| && buf->b_nwindows == 1)
# 686| {
Error: GCC_ANALYZER_WARNING (CWE-476):
vim92/src/clipboard.c:284:5: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘cbd’
vim92/src/clipboard.c:2820:1: enter_function: entry to ‘vwl_data_source_listener_event_cancelled’
vim92/src/clipboard.c:2825:32: call_function: inlined call to ‘clip_wl_get_cbd_from_selection’ from ‘vwl_data_source_listener_event_cancelled’
vim92/src/clipboard.c:2827:5: call_function: calling ‘clip_lose_selection’ from ‘vwl_data_source_listener_event_cancelled’
# 282|
# 283| clip_free_selection(cbd);
# 284|-> cbd->owned = FALSE;
# 285| if (visual_selection)
# 286| clip_clear_selection(cbd);
Error: GCC_ANALYZER_WARNING (CWE-476):
vim92/src/clipboard.c:2362:5: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
vim92/src/clipboard.c:2353:1: enter_function: entry to ‘vwl_data_device_listener_event_selection’
vim92/src/clipboard.c:2359:32: call_function: inlined call to ‘clip_wl_get_selection’ from ‘vwl_data_device_listener_event_selection’
vim92/src/clipboard.c:2362:5: danger: dereference of NULL ‘<unknown>’
# 2360|
# 2361| // Destroy previous offer if any, it is now invalid
# 2362|-> vwl_data_offer_destroy(sel->offer);
# 2363|
# 2364| // There are two cases when sel->offer is NULL
Error: COMPILER_WARNING:
vim92/src/gui_gtk4.c: warning: -D_FORTIFY_SOURCE defined but value is too low
Error: COMPILER_WARNING (CWE-457):
vim92/src/gui_gtk4.c: scope_hint: In function ‘gui_mch_open’
vim92/src/gui_gtk4.c:655:21: warning[-Wmaybe-uninitialized]: ‘w’ may be used uninitialized
# 655 | Columns = w;
# | ~~~~~~~~^~~
vim92/src/gui_gtk4.c:648:25: note: ‘w’ was declared here
# 648 | unsigned int w, h;
# | ^
# 653|
# 654| if (mask & WidthValue)
# 655|-> Columns = w;
# 656| if (mask & HeightValue)
# 657| {
Error: COMPILER_WARNING (CWE-457):
vim92/src/gui_gtk4.c:658:28: warning[-Wmaybe-uninitialized]: ‘h’ may be used uninitialized
# 658 | if (p_window > (long)h - 1 || !option_was_set((char_u *)"window"))
# | ^~~~~~~
vim92/src/gui_gtk4.c:648:28: note: ‘h’ was declared here
# 648 | unsigned int w, h;
# | ^
# 656| if (mask & HeightValue)
# 657| {
# 658|-> if (p_window > (long)h - 1 || !option_was_set((char_u *)"window"))
# 659| p_window = h - 1;
# 660| Rows = h;
Error: COMPILER_WARNING (CWE-563):
vim92/src/gui_gtk4.c: scope_hint: At top level
vim92/src/gui_gtk4.c:781:12: warning[-Wunused-variable]: ‘in_set_shellsize’ defined but not used
# 781 | static int in_set_shellsize = FALSE;
# | ^~~~~~~~~~~~~~~~
# 779| }
# 780|
# 781|-> static int in_set_shellsize = FALSE;
# 782|
# 783| void
Error: COMPILER_WARNING (CWE-477):
vim92/src/gui_gtk4.c: scope_hint: In function ‘gui_mch_drawsign’
vim92/src/gui_gtk4.c:2410:13: warning[-Wdeprecated-declarations]: ‘gdk_cairo_set_source_pixbuf’ is deprecated
# 2410 | gdk_cairo_set_source_pixbuf(cr, scaled,
# | ^~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/gtk-4.0/gdk/gdk.h:30: included_from: Included from here.
/usr/include/gtk-4.0/gtk/svg/gtksvg.h:28: included_from: Included from here.
/usr/include/gtk-4.0/gtk/gtk.h:30: included_from: Included from here.
vim92/src/beval.h:15: included_from: Included from here.
vim92/src/vim.h:2057: included_from: Included from here.
vim92/src/gui_gtk4.c:24: included_from: Included from here.
/usr/include/gtk-4.0/gdk/gdkcairo.h:34:12: note: declared here
# 34 | void gdk_cairo_set_source_pixbuf (cairo_t *cr,
# | ^~~~~~~~~~~~~~~~~~~~~~~~~~~
# 2408| if (scaled != NULL)
# 2409| {
# 2410|-> gdk_cairo_set_source_pixbuf(cr, scaled,
# 2411| FILL_X(col), FILL_Y(row));
# 2412| g_object_unref(scaled);
Error: COMPILER_WARNING (CWE-477):
vim92/src/gui_gtk4.c:2410:13: warning[-Wdeprecated-declarations]: ‘gdk_cairo_set_source_pixbuf’ is deprecated
# 2408| if (scaled != NULL)
# 2409| {
# 2410|-> gdk_cairo_set_source_pixbuf(cr, scaled,
# 2411| FILL_X(col), FILL_Y(row));
# 2412| g_object_unref(scaled);
Error: COMPILER_WARNING (CWE-477):
vim92/src/gui_gtk4.c:2415:13: warning[-Wdeprecated-declarations]: ‘gdk_cairo_set_source_pixbuf’ is deprecated
# 2415 | gdk_cairo_set_source_pixbuf(cr, sign,
# | ^~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/gtk-4.0/gdk/gdkcairo.h:34:12: note: declared here
# 34 | void gdk_cairo_set_source_pixbuf (cairo_t *cr,
# | ^~~~~~~~~~~~~~~~~~~~~~~~~~~
# 2413| }
# 2414| else
# 2415|-> gdk_cairo_set_source_pixbuf(cr, sign,
# 2416| FILL_X(col), FILL_Y(row));
# 2417| }
Error: COMPILER_WARNING (CWE-477):
vim92/src/gui_gtk4.c:2415:13: warning[-Wdeprecated-declarations]: ‘gdk_cairo_set_source_pixbuf’ is deprecated
# 2413| }
# 2414| else
# 2415|-> gdk_cairo_set_source_pixbuf(cr, sign,
# 2416| FILL_X(col), FILL_Y(row));
# 2417| }
Error: COMPILER_WARNING (CWE-477):
vim92/src/gui_gtk4.c:2419:9: warning[-Wdeprecated-declarations]: ‘gdk_cairo_set_source_pixbuf’ is deprecated
# 2419 | gdk_cairo_set_source_pixbuf(cr, sign,
# | ^~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/gtk-4.0/gdk/gdkcairo.h:34:12: note: declared here
# 34 | void gdk_cairo_set_source_pixbuf (cairo_t *cr,
# | ^~~~~~~~~~~~~~~~~~~~~~~~~~~
# 2417| }
# 2418| else
# 2419|-> gdk_cairo_set_source_pixbuf(cr, sign,
# 2420| FILL_X(col), FILL_Y(row));
# 2421|
Error: COMPILER_WARNING (CWE-477):
vim92/src/gui_gtk4.c:2419:9: warning[-Wdeprecated-declarations]: ‘gdk_cairo_set_source_pixbuf’ is deprecated
# 2417| }
# 2418| else
# 2419|-> gdk_cairo_set_source_pixbuf(cr, sign,
# 2420| FILL_X(col), FILL_Y(row));
# 2421|
Error: COMPILER_WARNING (CWE-477):
vim92/src/gui_gtk4.c: scope_hint: In function ‘create_toolbar_icon’
vim92/src/gui_gtk4.c:3435:25: warning[-Wdeprecated-declarations]: ‘gdk_texture_new_for_pixbuf’ is deprecated
# 3435 | gdk_texture_new_for_pixbuf(pixbuf);
# | ^~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/gtk-4.0/gdk/gdkdmabuftexture.h:26: included_from: Included from here.
/usr/include/gtk-4.0/gdk/gdk.h:48: included_from: Included from here.
/usr/include/gtk-4.0/gdk/gdktexture.h:66:25: note: declared here
# 66 | GdkTexture * gdk_texture_new_for_pixbuf (GdkPixbuf *pixbuf);
# | ^~~~~~~~~~~~~~~~~~~~~~~~~~
# 3433| {
# 3434| GdkTexture *texture =
# 3435|-> gdk_texture_new_for_pixbuf(pixbuf);
# 3436| image = gtk_image_new_from_paintable(
# 3437| GDK_PAINTABLE(texture));
Error: COMPILER_WARNING (CWE-477):
vim92/src/gui_gtk4.c:3435:25: warning[-Wdeprecated-declarations]: ‘gdk_texture_new_for_pixbuf’ is deprecated
# 3433| {
# 3434| GdkTexture *texture =
# 3435|-> gdk_texture_new_for_pixbuf(pixbuf);
# 3436| image = gtk_image_new_from_paintable(
# 3437| GDK_PAINTABLE(texture));
Error: COMPILER_WARNING:
vim92/src/gui_gtk4.c: scope_hint: In function ‘print_draw_page_cb’
vim92/src/gui_gtk4.c:4443:21: warning[-Wunused-but-set-variable=]: variable ‘page_line’ set but not used
# 4443 | int page_line;
# | ^~~~~~~~~
# 4441| linenr_T first;
# 4442| linenr_T last;
# 4443|-> int page_line;
# 4444| double y;
# 4445|
Error: COMPILER_WARNING:
vim92/src/gui_gtk4_f.c: warning: -D_FORTIFY_SOURCE defined but value is too low
Error: COMPILER_WARNING (CWE-563):
vim92/src/gui_xim.c:193:22: warning[-Wunused-variable]: ‘im_activatekey_keyval’ defined but not used
# 193 | static unsigned int im_activatekey_keyval = GDK_KEY_VoidSymbol;
# | ^~~~~~~~~~~~~~~~~~~~~
# 191| static unsigned long im_commit_handler_id = 0;
# 192| # ifdef USE_GTK4
# 193|-> static unsigned int im_activatekey_keyval = GDK_KEY_VoidSymbol;
# 194| # else
# 195| static unsigned int im_activatekey_keyval = GDK_VoidSymbol;
Error: COMPILER_WARNING (CWE-563):
vim92/src/gui_xim.c:197:22: warning[-Wunused-variable]: ‘im_activatekey_state’ defined but not used
# 197 | static unsigned int im_activatekey_state = 0;
# | ^~~~~~~~~~~~~~~~~~~~
# 195| static unsigned int im_activatekey_keyval = GDK_VoidSymbol;
# 196| # endif
# 197|-> static unsigned int im_activatekey_state = 0;
# 198|
# 199| static GtkWidget *preedit_window = NULL;
Error: GCC_ANALYZER_WARNING (CWE-688):
vim92/src/main.c:2784:17: warning[-Wanalyzer-null-argument]: use of NULL ‘p’ where non-null expected
vim92/src/main.c:2111:12: branch_true: following ‘true’ branch (when ‘argc > 0’)...
vim92/src/main.c:2116:13: branch_true: ...to here
vim92/src/main.c:2777:16: branch_true: following ‘true’ branch...
vim92/src/main.c:2777:17: branch_true: following ‘true’ branch...
vim92/src/main.c:2783:44: branch_true: ...to here
vim92/src/main.c:2784:17: danger: argument 1 (‘p’) NULL where non-null expected
# 2782|
# 2783| tail = gettail(alist_name(&GARGLIST[0]));
# 2784|-> concat_fnames(p, STRLEN(p), tail, STRLEN(tail), TRUE, &ret);
# 2785| if (ret.string != NULL)
# 2786| {
Error: GCC_ANALYZER_WARNING (CWE-457):
vim92/src/os_unix.c:5048:21: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘fd_toshell[0]’
vim92/src/os_unix.c:4947:1: enter_function: entry to ‘mch_call_shell_fork’
vim92/src/os_unix.c:4977:9: call_function: calling ‘unix_build_argv’ from ‘mch_call_shell_fork’
vim92/src/os_unix.c:4977:9: return_function: returning to ‘mch_call_shell_fork’ from ‘unix_build_argv’
vim92/src/os_unix.c:4977:8: branch_false: following ‘false’ branch...
vim92/src/os_unix.c:4985:9: branch_false: ...to here
vim92/src/os_unix.c:5028:12: branch_true: following ‘true’ branch (when ‘pid == -1’)...
vim92/src/os_unix.c:5030:13: call_function: inlined call to ‘unblock_signals’ from ‘mch_call_shell_fork’
vim92/src/os_unix.c:5033:17: branch_true: following ‘true’ branch...
vim92/src/os_unix.c:5040:20: branch_false: following ‘false’ branch...
vim92/src/os_unix.c:5048:21: branch_false: ...to here
vim92/src/os_unix.c:5048:21: danger: use of uninitialized value ‘fd_toshell[0]’ here
# 5046| # endif
# 5047| {
# 5048|-> close(fd_toshell[0]);
# 5049| close(fd_toshell[1]);
# 5050| close(fd_fromshell[0]);
Error: GCC_ANALYZER_WARNING (CWE-775):
vim92/src/os_unix.c:5156:21: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘vim_ignored’
vim92/src/os_unix.c:4947:1: enter_function: entry to ‘mch_call_shell_fork’
vim92/src/os_unix.c:4977:9: call_function: calling ‘unix_build_argv’ from ‘mch_call_shell_fork’
vim92/src/os_unix.c:4977:9: return_function: returning to ‘mch_call_shell_fork’ from ‘unix_build_argv’
vim92/src/os_unix.c:4977:8: branch_false: following ‘false’ branch...
vim92/src/os_unix.c:4985:9: branch_false: ...to here
vim92/src/os_unix.c:5028:12: branch_false: following ‘false’ branch (when ‘pid != -1’)...
vim92/src/os_unix.c:5055:17: branch_false: ...to here
vim92/src/os_unix.c:5055:17: branch_true: following ‘true’ branch (when ‘pid == 0’)...
vim92/src/os_unix.c:5057:13: branch_true: ...to here
vim92/src/os_unix.c:5068:16: branch_false: following ‘false’ branch...
vim92/src/os_unix.c:5104:22: branch_true: following ‘true’ branch...
vim92/src/os_unix.c:5115:21: branch_true: ...to here
vim92/src/os_unix.c:5140:17: call_function: calling ‘set_default_child_environment’ from ‘mch_call_shell_fork’
vim92/src/os_unix.c:5140:17: return_function: returning to ‘mch_call_shell_fork’ from ‘set_default_child_environment’
vim92/src/os_unix.c:5148:20: branch_true: following ‘true’ branch...
vim92/src/os_unix.c:5150:21: branch_true: ...to here
vim92/src/os_unix.c:5154:35: acquire_resource: opened here
vim92/src/os_unix.c:5156:21: danger: ‘vim_ignored’ leaks here; was opened at [(31)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/30)
# 5154| vim_ignored = dup(pty_slave_fd);
# 5155| close(1);
# 5156|-> vim_ignored = dup(pty_slave_fd);
# 5157| if (gui.in_use)
# 5158| {
Error: GCC_ANALYZER_WARNING (CWE-775):
vim92/src/os_unix.c:5160:25: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘vim_ignored’
vim92/src/os_unix.c:4947:1: enter_function: entry to ‘mch_call_shell_fork’
vim92/src/os_unix.c:4977:9: call_function: calling ‘unix_build_argv’ from ‘mch_call_shell_fork’
vim92/src/os_unix.c:4977:9: return_function: returning to ‘mch_call_shell_fork’ from ‘unix_build_argv’
vim92/src/os_unix.c:4977:8: branch_false: following ‘false’ branch...
vim92/src/os_unix.c:4985:9: branch_false: ...to here
vim92/src/os_unix.c:5028:12: branch_false: following ‘false’ branch (when ‘pid != -1’)...
vim92/src/os_unix.c:5055:17: branch_false: ...to here
vim92/src/os_unix.c:5055:17: branch_true: following ‘true’ branch (when ‘pid == 0’)...
vim92/src/os_unix.c:5057:13: branch_true: ...to here
vim92/src/os_unix.c:5068:16: branch_false: following ‘false’ branch...
vim92/src/os_unix.c:5104:22: branch_true: following ‘true’ branch...
vim92/src/os_unix.c:5115:21: branch_true: ...to here
vim92/src/os_unix.c:5140:17: call_function: calling ‘set_default_child_environment’ from ‘mch_call_shell_fork’
vim92/src/os_unix.c:5140:17: return_function: returning to ‘mch_call_shell_fork’ from ‘set_default_child_environment’
vim92/src/os_unix.c:5148:20: branch_true: following ‘true’ branch...
vim92/src/os_unix.c:5150:21: branch_true: ...to here
vim92/src/os_unix.c:5156:35: acquire_resource: opened here
vim92/src/os_unix.c:5157:24: branch_true: following ‘true’ branch...
vim92/src/os_unix.c:5159:25: branch_true: ...to here
vim92/src/os_unix.c:5160:25: danger: ‘vim_ignored’ leaks here; was opened at [(31)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/30)
# 5158| {
# 5159| close(2);
# 5160|-> vim_ignored = dup(pty_slave_fd);
# 5161| }
# 5162|
Error: GCC_ANALYZER_WARNING (CWE-457):
vim92/src/os_unix.c:5169:21: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘fd_toshell[1]’
vim92/src/os_unix.c:5778:1: enter_function: entry to ‘mch_call_shell’
vim92/src/os_unix.c:5793:12: call_function: calling ‘mch_call_shell_fork’ from ‘mch_call_shell’
# 5167| {
# 5168| // set up stdin for the child
# 5169|-> close(fd_toshell[1]);
# 5170| close(0);
# 5171| vim_ignored = dup(fd_toshell[0]);
Error: GCC_ANALYZER_WARNING (CWE-775):
vim92/src/os_unix.c:5185:25: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘vim_ignored’
vim92/src/os_unix.c:4947:1: enter_function: entry to ‘mch_call_shell_fork’
vim92/src/os_unix.c:4977:9: call_function: calling ‘unix_build_argv’ from ‘mch_call_shell_fork’
vim92/src/os_unix.c:4977:9: return_function: returning to ‘mch_call_shell_fork’ from ‘unix_build_argv’
vim92/src/os_unix.c:4977:8: branch_false: following ‘false’ branch...
vim92/src/os_unix.c:4985:9: branch_false: ...to here
vim92/src/os_unix.c:5002:12: branch_true: following ‘true’ branch...
vim92/src/os_unix.c:5005:27: branch_true: ...to here
vim92/src/os_unix.c:5006:16: branch_true: following ‘true’ branch...
vim92/src/os_unix.c:5008:31: branch_true: ...to here
vim92/src/os_unix.c:5009:20: branch_false: following ‘false’ branch...
vim92/src/os_unix.c:5015:16: branch_false: ...to here
vim92/src/os_unix.c:5015:16: branch_false: following ‘false’ branch (when ‘pipe_error == 0’)...
vim92/src/os_unix.c:5026:9: branch_false: ...to here
vim92/src/os_unix.c:5028:12: branch_false: following ‘false’ branch (when ‘pid != -1’)...
vim92/src/os_unix.c:5055:17: branch_false: ...to here
vim92/src/os_unix.c:5055:17: branch_true: following ‘true’ branch (when ‘pid == 0’)...
vim92/src/os_unix.c:5057:13: branch_true: ...to here
vim92/src/os_unix.c:5068:16: branch_false: following ‘false’ branch...
vim92/src/os_unix.c:5140:17: call_function: calling ‘set_default_child_environment’ from ‘mch_call_shell_fork’
vim92/src/os_unix.c:5140:17: return_function: returning to ‘mch_call_shell_fork’ from ‘set_default_child_environment’
vim92/src/os_unix.c:5148:20: branch_false: following ‘false’ branch...
vim92/src/os_unix.c:5169:21: branch_false: ...to here
vim92/src/os_unix.c:5177:35: acquire_resource: opened here
vim92/src/os_unix.c:5181:24: branch_true: following ‘true’ branch...
vim92/src/os_unix.c:5184:25: branch_true: ...to here
vim92/src/os_unix.c:5185:25: danger: ‘vim_ignored’ leaks here; was opened at [(39)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/38)
# 5183| // set up stderr for the child
# 5184| close(2);
# 5185|-> vim_ignored = dup(1);
# 5186| }
# 5187| # endif
Error: GCC_ANALYZER_WARNING (CWE-910):
vim92/src/os_unix.c:5185:39: warning[-Wanalyzer-fd-use-after-close]: ‘dup’ on closed file descriptor ‘1’
vim92/src/os_unix.c:4947:1: enter_function: entry to ‘mch_call_shell_fork’
vim92/src/os_unix.c:4977:9: call_function: calling ‘unix_build_argv’ from ‘mch_call_shell_fork’
vim92/src/os_unix.c:4977:9: return_function: returning to ‘mch_call_shell_fork’ from ‘unix_build_argv’
vim92/src/os_unix.c:4977:8: branch_false: following ‘false’ branch...
vim92/src/os_unix.c:4985:9: branch_false: ...to here
vim92/src/os_unix.c:5002:12: branch_true: following ‘true’ branch...
vim92/src/os_unix.c:5005:27: branch_true: ...to here
vim92/src/os_unix.c:5006:16: branch_true: following ‘true’ branch...
vim92/src/os_unix.c:5008:31: branch_true: ...to here
vim92/src/os_unix.c:5009:20: branch_false: following ‘false’ branch...
vim92/src/os_unix.c:5015:16: branch_false: ...to here
vim92/src/os_unix.c:5015:16: branch_false: following ‘false’ branch (when ‘pipe_error == 0’)...
vim92/src/os_unix.c:5026:9: branch_false: ...to here
vim92/src/os_unix.c:5028:12: branch_false: following ‘false’ branch (when ‘pid != -1’)...
vim92/src/os_unix.c:5055:17: branch_false: ...to here
vim92/src/os_unix.c:5055:17: branch_true: following ‘true’ branch (when ‘pid == 0’)...
vim92/src/os_unix.c:5057:13: branch_true: ...to here
vim92/src/os_unix.c:5068:16: branch_false: following ‘false’ branch...
vim92/src/os_unix.c:5140:17: call_function: calling ‘set_default_child_environment’ from ‘mch_call_shell_fork’
vim92/src/os_unix.c:5140:17: return_function: returning to ‘mch_call_shell_fork’ from ‘set_default_child_environment’
vim92/src/os_unix.c:5148:20: branch_false: following ‘false’ branch...
vim92/src/os_unix.c:5169:21: branch_false: ...to here
vim92/src/os_unix.c:5176:21: release_resource: closed here
vim92/src/os_unix.c:5181:24: branch_true: following ‘true’ branch...
vim92/src/os_unix.c:5184:25: branch_true: ...to here
vim92/src/os_unix.c:5185:39: danger: ‘dup’ on closed file descriptor ‘1’; ‘close’ was at [(39)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/38)
# 5183| // set up stderr for the child
# 5184| close(2);
# 5185|-> vim_ignored = dup(1);
# 5186| }
# 5187| # endif
Error: GCC_ANALYZER_WARNING (CWE-457):
vim92/src/os_unix.c:5250:21: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘fd_toshell[0]’
vim92/src/os_unix.c:4947:1: enter_function: entry to ‘mch_call_shell_fork’
vim92/src/os_unix.c:4977:9: call_function: calling ‘unix_build_argv’ from ‘mch_call_shell_fork’
vim92/src/os_unix.c:4977:9: return_function: returning to ‘mch_call_shell_fork’ from ‘unix_build_argv’
vim92/src/os_unix.c:4977:8: branch_false: following ‘false’ branch...
vim92/src/os_unix.c:4985:9: branch_false: ...to here
vim92/src/os_unix.c:5028:12: branch_false: following ‘false’ branch (when ‘pid != -1’)...
vim92/src/os_unix.c:5055:17: branch_false: ...to here
vim92/src/os_unix.c:5055:17: branch_false: following ‘false’ branch (when ‘pid != 0’)...
vim92/src/os_unix.c:5207:13: branch_false: ...to here
vim92/src/os_unix.c:5218:17: branch_true: following ‘true’ branch...
vim92/src/os_unix.c:5242:20: branch_false: following ‘false’ branch...
vim92/src/os_unix.c:5250:21: branch_false: ...to here
vim92/src/os_unix.c:5250:21: danger: use of uninitialized value ‘fd_toshell[0]’ here
# 5248| # endif
# 5249| {
# 5250|-> close(fd_toshell[0]);
# 5251| close(fd_fromshell[1]);
# 5252| toshell_fd = fd_toshell[1];
Error: GCC_ANALYZER_WARNING (CWE-775):
vim92/src/os_unix.c:5883:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘vim_ignored’
vim92/src/os_unix.c:5808:1: enter_function: entry to ‘mch_get_cmd_output_direct’
vim92/src/os_unix.c:5825:8: branch_false: following ‘false’ branch...
vim92/src/os_unix.c:5831:5: branch_false: ...to here
vim92/src/os_unix.c:5837:8: branch_false: following ‘false’ branch (when ‘pid != -1’)...
vim92/src/os_unix.c:5846:8: branch_false: ...to here
vim92/src/os_unix.c:5846:8: branch_true: following ‘true’ branch (when ‘pid == 0’)...
vim92/src/os_unix.c:5849:9: branch_true: ...to here
vim92/src/os_unix.c:5859:12: branch_true: following ‘true’ branch (when ‘infile’ is non-NULL)...
vim92/src/os_unix.c:5861:25: call_function: inlined call to ‘open’ from ‘mch_get_cmd_output_direct’
vim92/src/os_unix.c:5862:16: branch_true: following ‘true’ branch...
vim92/src/os_unix.c:5864:17: branch_true: ...to here
vim92/src/os_unix.c:5865:31: acquire_resource: opened here
vim92/src/os_unix.c:5883:9: danger: ‘vim_ignored’ leaks here; was opened at [(14)](sarif:/runs/0/results/16/codeFlows/0/threadFlows/0/locations/13)
# 5881| close(fd_out[0]);
# 5882| close(1);
# 5883|-> vim_ignored = dup(fd_out[1]);
# 5884| // Also redirect stderr to the pipe.
# 5885| close(2);
Error: GCC_ANALYZER_WARNING (CWE-775):
vim92/src/os_unix.c:5886:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘vim_ignored’
vim92/src/os_unix.c:5825:8: branch_false: following ‘false’ branch...
vim92/src/os_unix.c:5831:5: branch_false: ...to here
vim92/src/os_unix.c:5837:8: branch_false: following ‘false’ branch (when ‘pid != -1’)...
vim92/src/os_unix.c:5846:8: branch_false: ...to here
vim92/src/os_unix.c:5846:8: branch_true: following ‘true’ branch (when ‘pid == 0’)...
vim92/src/os_unix.c:5849:9: branch_true: ...to here
vim92/src/os_unix.c:5862:16: branch_false: following ‘false’ branch...
vim92/src/os_unix.c:5881:9: branch_false: ...to here
vim92/src/os_unix.c:5883:23: acquire_resource: opened here
vim92/src/os_unix.c:5886:9: danger: ‘vim_ignored’ leaks here; was opened at [(10)](sarif:/runs/0/results/17/codeFlows/0/threadFlows/0/locations/9)
# 5884| // Also redirect stderr to the pipe.
# 5885| close(2);
# 5886|-> vim_ignored = dup(fd_out[1]);
# 5887| close(fd_out[1]);
# 5888|
Error: GCC_ANALYZER_WARNING (CWE-775):
vim92/src/os_unix.c:6164:13: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘vim_ignored’
vim92/src/os_unix.c:5970:8: branch_false: following ‘false’ branch...
vim92/src/os_unix.c:5974:5: branch_false: ...to here
vim92/src/os_unix.c:5990:12: branch_false: following ‘false’ branch...
vim92/src/os_unix.c:6003:8: branch_false: ...to here
vim92/src/os_unix.c:6037:12: branch_true: following ‘true’ branch...
vim92/src/os_unix.c:6039:13: branch_true: ...to here
vim92/src/os_unix.c:6040:16: branch_true: following ‘true’ branch (when ‘channel’ is non-NULL)...
vim92/src/os_unix.c:6041:19: branch_true: ...to here
vim92/src/os_unix.c:6054:8: branch_false: following ‘false’ branch (when ‘pid != -1’)...
vim92/src/os_unix.c:6060:8: branch_false: ...to here
vim92/src/os_unix.c:6060:8: branch_true: following ‘true’ branch (when ‘pid == 0’)...
vim92/src/os_unix.c:6066:9: branch_true: ...to here
vim92/src/os_unix.c:6133:16: branch_false: following ‘false’ branch...
vim92/src/os_unix.c:6140:13: branch_false: ...to here
vim92/src/os_unix.c:6153:12: branch_false: following ‘false’ branch...
vim92/src/os_unix.c:6155:18: branch_false: ...to here
vim92/src/os_unix.c:6155:17: branch_true: following ‘true’ branch...
vim92/src/os_unix.c:6156:27: branch_true: ...to here
vim92/src/os_unix.c:6156:27: acquire_resource: opened here
vim92/src/os_unix.c:6162:12: branch_true: following ‘true’ branch...
vim92/src/os_unix.c:6164:27: branch_true: ...to here
vim92/src/os_unix.c:6164:13: danger: ‘vim_ignored’ leaks here; was opened at [(19)](sarif:/runs/0/results/18/codeFlows/0/threadFlows/0/locations/18)
# 6162| if (use_null_for_err && null_fd >= 0)
# 6163| {
# 6164|-> vim_ignored = dup(null_fd);
# 6165| stderr_works = FALSE;
# 6166| }
Error: GCC_ANALYZER_WARNING (CWE-775):
vim92/src/os_unix.c:6168:13: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘vim_ignored’
vim92/src/os_unix.c:5970:8: branch_false: following ‘false’ branch...
vim92/src/os_unix.c:5974:5: branch_false: ...to here
vim92/src/os_unix.c:6014:13: branch_false: following ‘false’ branch...
vim92/src/os_unix.c:6017:8: branch_false: ...to here
vim92/src/os_unix.c:6030:13: branch_false: following ‘false’ branch...
vim92/src/os_unix.c:6035:9: branch_false: ...to here
vim92/src/os_unix.c:6035:8: branch_false: following ‘false’ branch...
vim92/src/os_unix.c:6035:9: branch_false: ...to here
vim92/src/os_unix.c:6035:9: branch_true: following ‘true’ branch (when ‘use_null_for_err == 0’)...
vim92/src/os_unix.c:6037:13: branch_true: ...to here
vim92/src/os_unix.c:6037:12: branch_true: following ‘true’ branch...
vim92/src/os_unix.c:6039:13: branch_true: ...to here
vim92/src/os_unix.c:6040:16: branch_true: following ‘true’ branch (when ‘channel’ is non-NULL)...
vim92/src/os_unix.c:6041:19: branch_true: ...to here
vim92/src/os_unix.c:6054:8: branch_false: following ‘false’ branch (when ‘pid != -1’)...
vim92/src/os_unix.c:6060:8: branch_false: ...to here
vim92/src/os_unix.c:6060:8: branch_true: following ‘true’ branch (when ‘pid == 0’)...
vim92/src/os_unix.c:6066:9: branch_true: ...to here
vim92/src/os_unix.c:6133:16: branch_false: following ‘false’ branch...
vim92/src/os_unix.c:6140:13: branch_false: ...to here
vim92/src/os_unix.c:6153:12: branch_true: following ‘true’ branch...
vim92/src/os_unix.c:6154:27: branch_true: ...to here
vim92/src/os_unix.c:6154:27: acquire_resource: opened here
vim92/src/os_unix.c:6162:12: branch_false: following ‘false’ branch...
vim92/src/os_unix.c:6167:17: branch_false: ...to here
vim92/src/os_unix.c:6167:17: branch_true: following ‘true’ branch...
vim92/src/os_unix.c:6168:27: branch_true: ...to here
vim92/src/os_unix.c:6168:13: danger: ‘vim_ignored’ leaks here; was opened at [(23)](sarif:/runs/0/results/19/codeFlows/0/threadFlows/0/locations/22)
# 6166| }
# 6167| else if (use_out_for_err)
# 6168|-> vim_ignored = dup(fd_out[1]);
# 6169| else if (fd_err[1] < 0)
# 6170| vim_ignored = dup(pty_slave_fd);
Error: GCC_ANALYZER_WARNING (CWE-775):
vim92/src/os_unix.c:6170:13: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘vim_ignored’
vim92/src/os_unix.c:5970:8: branch_false: following ‘false’ branch...
vim92/src/os_unix.c:5974:5: branch_false: ...to here
vim92/src/os_unix.c:6014:13: branch_false: following ‘false’ branch...
vim92/src/os_unix.c:6017:8: branch_false: ...to here
vim92/src/os_unix.c:6030:13: branch_false: following ‘false’ branch...
vim92/src/os_unix.c:6035:9: branch_false: ...to here
vim92/src/os_unix.c:6035:8: branch_false: following ‘false’ branch...
vim92/src/os_unix.c:6035:9: branch_false: ...to here
vim92/src/os_unix.c:6035:9: branch_true: following ‘true’ branch (when ‘use_null_for_err == 0’)...
vim92/src/os_unix.c:6037:13: branch_true: ...to here
vim92/src/os_unix.c:6037:12: branch_true: following ‘true’ branch...
vim92/src/os_unix.c:6039:13: branch_true: ...to here
vim92/src/os_unix.c:6040:16: branch_true: following ‘true’ branch (when ‘channel’ is non-NULL)...
vim92/src/os_unix.c:6041:19: branch_true: ...to here
vim92/src/os_unix.c:6054:8: branch_false: following ‘false’ branch (when ‘pid != -1’)...
vim92/src/os_unix.c:6060:8: branch_false: ...to here
vim92/src/os_unix.c:6060:8: branch_true: following ‘true’ branch (when ‘pid == 0’)...
vim92/src/os_unix.c:6066:9: branch_true: ...to here
vim92/src/os_unix.c:6133:16: branch_false: following ‘false’ branch...
vim92/src/os_unix.c:6140:13: branch_false: ...to here
vim92/src/os_unix.c:6153:12: branch_true: following ‘true’ branch...
vim92/src/os_unix.c:6154:27: branch_true: ...to here
vim92/src/os_unix.c:6154:27: acquire_resource: opened here
vim92/src/os_unix.c:6162:12: branch_false: following ‘false’ branch...
vim92/src/os_unix.c:6167:17: branch_false: ...to here
vim92/src/os_unix.c:6167:17: branch_false: following ‘false’ branch...
vim92/src/os_unix.c:6169:18: branch_false: ...to here
vim92/src/os_unix.c:6169:17: branch_true: following ‘true’ branch...
vim92/src/os_unix.c:6170:27: branch_true: ...to here
vim92/src/os_unix.c:6170:13: danger: ‘vim_ignored’ leaks here; was opened at [(23)](sarif:/runs/0/results/20/codeFlows/0/threadFlows/0/locations/22)
# 6168| vim_ignored = dup(fd_out[1]);
# 6169| else if (fd_err[1] < 0)
# 6170|-> vim_ignored = dup(pty_slave_fd);
# 6171| else
# 6172| vim_ignored = dup(fd_err[1]);
Error: GCC_ANALYZER_WARNING (CWE-775):
vim92/src/os_unix.c:6172:13: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘vim_ignored’
vim92/src/os_unix.c:5970:8: branch_false: following ‘false’ branch...
vim92/src/os_unix.c:5974:5: branch_false: ...to here
vim92/src/os_unix.c:6014:13: branch_false: following ‘false’ branch...
vim92/src/os_unix.c:6017:8: branch_false: ...to here
vim92/src/os_unix.c:6030:13: branch_false: following ‘false’ branch...
vim92/src/os_unix.c:6035:9: branch_false: ...to here
vim92/src/os_unix.c:6035:8: branch_false: following ‘false’ branch...
vim92/src/os_unix.c:6035:9: branch_false: ...to here
vim92/src/os_unix.c:6035:9: branch_true: following ‘true’ branch (when ‘use_null_for_err == 0’)...
vim92/src/os_unix.c:6037:13: branch_true: ...to here
vim92/src/os_unix.c:6037:12: branch_true: following ‘true’ branch...
vim92/src/os_unix.c:6039:13: branch_true: ...to here
vim92/src/os_unix.c:6040:16: branch_true: following ‘true’ branch (when ‘channel’ is non-NULL)...
vim92/src/os_unix.c:6041:19: branch_true: ...to here
vim92/src/os_unix.c:6054:8: branch_false: following ‘false’ branch (when ‘pid != -1’)...
vim92/src/os_unix.c:6060:8: branch_false: ...to here
vim92/src/os_unix.c:6060:8: branch_true: following ‘true’ branch (when ‘pid == 0’)...
vim92/src/os_unix.c:6066:9: branch_true: ...to here
vim92/src/os_unix.c:6133:16: branch_false: following ‘false’ branch...
vim92/src/os_unix.c:6140:13: branch_false: ...to here
vim92/src/os_unix.c:6153:12: branch_true: following ‘true’ branch...
vim92/src/os_unix.c:6154:27: branch_true: ...to here
vim92/src/os_unix.c:6154:27: acquire_resource: opened here
vim92/src/os_unix.c:6162:12: branch_false: following ‘false’ branch...
vim92/src/os_unix.c:6167:17: branch_false: ...to here
vim92/src/os_unix.c:6167:17: branch_false: following ‘false’ branch...
vim92/src/os_unix.c:6169:18: branch_false: ...to here
vim92/src/os_unix.c:6169:17: branch_false: following ‘false’ branch...
vim92/src/os_unix.c:6172:27: branch_false: ...to here
vim92/src/os_unix.c:6172:13: danger: ‘vim_ignored’ leaks here; was opened at [(23)](sarif:/runs/0/results/21/codeFlows/0/threadFlows/0/locations/22)
# 6170| vim_ignored = dup(pty_slave_fd);
# 6171| else
# 6172|-> vim_ignored = dup(fd_err[1]);
# 6173|
# 6174| // set up stdout for the child
Error: GCC_ANALYZER_WARNING (CWE-775):
vim92/src/os_unix.c:6177:13: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘vim_ignored’
vim92/src/os_unix.c:5970:8: branch_false: following ‘false’ branch...
vim92/src/os_unix.c:5974:5: branch_false: ...to here
vim92/src/os_unix.c:6014:13: branch_false: following ‘false’ branch...
vim92/src/os_unix.c:6017:8: branch_false: ...to here
vim92/src/os_unix.c:6030:13: branch_false: following ‘false’ branch...
vim92/src/os_unix.c:6035:9: branch_false: ...to here
vim92/src/os_unix.c:6035:8: branch_false: following ‘false’ branch...
vim92/src/os_unix.c:6035:9: branch_false: ...to here
vim92/src/os_unix.c:6035:9: branch_true: following ‘true’ branch (when ‘use_null_for_err == 0’)...
vim92/src/os_unix.c:6037:13: branch_true: ...to here
vim92/src/os_unix.c:6037:12: branch_true: following ‘true’ branch...
vim92/src/os_unix.c:6039:13: branch_true: ...to here
vim92/src/os_unix.c:6040:16: branch_true: following ‘true’ branch (when ‘channel’ is non-NULL)...
vim92/src/os_unix.c:6041:19: branch_true: ...to here
vim92/src/os_unix.c:6054:8: branch_false: following ‘false’ branch (when ‘pid != -1’)...
vim92/src/os_unix.c:6060:8: branch_false: ...to here
vim92/src/os_unix.c:6060:8: branch_true: following ‘true’ branch (when ‘pid == 0’)...
vim92/src/os_unix.c:6066:9: branch_true: ...to here
vim92/src/os_unix.c:6133:16: branch_false: following ‘false’ branch...
vim92/src/os_unix.c:6140:13: branch_false: ...to here
vim92/src/os_unix.c:6162:12: branch_false: following ‘false’ branch...
vim92/src/os_unix.c:6167:17: branch_false: ...to here
vim92/src/os_unix.c:6167:17: branch_true: following ‘true’ branch...
vim92/src/os_unix.c:6168:27: branch_true: ...to here
vim92/src/os_unix.c:6168:27: acquire_resource: opened here
vim92/src/os_unix.c:6176:12: branch_true: following ‘true’ branch...
vim92/src/os_unix.c:6177:27: branch_true: ...to here
vim92/src/os_unix.c:6177:13: danger: ‘vim_ignored’ leaks here; was opened at [(25)](sarif:/runs/0/results/22/codeFlows/0/threadFlows/0/locations/24)
# 6175| close(1);
# 6176| if (use_null_for_out && null_fd >= 0)
# 6177|-> vim_ignored = dup(null_fd);
# 6178| else if (fd_out[1] < 0)
# 6179| vim_ignored = dup(pty_slave_fd);
Error: GCC_ANALYZER_WARNING (CWE-775):
vim92/src/os_unix.c:6293:1: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd_in[0]’
vim92/src/os_unix.c:5970:8: branch_false: following ‘false’ branch...
vim92/src/os_unix.c:5974:5: branch_false: ...to here
vim92/src/os_unix.c:5985:8: branch_false: following ‘false’ branch...
vim92/src/os_unix.c:5999:12: branch_false: ...to here
vim92/src/os_unix.c:5999:12: branch_true: following ‘true’ branch...
vim92/src/os_unix.c:5999:13: branch_false: following ‘false’ branch...
vim92/src/os_unix.c:6003:8: branch_false: ...to here
vim92/src/os_unix.c:6277:8: branch_false: following ‘false’ branch...
vim92/src/os_unix.c:6279:9: branch_false: ...to here
vim92/src/os_unix.c:6279:8: branch_false: following ‘false’ branch...
vim92/src/os_unix.c:6281:9: branch_false: ...to here
vim92/src/os_unix.c:6281:8: branch_false: following ‘false’ branch...
vim92/src/os_unix.c:6283:9: branch_false: ...to here
vim92/src/os_unix.c:6285:8: branch_false: following ‘false’ branch...
vim92/src/os_unix.c:6287:9: branch_false: ...to here
vim92/src/os_unix.c:6289:8: branch_false: following ‘false’ branch...
vim92/src/os_unix.c:6291:9: branch_false: ...to here
vim92/src/os_unix.c:6291:8: branch_false: following ‘false’ branch...
vim92/src/os_unix.c:6293:1: branch_false: ...to here
vim92/src/os_unix.c:6293:1: danger: ‘fd_in[0]’ leaks here
# 6291| if (pty_slave_fd >= 0)
# 6292| close(pty_slave_fd);
# 6293|-> }
# 6294|
# 6295| static char_u *
Error: GCC_ANALYZER_WARNING (CWE-775):
vim92/src/os_unix.c:6293:1: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd_in[1]’
vim92/src/os_unix.c:5970:8: branch_false: following ‘false’ branch...
vim92/src/os_unix.c:5974:5: branch_false: ...to here
vim92/src/os_unix.c:5985:8: branch_false: following ‘false’ branch...
vim92/src/os_unix.c:5999:12: branch_false: ...to here
vim92/src/os_unix.c:5999:12: branch_true: following ‘true’ branch...
vim92/src/os_unix.c:5999:13: branch_false: following ‘false’ branch...
vim92/src/os_unix.c:6003:8: branch_false: ...to here
vim92/src/os_unix.c:6277:8: branch_false: following ‘false’ branch...
vim92/src/os_unix.c:6279:9: branch_false: ...to here
vim92/src/os_unix.c:6279:8: branch_false: following ‘false’ branch...
vim92/src/os_unix.c:6281:9: branch_false: ...to here
vim92/src/os_unix.c:6281:8: branch_false: following ‘false’ branch...
vim92/src/os_unix.c:6283:9: branch_false: ...to here
vim92/src/os_unix.c:6285:8: branch_false: following ‘false’ branch...
vim92/src/os_unix.c:6287:9: branch_false: ...to here
vim92/src/os_unix.c:6289:8: branch_false: following ‘false’ branch...
vim92/src/os_unix.c:6291:9: branch_false: ...to here
vim92/src/os_unix.c:6291:8: branch_false: following ‘false’ branch...
vim92/src/os_unix.c:6293:1: branch_false: ...to here
vim92/src/os_unix.c:6293:1: danger: ‘fd_in[1]’ leaks here
# 6291| if (pty_slave_fd >= 0)
# 6292| close(pty_slave_fd);
# 6293|-> }
# 6294|
# 6295| static char_u *
Error: COMPILER_WARNING:
vim92/src/socketserver.c: warning: -D_FORTIFY_SOURCE defined but value is too low
Error: CPPCHECK_WARNING (CWE-457):
vim92/src/socketserver.c:1031: warning[uninitvar]: Uninitialized variable: port
# 1029| channel = channel_open_unix((char *)address, NULL);
# 1030| else
# 1031|-> channel = channel_open("localhost", port, 1000, NULL);
# 1032|
# 1033| if (channel == NULL && !quiet)
Error: GCC_ANALYZER_WARNING (CWE-457):
vim92/src/textprop.c:3078:25: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘props’
vim92/src/textprop.c:3056:1: enter_function: entry to ‘adjust_props_for_split’
vim92/src/textprop.c:3069:8: branch_true: following ‘true’ branch...
vim92/src/textprop.c:3073:13: branch_true: ...to here
vim92/src/textprop.c:3073:13: call_function: calling ‘get_text_props’ from ‘adjust_props_for_split’
vim92/src/textprop.c:3073:13: return_function: returning to ‘adjust_props_for_split’ from ‘get_text_props’
vim92/src/textprop.c:3078:25: danger: use of uninitialized value ‘props’ here
# 3076|
# 3077| // count_ptr points to the prop_count field in the memline.
# 3078|-> char_u *count_ptr = props - PROP_COUNT_SIZE;
# 3079|
# 3080| // Keep the relevant ones in the first line, reducing the length if needed.