|
From: <sv...@va...> - 2015-04-22 14:16:19
|
Author: florian
Date: Wed Apr 22 15:16:11 2015
New Revision: 15132
Log:
Rename VG_(am_is_bogus_client_stack_pointer) to
VG_(am_addr_is_in_extensible_client_stack).
Modified:
trunk/coregrind/m_aspacemgr/aspacemgr-linux.c
trunk/coregrind/m_syswrap/syswrap-main.c
trunk/coregrind/pub_core_aspacemgr.h
Modified: trunk/coregrind/m_aspacemgr/aspacemgr-linux.c
==============================================================================
--- trunk/coregrind/m_aspacemgr/aspacemgr-linux.c (original)
+++ trunk/coregrind/m_aspacemgr/aspacemgr-linux.c Wed Apr 22 15:16:11 2015
@@ -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:
Modified: trunk/coregrind/m_syswrap/syswrap-main.c
==============================================================================
--- trunk/coregrind/m_syswrap/syswrap-main.c (original)
+++ trunk/coregrind/m_syswrap/syswrap-main.c Wed Apr 22 15:16:11 2015
@@ -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
Modified: trunk/coregrind/pub_core_aspacemgr.h
==============================================================================
--- trunk/coregrind/pub_core_aspacemgr.h (original)
+++ trunk/coregrind/pub_core_aspacemgr.h Wed Apr 22 15:16:11 2015
@@ -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
|