|
From: Nicholas N. <nj...@cs...> - 2006-07-20 23:50:28
|
On Thu, 20 Jul 2006, Tom Hughes wrote: > In message <200...@ac...> > Julian Seward <js...@ac...> wrote: > >> I don't think it would be hard to fix this. Basically what >> needs to happen is V needs to note any memory segments that >> refer to devices and not to prod around in those areas during >> leak checks. That's what Jeremy's original implementation did >> and I guess it worked for him. > > Like this you mean: > > Index: memcheck/mc_leakcheck.c > =================================================================== > --- memcheck/mc_leakcheck.c (revision 5983) > +++ memcheck/mc_leakcheck.c (working copy) > @@ -759,6 +759,9 @@ > tl_assert(seg); > if (seg->kind != SkFileC && seg->kind != SkAnonC) > continue; > + if (seg->kind == SkFileC && > + (VKI_S_ISCHR(seg->mode) || VKI_S_ISBLK(seg->mode))) > + continue; > if (!(seg->hasR && seg->hasW)) > continue; > if (seg->isCH) > > That essentially implements the same behaviour as before, although > in a slightly different way. I do also have a patch that creates a > new SkDevC segment type but I'm not sure it's worth bothering. > > The only problem I see with this is that if you explicitly mmap > from /dev/zero to get memory (rather than using MAP_ANONYMOUS) then > it won't be checked. That problem exists with the old solution as > well though. Asiga, can you try this patch and tell us if it fixes the problem? Thanks. Nick |