mirror of
https://github.com/neovim/neovim.git
synced 2025-09-27 21:48:35 +00:00
vim-patch:9.0.2050: Vim9: crash with deferred function call and exception (#25715)
Problem: Vim9: crash with deferred function call and exception
Solution: Save and restore exception state
Crash when a deferred function is called after an exception and another
exception is thrown
closes: vim/vim#13376
closes: vim/vim#13377
c59c1e0d88
The change in check_due_timer() is N/A as Nvim calls timer callbacks on
the main loop.
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
This commit is contained in:
@@ -118,4 +118,14 @@ struct cleanup_stuff {
|
||||
except_T *exception; ///< exception value
|
||||
};
|
||||
|
||||
/// Exception state that is saved and restored when calling timer callback
|
||||
/// functions and deferred functions.
|
||||
typedef struct exception_state_S exception_state_T;
|
||||
struct exception_state_S {
|
||||
except_T *estate_current_exception;
|
||||
bool estate_did_throw;
|
||||
bool estate_need_rethrow;
|
||||
int estate_trylevel;
|
||||
};
|
||||
|
||||
#endif // NVIM_EX_EVAL_DEFS_H
|
||||
|
Reference in New Issue
Block a user