OSDN Git Service

linux-user: Exit not abort in die_with_backtrace
authorRichard Henderson <richard.henderson@linaro.org>
Tue, 22 Aug 2023 20:08:11 +0000 (13:08 -0700)
committerRichard Henderson <richard.henderson@linaro.org>
Wed, 18 Oct 2023 22:33:41 +0000 (15:33 -0700)
This line is supposed to be unreachable, but if we're going to
have it at all, SIGABRT via abort() is subject to the same signal
peril that created this function in the first place.

We can _exit immediately without peril.

Acked-by: Helge Deller <deller@gmx.de>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
linux-user/signal.c

index b7a2c47..84a56b7 100644 (file)
@@ -713,7 +713,7 @@ void die_with_signal(int host_sig)
     sigsuspend(&act.sa_mask);
 
     /* unreachable */
-    abort();
+    _exit(EXIT_FAILURE);
 }
 
 static G_NORETURN