From: Rich Felker Date: Wed, 14 Oct 2020 14:55:55 +0000 (-0400) Subject: remove incorrect fflush from assert failure handler X-Git-Url: http://nsz.repo.hu/git/?a=commitdiff_plain;h=47baa0301ffc18e62239588a521440dede3adb7e;p=musl remove incorrect fflush from assert failure handler assert is not specified to flush open stdio streams, and doing so can block indefinitely waiting for a lock already held or an output operation to a file that can't accept more output until an unsatisfiable condition is met. --- diff --git a/src/exit/assert.c b/src/exit/assert.c index 49b0dc3e..94edd827 100644 --- a/src/exit/assert.c +++ b/src/exit/assert.c @@ -4,6 +4,5 @@ _Noreturn void __assert_fail(const char *expr, const char *file, int line, const char *func) { fprintf(stderr, "Assertion failed: %s (%s: %s: %d)\n", expr, file, func, line); - fflush(NULL); abort(); }