Switch DXX_HAVE_POISON_OVERWRITE to 0/1 instead of undef/defined
This commit is contained in:
parent
03dbc96103
commit
0ad0a57fea
|
@ -1857,12 +1857,11 @@ help:always wipe certain freed memory
|
|||
context.Message('%s: checking %s...' % (self.msgprefix, 'whether to use overwrite poisoning'))
|
||||
r = 'overwrite' in self.user_settings.poison
|
||||
context.Result(r)
|
||||
if r:
|
||||
context.sconf.Define('DXX_HAVE_POISON_OVERWRITE')
|
||||
self._define_macro(context, 'DXX_HAVE_POISON_OVERWRITE', int(r))
|
||||
return r
|
||||
@_custom_test
|
||||
def _check_poison_method(self,context,
|
||||
_methods=(check_poison_valgrind, check_poison_overwrite),
|
||||
_methods=(check_poison_overwrite, check_poison_valgrind),
|
||||
poison = None
|
||||
):
|
||||
# Always run both checks. The user may want a program that
|
||||
|
|
|
@ -32,10 +32,7 @@ template <typename T, typename V>
|
|||
static inline void _DXX_POISON_MEMORY_RANGE(T b, T e, const V &v)
|
||||
{
|
||||
#if DXX_HAVE_POISON
|
||||
int store = 0;
|
||||
#ifdef DXX_HAVE_POISON_OVERWRITE
|
||||
store |= 1;
|
||||
#endif
|
||||
int store = DXX_HAVE_POISON_OVERWRITE;
|
||||
#ifdef DXX_HAVE_POISON_VALGRIND
|
||||
if (!store)
|
||||
store |= RUNNING_ON_VALGRIND;
|
||||
|
|
Loading…
Reference in a new issue