From: Nicholas N. <nj...@ca...> - 2003-06-20 07:27:25
|
On 19 Jun 2003, Jeremy Fitzhardinge wrote: > > I'm trying valgrind on an app I wrote a while ago > > but that has since had shared memory stuff added to it. > > Valgrind is complaining about invalid addresses when > > the app copies stuff to the shared area. Is this a known > > problem, or are valgrinded apps able to share memory > > properly with nonvalgrinded apps? That's gotta be a toughie > > to implement... > > I think its an oversight more than anything: V simply doesn't add the > shared memory segment to the list of valid addresses, like it does with > mmap. You're right that doing validity checking would be hard, but > simply treating shared memory as always valid would be OK. A workaround that might work would be to use one or more of the macros VALGRIND_MAKE_NOACCESS, VALGRIND_MAKE_READABLE, VALGRIND_MAKE_WRITABLE when you allocate/deallocate the shared memory. N |