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.
This commit is contained in:
Rich Felker 2020-10-14 10:55:55 -04:00
parent da845d52c5
commit 47baa0301f

View File

@ -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();
}