|
From: | Vijay Bellur |
Subject: | Re: [Gluster-devel] Query regarding GF_ASSERT macro |
Date: | Thu, 02 Jan 2014 19:15:44 +0530 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.1.0 |
On 01/02/2014 11:44 AM, Atin Mukherjee wrote:
I think GF_ASSERT macro should be modified such that in case of no debug build if x is NULL, after logging an error message it should abort i.e. by calling assert(). This fix is required as there are places where consecutive GF_ASSERT macro has been called like :
I think the more appropriate thing to do is to remove dependency on DEBUG. assert() macro inherently relies on NDEBUG not being defined. The intention behind the current GF_ASSERT macro is to prevent abort()s from happening in non-debug/production builds.
We can change GF_ASSERT to remove dependency on DEBUG and add NDEBUG to CFLAGS by default in configure.ac.
-Vijay
[Prev in Thread] | Current Thread | [Next in Thread] |