Rename VG_(am_is_bogus_client_stack_pointer) to 
VG_(am_addr_is_in_extensible_client_stack).


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15132 a5019735-40e9-0310-863c-91ae7b9d1cf9
diff --git a/coregrind/m_aspacemgr/aspacemgr-linux.c b/coregrind/m_aspacemgr/aspacemgr-linux.c
index 937c1c4..d1740f7 100644
--- a/coregrind/m_aspacemgr/aspacemgr-linux.c
+++ b/coregrind/m_aspacemgr/aspacemgr-linux.c
@@ -1282,12 +1282,12 @@
 }
 
 
-/* Check whether ADDR looks like a bogus stack pointer. Non-bogosity is
-   defined as follows: ADDR is not bogus if
-   (1) it points into an already mapped stack segment, OR
-   (2) it points into a reservation segment into which an abutting SkAnonC
+/* Check whether ADDR looks like an address or address-to-be located in an
+   extensible client stack segment. Return true if 
+   (1) ADDR is located in an already mapped stack segment, OR
+   (2) ADDR is located in a reservation segment into which an abutting SkAnonC
        segment can be extended. */
-Bool VG_(am_is_bogus_client_stack_pointer)( Addr addr )
+Bool VG_(am_addr_is_in_extensible_client_stack)( Addr addr )
 {
    const NSegment *seg = nsegments + find_nsegment_idx(addr);
 
@@ -1297,17 +1297,17 @@
    case SkFileV:
    case SkFileC:
    case SkShmC:
-      return True;
+      return False;
 
    case SkResvn: {
-      if (seg->smode != SmUpper) return True;
+      if (seg->smode != SmUpper) return False;
       /* If the the abutting segment towards higher addresses is an SkAnonC
          segment, then ADDR is a future stack pointer. */
       const NSegment *next = VG_(am_next_nsegment)(seg, /*forward*/ True);
-      if (next == NULL || next->kind != SkAnonC) return True;
+      if (next == NULL || next->kind != SkAnonC) return False;
 
       /* OK; looks like a stack segment */
-      return False;
+      return True;
    }
 
    case SkAnonC: {
@@ -1315,10 +1315,10 @@
          segment, then ADDR is a stack pointer into mapped memory. */
       const NSegment *next = VG_(am_next_nsegment)(seg, /*forward*/ False);
       if (next == NULL || next->kind != SkResvn || next->smode != SmUpper)
-         return True;
+         return False;
 
       /* OK; looks like a stack segment */
-      return False;
+      return True;
    }
 
    default:
diff --git a/coregrind/m_syswrap/syswrap-main.c b/coregrind/m_syswrap/syswrap-main.c
index c5aac59..4d6d9ba 100644
--- a/coregrind/m_syswrap/syswrap-main.c
+++ b/coregrind/m_syswrap/syswrap-main.c
@@ -1550,7 +1550,7 @@
 
          So the approximation we're taking here is to extend the stack only
          if the client stack pointer does not look bogus. */
-      if (! VG_(am_is_bogus_client_stack_pointer)(stackMin))
+      if (VG_(am_addr_is_in_extensible_client_stack)(stackMin))
          VG_(extend_stack)( tid, stackMin );
    }
 #  endif
diff --git a/coregrind/pub_core_aspacemgr.h b/coregrind/pub_core_aspacemgr.h
index 767b878..6675375 100644
--- a/coregrind/pub_core_aspacemgr.h
+++ b/coregrind/pub_core_aspacemgr.h
@@ -91,8 +91,9 @@
 extern Bool VG_(am_is_valid_for_client_or_free_or_resvn)
    ( Addr start, SizeT len, UInt prot );
 
-/* Check whether ADDR looks like a bogus stack pointer. */
-extern Bool VG_(am_is_bogus_client_stack_pointer)( Addr addr );
+/* Check whether ADDR looks like an address or address-to-be located in an
+   extensible client stack segment. */
+extern Bool VG_(am_addr_is_in_extensible_client_stack)( Addr addr );
 
 /* Trivial fn: return the total amount of space in anonymous mappings,
    both for V and the client.  Is used for printing stats in