|
From: Jeremy F. <je...@go...> - 2005-01-16 02:00:29
|
CVS commit by fitzhardinge:
It seems some systems place main()'s arguments quite a way down the
stack, so that finding valgrind_last by rounding &argc up to the next
64k boundary doesn't necesarily find the top of the stack's segment.
This doesn't matter too much, so this change loosens the tests for
finding Valgrind's segments by looking for any segment which starts before
VG_(valgrind_last) rather than ending before (or at) VG_(valgrind_last).
M +2 -2 vg_main.c 1.236
--- valgrind/coregrind/vg_main.c #1.235:1.236
@@ -2318,5 +2318,5 @@ static void build_valgrind_map_callback
start allocating more memory (note: heap is OK, it's just mmap
which is the problem here). */
- if (start >= VG_(client_end) && (start+size-1) <= VG_(valgrind_last)) {
+ if (start >= VG_(client_end) && start < VG_(valgrind_last)) {
if (0)
VG_(printf)("init1: %p-%p prot %s\n",
@@ -2364,5 +2364,5 @@ static void build_segment_map_callback (
flags |= SF_FILE;
- if (start >= VG_(client_end) && (start+size-1) <= VG_(valgrind_last)) {
+ if (start >= VG_(client_end) && start < VG_(valgrind_last)) {
Segment *s = VG_(find_segment)(start);
|