Florian Krohm 00ffec50e5 Pass in a mask of segment kinds to VG_(get_segment_starts)
and VG_(am_get_segment_starts) to indicate which segments
should be collected. That should solve the following problem:
in m_main.c we used to:

      seg_starts = VG_(get_segment_starts)( &n_seg_starts );

      for (i = 0; i < n_seg_starts; i++) {
         Word j, n;
         NSegment const* seg 
            = VG_(am_find_nsegment)( seg_starts[i] );
         vg_assert(seg);
         if (seg->kind == SkFileC || seg->kind == SkAnonC) {

         ...
         // ... dynamic memory allocation for valgrind
         ...
      }

This caused the vassert(seg) to fire because the dynamic memory
allocation further down the loop changed segments such that a 
valgrind segment which used to be non-SkFree suddenly became 
SkFree and hence VG_(am_find_nsegment) returned NULL. Whoom.

With this revision we only collect the segments we're really
interested in. For the example above that is all client segments.
So if V allocates memory -- fine. That will not change the layout
of client segments.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14949
2015-02-20 14:00:23 +00:00
..
2014-10-22 22:25:30 +00:00
2014-11-14 19:25:08 +00:00
2014-10-22 22:25:30 +00:00
2015-01-10 15:25:54 +00:00
2014-09-15 18:50:17 +00:00
2014-10-22 22:25:30 +00:00
2014-12-13 18:35:00 +00:00
2015-01-08 21:05:03 +00:00
2014-10-18 20:56:13 +00:00
2014-10-22 22:25:30 +00:00
2014-03-20 23:00:09 +00:00
2014-10-22 22:25:30 +00:00
2014-10-22 22:25:30 +00:00
2014-08-09 16:55:59 +00:00