Skip to content

Fix #10386 #15267

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 3 commits into from
Closed

Fix #10386 #15267

wants to merge 3 commits into from

Conversation

vigoux
Copy link
Member

@vigoux vigoux commented Aug 4, 2021

Fixes #10386, using vim-patches and help from this commit from @bkropoff.

Include a few vim patches:

  • vim-patch:8.1.0342: crash when a callback deletes a window that is being used
  • vim-patch:8.0.1732: crash when terminal API call deletes the buffer

@github-actions github-actions bot added the terminal built-in :terminal or :shell label Aug 4, 2021
@vigoux vigoux force-pushed the vim-8.1.0342 branch 2 times, most recently from 5204af7 to 16649d5 Compare August 4, 2021 10:10
@seandewar seandewar added the vim-patch See https://neovim.io/doc/user/dev_vimpatch.html label Aug 4, 2021
@dundargoc dundargoc added vim-patch See https://neovim.io/doc/user/dev_vimpatch.html and removed vim-patch See https://neovim.io/doc/user/dev_vimpatch.html labels Apr 7, 2022
@github-actions github-actions bot requested review from seandewar and zeertzjq April 7, 2022 08:55
@justinmk
Copy link
Member

Rebase? Also needs a test; simple repro steps given in #10386

@justinmk justinmk added this to the 0.7.2 milestone Jun 26, 2022
@vigoux
Copy link
Member Author

vigoux commented Jun 28, 2022

Should be all good, but for some reason it seems that the test always succeeds.

vigoux and others added 3 commits June 28, 2022 21:07
…ing used

Problem:    Crash when a callback deletes a window that is being used.
Solution:   Do not unload a buffer that is being displayed while redrawing the
            screen. Also avoid invoking callbacks while redrawing.
            (closes vim/vim#2107)
vim/vim@94f0195

Co-authored-by: Brian Koropoff <@bkoropoff>
Problem:    Crash when terminal API call deletes the buffer.
Solution:   Lock the buffer while calling a function. (closes vim/vim#2813)
vim/vim@a997b45
@zeertzjq
Copy link
Member

The test changes from patch 8.0.1732 are needed for oldtests to pass.

@vigoux
Copy link
Member Author

vigoux commented Jun 29, 2022

Will add them then

dict_T *dict = get_v_event(&save_v_event);
tv_dict_add_nr(dict, S_LEN("status"), status);
tv_dict_set_keys_readonly(dict);
aucmd_prepbuf(&aco, buf);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The buf->b_locked++ guard from #19222 fixes #10386 except for the edge case where altbuf is the first default empty buffer. I think the remaining work needed is to figure out why do_buffer calls set_curbuf with the wrong arg.

So I don't think we need/want the aucmd_prepbuf dance here.

@justinmk
Copy link
Member

justinmk commented Jul 5, 2022

Continued in #19233

@justinmk justinmk closed this Jul 5, 2022
@github-actions github-actions bot removed request for seandewar and zeertzjq July 5, 2022 12:42
@zeertzjq zeertzjq modified the milestones: 0.7.3, 0.8 Sep 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
terminal built-in :terminal or :shell vim-patch See https://neovim.io/doc/user/dev_vimpatch.html
Projects
None yet
Development

Successfully merging this pull request may close these issues.

TermClose autocmd can free curbuf
5 participants