Commit 512bec06 authored by Chase Douglas's avatar Chase Douglas Committed by Keith Packard
Browse files

Make BUG_WARN* signal safe


Signed-off-by: default avatarChase Douglas <chase.douglas@canonical.com>
Reviewed-by: Peter Hutterer's avatarPeter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer's avatarPeter Hutterer <peter.hutterer@who-t.net>
parent 0fa52178
......@@ -371,10 +371,10 @@ extern _X_EXPORT unsigned long serverGeneration;
/* Don't use this directly, use BUG_WARN or BUG_WARN_MSG instead */
#define __BUG_WARN_MSG(cond, with_msg, ...) \
do { if (cond) { \
ErrorF("BUG: triggered 'if (" #cond ")'\n"); \
ErrorF("BUG: %s:%d in %s()\n", \
__FILE__, __LINE__, __func__); \
if (with_msg) ErrorF(__VA_ARGS__); \
ErrorFSigSafe("BUG: triggered 'if (" #cond ")'\n"); \
ErrorFSigSafe("BUG: %s:%u in %s()\n", \
__FILE__, __LINE__, __func__); \
if (with_msg) ErrorFSigSafe(__VA_ARGS__); \
xorg_backtrace(); \
} } while(0)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment