[Gluster-devel] Query regarding GF_ASSERT macro
Vijay Bellur
vbellur at redhat.com
Thu Jan 2 13:45:44 UTC 2014
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
More information about the Gluster-devel
mailing list