aboutsummaryrefslogtreecommitdiffstats
path: root/main.c
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2019-04-21 15:04:14 +0300
committerArnold D. Robbins <arnold@skeeve.com>2019-04-21 15:04:14 +0300
commitdfb4f3b18cc0490cf1db9dad021fce62a99443b5 (patch)
tree73521ae6691edc38c503a20725135a7a7ac95d93 /main.c
parent3ee06fa46236117ccb00fe4e832e7a7e4694f7f8 (diff)
parent847657fa4ec580658371d6fcaea547f7769fb569 (diff)
downloadegawk-dfb4f3b18cc0490cf1db9dad021fce62a99443b5.tar.gz
egawk-dfb4f3b18cc0490cf1db9dad021fce62a99443b5.tar.bz2
egawk-dfb4f3b18cc0490cf1db9dad021fce62a99443b5.zip
Merge branch 'gawk-5.0-stable'
Diffstat (limited to 'main.c')
-rw-r--r--main.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/main.c b/main.c
index d6e34266..8327cc74 100644
--- a/main.c
+++ b/main.c
@@ -1262,6 +1262,9 @@ catchsig(int sig)
|| sig == SIGBUS
#endif
) {
+ if (errcount > 0) // assume a syntax error corrupted our data structures
+ exit(EXIT_FATAL);
+
set_loc(__FILE__, __LINE__);
msg(_("fatal error: internal error"));
/* fatal won't abort() if not compiled for debugging */
@@ -1279,6 +1282,9 @@ catchsig(int sig)
static int
catchsegv(void *fault_address, int serious)
{
+ if (errcount > 0) // assume a syntax error corrupted our data structures
+ exit(EXIT_FATAL);
+
set_loc(__FILE__, __LINE__);
msg(_("fatal error: internal error: segfault"));
fflush(NULL);