|
From: J. B. <jb...@gm...> - 2008-10-14 23:04:24
|
Hi guys,
The nightly build results that are published to this mailinglists, do
they all run on stock valgrind trunk?
I've been working on the ARM port of valgrind for a while after Evan
left off, and I'm really baffled by the "mremap" test, which each
buildmachine claim it's passing.
In syswrap-generic.c, function do_mremap, :381 and :441, it checks the
returnvalues of VG_(am_find_nsegment) and checks that it's
1) not null
2) has kind :SkFree
Looking in m_aspacemgr/aspacemgr-linux.c
1129 /* Finds the segment containing 'a'. Only returns file/anon/resvn
1130 segments. This returns a 'NSegment const *' - a pointer to
1131 readonly data. */
1132 NSegment const * VG_(am_find_nsegment) ( Addr a )
1133 {
1134 Int i = find_nsegment_idx(a);
1135 aspacem_assert(i >= 0 && i < nsegments_used);
1136 aspacem_assert(nsegments[i].start <= a);
1137 aspacem_assert(a <= nsegments[i].end);
1138 if (nsegments[i].kind == SkFree)
1139 return NULL;
1140 else
1141 return &nsegments[i];
1142 }
That is, it will always fail.
(Changing the if statements to if (!(segLo == NULL && segHi == NULL))
and the test passes fine for me).
Does no other platform actually use the mremap syscall, but solves it
in some different way, or am I misunderstanding this code completely?
Thanks in advance
/Johan
|