diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2022-03-30 23:20:39 -0400 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@gmail.com> | 2022-03-30 23:20:39 -0400 |
commit | cc1b64e992b52d19b24cdc7677fc451c60d2c9d4 (patch) | |
tree | 96e6b412cdb76b620723b56012980a82e24a2b13 /include/linux/bug.h | |
parent | 6692c6f9d3feb8dffb34fc01c36e03765238c842 (diff) |
Flush standard output before popping assertions
Seeing error messages before we die generally makes assertions easier to
debug.
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
Diffstat (limited to 'include/linux/bug.h')
-rw-r--r-- | include/linux/bug.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/bug.h b/include/linux/bug.h index 77260f37..957d4087 100644 --- a/include/linux/bug.h +++ b/include/linux/bug.h @@ -17,7 +17,7 @@ #define BUILD_BUG_ON(cond) ((void)sizeof(char[1 - 2*!!(cond)])) -#define BUG() do { assert(0); unreachable(); } while (0) +#define BUG() do { fflush(stdout); assert(0); unreachable(); } while (0) #define BUG_ON(cond) assert(!(cond)) #define WARN(cond, fmt, ...) \ |