From d3cb030b4df7fd8fbdfa503840740592fc7061a3 Mon Sep 17 00:00:00 2001 From: Nick Kralevich Date: Fri, 18 Nov 2011 10:37:48 -0800 Subject: Don't assume that the stack is always at 0x1000000. With our ASLR changes, the stack is now located at a random location in memory. Remove the hardcoded assumption that the stack will always be between 0x10000000 and 0x40000000. Change-Id: Ic0b6d9e3ae844f057ace81a982cec7e2b344e179 --- showmap/showmap.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'showmap') diff --git a/showmap/showmap.c b/showmap/showmap.c index 5c4a26fb..bb359f65 100644 --- a/showmap/showmap.c +++ b/showmap/showmap.c @@ -56,9 +56,7 @@ static int parse_header(const char* line, const mapinfo* prev, mapinfo** mi) { if (line[name_pos]) { strlcpy(name, line + name_pos, sizeof(name)); } else { - if ((start >= 0x10000000) && (start < 0x40000000)) { - strlcpy(name, "[stack]", sizeof(name)); - } else if (prev && start == prev->end && is_library(prev->name)) { + if (prev && start == prev->end && is_library(prev->name)) { // anonymous mappings immediately adjacent to shared libraries // usually correspond to the library BSS segment, so we use the // library's own name -- cgit v1.2.3