|
From: Duncan S. <bal...@fr...> - 2005-05-02 07:00:08
|
On Fri, 2005-04-29 at 23:22 -0500, Nicholas Nethercote wrote: > On Thu, 28 Apr 2005, Duncan Sands wrote: > > > I've hit the valgrind trampoline problem: I need to take > > the address of a local subroutine, which causes valgrind > > to barf. The docs say to use VALGRIND_DISCARD_TRANSLATIONS, > > but don't give much in the way of details. An example of how > > to do this would be helpful. > > Where in the docs does it say how to work around this problem? Hi Nicholas, from http://valgrind.org/docs/manual/coregrind_core.html#limits "Valgrind can handle dynamically-generated code just fine. However, if you regenerate code over the top of old code (ie. at the same memory addresses) Valgrind will not realise the code has changed, and will run its old translations, which will be out-of-date. You need to use the VALGRIND_DISCARD_TRANSLATIONS client request in that case. For the same reason gcc's trampolines for nested functions are currently unsupported, see bug 69511. " I read this as implying that VALGRIND_DISCARD_TRANSLATIONS are needed for trampolines. Is that wrong? Thanks, Duncan. |