[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gawk-diffs] [SCM] gawk branch, gawk-4.2-stable, updated. gawk-4.1.0-292
From: |
Arnold Robbins |
Subject: |
[gawk-diffs] [SCM] gawk branch, gawk-4.2-stable, updated. gawk-4.1.0-2923-g8c0f1dc |
Date: |
Sat, 10 Feb 2018 12:53:45 -0500 (EST) |
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "gawk".
The branch, gawk-4.2-stable has been updated
via 8c0f1dcdd4a05a002ae01f586bc0b5386db903d4 (commit)
from 29141665ddc8055d197652e59a512147f1dcf574 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://git.sv.gnu.org/cgit/gawk.git/commit/?id=8c0f1dcdd4a05a002ae01f586bc0b5386db903d4
commit 8c0f1dcdd4a05a002ae01f586bc0b5386db903d4
Author: Arnold D. Robbins <address@hidden>
Date: Sat Feb 10 19:53:27 2018 +0200
Do fflush(NULL) before abort(), for GLIBC 2.27.
diff --git a/ChangeLog b/ChangeLog
index b467eb2..087dd7c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2018-02-10 Arnold D. Robbins <address@hidden>
+
+ * main.c, msg.c: Add a call to fflush(NULL) before each call
+ to abort(), since GLIBC 2.27 doesn't necessarily flush before
+ aborting. Thanks to Nelson H.F. Beebe for the report.
+
2018-02-09 Arnold D. Robbins <address@hidden>
* io.c (socketopen): Rearrange assigning the flags to use
diff --git a/main.c b/main.c
index 2860d24..25a628b 100644
--- a/main.c
+++ b/main.c
@@ -1226,6 +1226,8 @@ catchsig(int sig)
set_loc(__FILE__, __LINE__);
msg(_("fatal error: internal error"));
/* fatal won't abort() if not compiled for debugging */
+ // GLIBC 2.27 doesn't necessarily flush on abort. Sigh.
+ fflush(NULL);
abort();
} else
cant_happen();
@@ -1240,6 +1242,7 @@ catchsegv(void *fault_address, int serious)
{
set_loc(__FILE__, __LINE__);
msg(_("fatal error: internal error: segfault"));
+ fflush(NULL);
abort();
/*NOTREACHED*/
return 0;
@@ -1252,6 +1255,7 @@ catchstackoverflow(int emergency, stackoverflow_context_t
scp)
{
set_loc(__FILE__, __LINE__);
msg(_("fatal error: internal error: stack overflow"));
+ fflush(NULL);
abort();
/*NOTREACHED*/
return;
diff --git a/msg.c b/msg.c
index b474698..20732bc 100644
--- a/msg.c
+++ b/msg.c
@@ -101,6 +101,8 @@ err(bool isfatal, const char *s, const char *emsg, va_list
argp)
if (isfatal) {
#ifdef GAWKDEBUG
+ // GLIBC 2.27 doesn't necessarily flush on abort. Sigh.
+ fflush(NULL);
abort();
#endif
gawk_exit(EXIT_FATAL);
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 6 ++++++
main.c | 4 ++++
msg.c | 2 ++
3 files changed, 12 insertions(+)
hooks/post-receive
--
gawk
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [gawk-diffs] [SCM] gawk branch, gawk-4.2-stable, updated. gawk-4.1.0-2923-g8c0f1dc,
Arnold Robbins <=