File 7671-Crash-dump-for-socket-abort.patch of Package erlang
From 22c7b6e58a590390a7e026ca9f2838acf59ed06d Mon Sep 17 00:00:00 2001
From: Raimo Niskanen <raimo@erlang.org>
Date: Thu, 28 Mar 2024 09:34:07 +0100
Subject: [PATCH] Crash dump for socket abort
---
erts/emulator/nifs/common/socket_util.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/erts/emulator/nifs/common/socket_util.c b/erts/emulator/nifs/common/socket_util.c
index 3747723ede..57709e4437 100644
--- a/erts/emulator/nifs/common/socket_util.c
+++ b/erts/emulator/nifs/common/socket_util.c
@@ -2427,11 +2427,16 @@ esock_abort(const char* expr,
const char* file,
int line)
{
+#if 0
fflush(stdout);
fprintf(stderr, "%s:%d:%s() Assertion failed: %s\n",
file, line, func, expr);
fflush(stderr);
abort();
+#else
+ erts_exit(ERTS_DUMP_EXIT, "%s:%d:%s() Assertion failed: %s\n",
+ file, line, func, expr);
+#endif
}
--
2.35.3