static
void addrcheck_set_perms (Addr a, UInt len,
- Bool nn, Bool rr, Bool ww, Bool xx)
+ Bool rr, Bool ww, Bool xx)
{
- DEBUG("addrcheck_set_perms(%p, %u, nn=%u, rr=%u ww=%u, xx=%u)\n",
- a, len, nn, rr, ww, xx);
+ DEBUG("addrcheck_set_perms(%p, %u, rr=%u ww=%u, xx=%u)\n",
+ a, len, rr, ww, xx);
if (rr || ww || xx) {
SK_(make_accessible)(a, len);
} else {
static
void mmap_segment ( Addr a, UInt len, UInt prot, Int fd )
{
- Bool nn, rr, ww, xx;
+ Bool rr, ww, xx;
/* Records segment, reads debug symbols if necessary */
if ((prot & PROT_EXEC) && fd != -1)
VG_(new_exe_segment) ( a, len );
- nn = False; /* PROT_NONE == 0; was = prot & PROT_NONE. */
rr = prot & PROT_READ;
ww = prot & PROT_WRITE;
xx = prot & PROT_EXEC;
- VG_TRACK( new_mem_mmap, a, len, nn, rr, ww, xx );
+ VG_TRACK( new_mem_mmap, a, len, rr, ww, xx );
}
static
static
void mprotect_segment ( Addr a, UInt len, Int prot )
{
- Bool nn, rr, ww, xx;
- nn = prot & PROT_NONE;
+ Bool rr, ww, xx;
+
rr = prot & PROT_READ;
ww = prot & PROT_WRITE;
xx = prot & PROT_EXEC;
// if adding, should check and add to exe_seg list
// easier to ignore both cases -- both v. unlikely?
mash_addr_and_len(&a, &len);
- VG_TRACK( change_mem_mprotect, a, len, nn, rr, ww, xx );
+ VG_TRACK( change_mem_mprotect, a, len, rr, ww, xx );
}
static
// what should the permissions on the new extended part be??
// using 'rwx'
VG_TRACK( new_mem_mmap, new_addr+old_size, new_size-old_size,
- False, True, True, True );
+ True, True, True );
}
}
if ( segmentSize > 0 ) {
/* we don't distinguish whether it's read-only or
* read-write -- it doesn't matter really. */
- VG_TRACK( new_mem_mmap, addr, segmentSize, False, True, True, False );
+ VG_TRACK( new_mem_mmap, addr, segmentSize, True, True, False );
}
}
break;
static
void eraser_set_perms (Addr a, UInt len,
- Bool nn, Bool rr, Bool ww, Bool xx)
+ Bool rr, Bool ww, Bool xx)
{
if (rr) make_readable(a, len);
else if (ww) make_writable(a, len);
track->new_mem_stack_aligned = & make_writable_aligned;
track->new_mem_stack_signal = & make_writable;
track->new_mem_brk = & make_writable;
- track->new_mem_mmap = & eraser_set_perms;
+ track->new_mem_mmap = & eraser_new_mem_startup;
track->copy_mem_heap = & copy_address_range_state;
track->change_mem_mprotect = & eraser_set_perms;
void (*new_mem_stack_aligned) ( Addr a, UInt len );
void (*new_mem_stack_signal) ( Addr a, UInt len );
void (*new_mem_brk) ( Addr a, UInt len );
- void (*new_mem_mmap) ( Addr a, UInt len,
- Bool nn, Bool rr, Bool ww, Bool xx );
+ void (*new_mem_mmap) ( Addr a, UInt len, Bool rr, Bool ww, Bool xx );
void (*copy_mem_heap) ( Addr from, Addr to, UInt len );
void (*copy_mem_remap) ( Addr from, Addr to, UInt len );
- void (*change_mem_mprotect) ( Addr a, UInt len,
- Bool nn, Bool rr, Bool ww, Bool xx );
+ void (*change_mem_mprotect) ( Addr a, UInt len, Bool rr, Bool ww, Bool xx );
/* Used on redzones around malloc'd blocks and at end of stack */
void (*ban_mem_heap) ( Addr a, UInt len );
static
void memcheck_set_perms (Addr a, UInt len,
- Bool nn, Bool rr, Bool ww, Bool xx)
+ Bool rr, Bool ww, Bool xx)
{
- DEBUG("memcheck_set_perms(%p, %u, nn=%u, rr=%u ww=%u, xx=%u)\n",
- a, len, nn, rr, ww, xx);
+ DEBUG("memcheck_set_perms(%p, %u, rr=%u ww=%u, xx=%u)\n",
+ a, len, rr, ww, xx);
if (rr) SK_(make_readable)(a, len);
else if (ww) SK_(make_writable)(a, len);
else SK_(make_noaccess)(a, len);