32-bit-specific.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2914
if (set == NULL)
return -1;
for (i = 0; i < _VKI_NSIG_WORDS; i++)
- set->sig[i] = 0xFFFFFFFF;
+ set->sig[i] = ~(UWord)0x0;
return 0;
}
// to ensure this in certain cases. See comments below.
static XPt* get_XCon( ThreadId tid, Bool custom_malloc )
{
- // Static to minimise stack size. +1 for added 0xffffffff %eip.
+ // Static to minimise stack size. +1 for added ~0 %eip.
static Addr eips[MAX_DEPTH + MAX_ALLOC_FNS + 1];
XPt* xpt = alloc_xpt;
// wasn't a bottom-XPt (now or later) it would cause problems later (eg.
// the parent's approx_ST wouldn't be equal [or almost equal] to the
// total of the childrens' approx_STs).
- eips[ n_eips++ ] = 0xffffffff;
+ eips[ n_eips++ ] = ~((Addr)0);
// Skip over alloc functions in eips[].
for (L = 0; is_alloc_fn(eips[L]) && L < n_eips; L++) { }
void* ds = orig_ds;
void* vals[10];
void* res;
-
+#define EOL ((void*)( ~(long)0 ))
vals[0] = (void*)0;
vals[1] = (void*)1;
vals[2] = ds - 0x1; // small shrink
vals[6] = ds + 0x500; // shrink a little, but still above start size
vals[7] = ds - 0x1; // shrink below start size
// vals[8] = ds - 0x1000; // shrink a lot below start size (into text)
-// vals[9] = (void*)0xffffffff;
- vals[8] = (void*)0xffffffff;
+// vals[9] = EOL;
+ vals[8] = EOL;
for (i = 0; (void*)0xffffffff != vals[i]; i++) {
res = (void*)syscall(__NR_brk, vals[i]);
assert( 0 == brk(orig_ds) ); // libc brk()
- for (i = 0; (void*)0xffffffff != vals[i]; i++) {
+ for (i = 0; EOL != vals[i]; i++) {
res = (void*)brk(vals[i]);
}