Add patch from Stephan Kulow to solve the following:

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
This commit is contained in:
Julian Seward 2003-09-17 07:39:28 +00:00
parent c0f0059bf7
commit 76b167b551

View File

@ -133,9 +133,12 @@ void VG_(read_procselfmaps) (
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 );
@ -215,6 +218,7 @@ void VG_(read_procselfmaps) (
i = i_eol + 1;
}
depth--;
}
/*--------------------------------------------------------------------*/