projects
/
musl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
da845d5
)
remove incorrect fflush from assert failure handler
author
Rich Felker
<dalias@aerifal.cx>
Wed, 14 Oct 2020 14:55:55 +0000
(10:55 -0400)
committer
Rich Felker
<dalias@aerifal.cx>
Thu, 15 Oct 2020 00:27:12 +0000
(20:27 -0400)
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.
src/exit/assert.c
patch
|
blob
|
history
diff --git
a/src/exit/assert.c
b/src/exit/assert.c
index
49b0dc3
..
94edd82
100644
(file)
--- 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();
}