diff options
author | Nick Kralevich <nnk@google.com> | 2011-11-18 10:37:48 -0800 |
---|---|---|
committer | Nick Kralevich <nnk@google.com> | 2011-11-18 10:37:48 -0800 |
commit | d3cb030b4df7fd8fbdfa503840740592fc7061a3 (patch) | |
tree | 5dfa730655162b7683e83dd65c7f9feb8a58d631 /showmap | |
parent | a4b510ac884c061229037a5a0b08af3ce1056764 (diff) | |
download | extras-d3cb030b4df7fd8fbdfa503840740592fc7061a3.tar.gz |
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
Diffstat (limited to 'showmap')
-rw-r--r-- | showmap/showmap.c | 4 |
1 files changed, 1 insertions, 3 deletions
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 |