diff src/globals.h @ 26284:ae947ebb4038 v8.2.3673

patch 8.2.3673: crash when allocating signal stack fails Commit: https://github.com/vim/vim/commit/0bd8d0563853ab821a018fb9cdd85f674684fe57 Author: Bram Moolenaar <Bram@vim.org> Date: Thu Nov 25 13:39:28 2021 +0000 patch 8.2.3673: crash when allocating signal stack fails Problem: Crash when allocating signal stack fails. Solution: Only using sourcing info when available. (closes https://github.com/vim/vim/issues/9215)
author Bram Moolenaar <Bram@vim.org>
date Thu, 25 Nov 2021 14:45:03 +0100
parents fa8161b003f6
children a2e6da79274d
line wrap: on
line diff
--- a/src/globals.h
+++ b/src/globals.h
@@ -288,6 +288,7 @@ EXTERN int	msg_no_more INIT(= FALSE);  /
  * Current context is at ga_len - 1.
  */
 EXTERN garray_T	exestack INIT5(0, 0, sizeof(estack_T), 50, NULL);
+#define HAVE_SOURCING_INFO  (exestack.ga_data != NULL && exestack.ga_len > 0)
 // name of error message source
 #define SOURCING_NAME (((estack_T *)exestack.ga_data)[exestack.ga_len - 1].es_name)
 // line number in the message source or zero