[vim/vim] GTK4: fix crash in gui_mch_menu_hidden (PR #20523)

0 views
Skip to first unread message

mattn

unread,
8:19 AM (4 hours ago) 8:19 AM
to vim/vim, Subscribed

GTK4 menu items use the (GtkWidget *)1 sentinel as their id, but gui_mch_menu_hidden() only skipped NULL ids and passed the sentinel to gtk_widget_get_visible(), causing a crash (vim -gf). Skip the sentinel like gui_mch_menu_grey() does.


You can view, comment on, or merge this pull request online at:

  https://github.com/vim/vim/pull/20523

Commit Summary

  • 764fc1e GTK4: fix crash in gui_mch_menu_hidden

File Changes

(1 file)

Patch Links:


Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/20523@github.com>

mattn

unread,
8:23 AM (4 hours ago) 8:23 AM
to vim/vim, Subscribed
mattn left a comment (vim/vim#20523)

For reference, the crash only happens when guioptions does not contain g (GO_GREY). With the default guioptions ("aegimrLtT"), gui_update_menus_recurse() takes the gui_mch_menu_grey() path, which already skips the (GtkWidget *)1 sentinel, so a plain vim -gf does not crash. Once g is removed (e.g. set guioptions=!C), the gui_mch_menu_hidden() path is taken on the next menu mode update and passes the sentinel to gtk_widget_get_visible(), causing the SEGV. The bug has existed since the GTK4 UI was introduced in 9.2.0501.


Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/20523/c4701731227@github.com>

Christian Brabandt

unread,
10:38 AM (2 hours ago) 10:38 AM
to vim/vim, Subscribed
chrisbra left a comment (vim/vim#20523)

thanks


Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/20523/c4702062074@github.com>

Reply all
Reply to author
Forward
0 new messages