|
From: Dan K. <da...@ke...> - 2003-06-20 01:15:44
|
Hi, 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... - Dan -- Dan Kegel http://www.kegel.com http://counter.li.org/cgi-bin/runscript/display-person.cgi?user=78045 |
|
From: Jeremy F. <je...@go...> - 2003-06-20 02:51:49
|
On Thu, 2003-06-19 at 18:24, Dan Kegel wrote: > Hi, > 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. J |
|
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 |