read_procselfmaps calls *record_mapping which
is startup_segment_callback for init_memory. But this
again calls through read_symbols read_procselfmaps
again with read_from_file == True. But this overwrites
the internal buffer and causes parsing errors.
(What makes the error a bit funny is that valgrind
wouldn't have catched that error afaik :)
Anyway: our solution is to forbid read_from_file from
with callbacks
MERGE TO STABLE
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1820
UInt foffset;
UChar rr, ww, xx, pp, ch, tmp;
- if (read_from_file) {
+ static Int depth = 0;
+
+ if (read_from_file && depth == 0) {
VG_(read_procselfmaps_contents)();
}
+ depth++;
if (0)
VG_(message)(Vg_DebugMsg, "raw:\n%s", procmap_buf );
i = i_eol + 1;
}
+ depth--;
}
/*--------------------------------------------------------------------*/