From 0c5ae3720253672b518e5d7a55799cc19fdaaf7c Mon Sep 17 00:00:00 2001 From: Akash Levy Date: Mon, 16 Dec 2024 11:44:28 -0800 Subject: [PATCH] raise SIGABRT instead of exit 1 --- util/Report.cc | 3 ++- util/StringUtil.cc | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/util/Report.cc b/util/Report.cc index 3b203ad6..8e8f8417 100644 --- a/util/Report.cc +++ b/util/Report.cc @@ -19,6 +19,7 @@ #include // min #include // exit #include // strlen +#include // signal #include "Machine.hh" #include "Error.hh" @@ -299,7 +300,7 @@ Report::fileCritical(int /* id */, printToBufferAppend(fmt, args); printBufferLine(); va_end(args); - exit(1); + raise(SIGABRT); } //////////////////////////////////////////////////////////////// diff --git a/util/StringUtil.cc b/util/StringUtil.cc index 685ae389..a6e4714a 100644 --- a/util/StringUtil.cc +++ b/util/StringUtil.cc @@ -20,6 +20,7 @@ #include #include #include // exit +#include // signal #include #include @@ -217,7 +218,7 @@ stringDeleteCheck(const char *str) { if (isTmpString(str)) { printf("Critical error: stringDelete for tmp string."); - exit(1); + raise(SIGABRT); } }