comparison src/structs.h @ 33613:31fb1a760ad6 v9.0.2050

patch 9.0.2050: Vim9: crash with deferred function call and exception Commit: https://github.com/vim/vim/commit/c59c1e0d88651a71ece7366e418f1253abbe2a28 Author: Yegappan Lakshmanan <yegappan@yahoo.com> Date: Thu Oct 19 10:52:34 2023 +0200 patch 9.0.2050: Vim9: crash with deferred function call and exception 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: #13376 closes: #13377 Signed-off-by: Christian Brabandt <cb@256bit.org> Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
author Christian Brabandt <cb@256bit.org>
date Thu, 19 Oct 2023 11:00:07 +0200
parents 46d449fd4fe4
children 53416c49a7ab
comparison
equal deleted inserted replaced
33612:0dd1e3a17f68 33613:31fb1a760ad6
1084 typedef struct cleanup_stuff cleanup_T; 1084 typedef struct cleanup_stuff cleanup_T;
1085 struct cleanup_stuff 1085 struct cleanup_stuff
1086 { 1086 {
1087 int pending; // error/interrupt/exception state 1087 int pending; // error/interrupt/exception state
1088 except_T *exception; // exception value 1088 except_T *exception; // exception value
1089 };
1090
1091 /*
1092 * Exception state that is saved and restored when calling timer callback
1093 * functions and deferred functions.
1094 */
1095 typedef struct exception_state_S exception_state_T;
1096 struct exception_state_S
1097 {
1098 except_T *estate_current_exception;
1099 int estate_did_throw;
1100 int estate_need_rethrow;
1101 int estate_trylevel;
1089 }; 1102 };
1090 1103
1091 #ifdef FEAT_SYN_HL 1104 #ifdef FEAT_SYN_HL
1092 // struct passed to in_id_list() 1105 // struct passed to in_id_list()
1093 struct sp_syn 1106 struct sp_syn