Problem: A BufAdd autocommand may cause alist_add() to use freed
memory, this is caused by the w_locked variable unset too
early.
Solution: in trigger_undo_ftplugin() only set w_locked to false, if it
was false when calling the function.
https://github.com/vim/vim/pull/19023
(2 files)
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
Perhaps w_locked = TRUE and w_locked = FALSE should be changed (everywhere) to w_locked++ and w_locked--? I think that's less code than saving and restoring the value.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
I tried that, but it caused undefined behaviour and I was not able to track it down, if this was caused by in-balanced counter.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()