Problem: Crash when allocating signal stack fails.
Solution: Only using sourcing info when available. (closes #9215)
* 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
static int
other_sourcing_name(void)
{
- if (SOURCING_NAME != NULL)
+ if (HAVE_SOURCING_INFO && SOURCING_NAME != NULL)
{
if (last_sourcing_name != NULL)
return STRCMP(SOURCING_NAME, last_sourcing_name) != 0;
{
char_u *Buf, *p;
- if (SOURCING_NAME != NULL && other_sourcing_name())
+ if (HAVE_SOURCING_INFO && SOURCING_NAME != NULL && other_sourcing_name())
{
char_u *sname = estack_sfile(ESTACK_NONE);
char_u *tofree = sname;
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 3673,
/**/
3672,
/**/