|
From: Stephane H. <sho...@ni...> - 2007-07-11 15:22:43
|
On Tuesday 10 July 2007 18:13, you wrote: > On Tue, 10 Jul 2007, Stephane Hockenhull wrote: > > this is perfectly sane code, but the initial stack switch causes valgrind > > to clear the initialized bits above the initial ESP so all parameters are > > considered as uninitialized values, and data below the stack gets marked > > as unaccessible so all valid accesses to data on the heap just below the > > fiber stack reports bogus errors. > > Distinguishing stack switches from large stack allocations is tricky. > The --max-stackframe option might be helpful. > > > we would need a way to explicitly tell valgrind to mark an area as a > > stack region and remove that ugly hack where valgrind does that bogus > > automatic detection. > > If the above fails, the VALGRIND_STACK_REGISTER client request and its > friends may be of help. See > http://www.valgrind.org/docs/manual/manual-core.html#manual-core.clientreq. > > Nick ah-ha! thanks. that's exactly what I needed. I tried with the VALGRIND_MAKE_MEM_DEFINED etc and --max-stackframe but didn't see the VALGRIND_STACK_REGISTER which is in a different place in the manual. could we add this VALGRIND_STACK_REGISTER to the "try --max-stackframe= ..." warning/suggestion valgrind gives? it will save future valgrind users a lot of searching :\ thanks again, that should fix it. -- Stephane Hockenhull SSC-Studios.com |