Change VG_(am_extend_map_client) as follows:
- Tighten up on asserts
- Simplify; as the function grows memory into a free segment, there
  cannot possibly be any translations to be discarded. Free segments
  do not have translations. sane_NSegment will make sure.
- Change the prototype to take in the start address of the mapping and
  return a pointer to the resized segment. Previously, the code 

   ok = VG_(am_extend_map_client)( &d, old_seg, needL );
   if (!ok)
      goto eNOMEM;
   VG_TRACK( new_mem_mmap, needA, needL, 
                           old_seg->hasR, old_seg->hasW, old_seg->hasX,

  was examining old_seg->hasR etc even though VG_(am_extend_map_client)
  stated that *old_seg was invalid after the function returned.
  That wasn't exactly a problem, but clearly looked wrong.

git-svn-id: svn:// a5019735-40e9-0310-863c-91ae7b9d1cf9
3 files changed