From: Willy Tarreau Date: Sun, 16 Dec 2018 07:17:23 +0000 (+0100) Subject: MINOR: debug: make the ABORT_NOW macro use a volatile int X-Git-Tag: v1.9-dev11~6 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=bce4d8a37db6db5acd56cf2ab188a86367d3f8b3;p=thirdparty%2Fhaproxy.git MINOR: debug: make the ABORT_NOW macro use a volatile int Similar to previous commit, let's make the macro use a volatile when dereferencing NULL so that clang doesn't optimize it away. --- diff --git a/include/common/debug.h b/include/common/debug.h index 1f84c658c9..325ef8396b 100644 --- a/include/common/debug.h +++ b/include/common/debug.h @@ -40,7 +40,7 @@ /* This abort is more efficient than abort() because it does not mangle the * stack and stops at the exact location we need. */ -#define ABORT_NOW() (*(int*)0=0) +#define ABORT_NOW() (*(volatile int*)0=0) /* this one is provided for easy code tracing. * Usage: TRACE(strm||0, fmt, args...);