|
From: Tom H. <th...@cy...> - 2004-11-26 00:06:14
|
CVS commit by thughes:
Round the address hint down to a page boundary when looking for some
space to use - this prevents valgrind asserting and is consistent with
the documented mmap behaviour which doesn't require the address hint to
be page aligned unless MAP_FIXED is specified.
MERGE TO STABLE
A none/tests/map_unaligned.c 1.1.2.1 [no copyright]
A none/tests/map_unaligned.stderr.exp 1.1.2.1
A none/tests/map_unaligned.vgtest 1.1.2.1
M +1 -1 coregrind/vg_memory.c 1.66.2.2
M +4 -2 none/tests/Makefile.am 1.43.2.2
--- valgrind/coregrind/vg_memory.c #1.66.2.1:1.66.2.2
@@ -501,5 +501,5 @@ Addr VG_(find_map_space)(Addr addr, UInt
/* leave space for redzone and still try to get the exact
address asked for */
- addr -= VKI_BYTES_PER_PAGE;
+ addr = PGROUNDDN(addr) - VKI_BYTES_PER_PAGE;
}
ret = addr;
--- valgrind/none/tests/Makefile.am #1.43.2.1:1.43.2.2
@@ -41,4 +41,5 @@
$(addsuffix .vgtest,$(INSN_TESTS)) \
int.stderr.exp int.stdout.exp int.vgtest \
+ map_unaligned.stderr.exp map_unaligned.vgtest \
map_unmap.stderr.exp map_unmap.stdout.exp map_unmap.vgtest \
mq.stderr.exp mq.vgtest \
@@ -74,6 +75,6 @@
args badseg bitfield1 bt_everything bt_literal closeall coolo_strlen \
cpuid dastest discard exec-sigmask execve fcntl_setown floored fork \
- fpu_lazy_eflags fucomip $(INSN_TESTS) \
- int munmap_exe map_unmap mq mremap rcl_assert rcrl readline1 \
+ fpu_lazy_eflags fucomip $(INSN_TESTS) int munmap_exe \
+ map_unaligned map_unmap mq mremap rcl_assert rcrl readline1 \
resolv rlimit_nofile seg_override sem semlimit sha1_test \
shortpush shorts smc1 susphello pth_blockedsig pth_stackalign \
@@ -118,4 +119,5 @@
insn_sse2_LDADD = -lm
int_SOURCES = int.c
+map_unaligned_SOURCES = map_unaligned.c
map_unmap_SOURCES = map_unmap.c
mq_SOURCES = mq.c
|