|
From: Nicholas N. <nj...@ca...> - 2003-11-19 20:21:26
|
On Wed, 19 Nov 2003, Josef Weidendorfer wrote: > > But if runtime code-generation occurs and the user doesn't even realise > > it, that's bad. > > Yes. > Can we print out a warning when code on the stack/heap is about to be > instrumented? Perhaps with some warning-suppression support. > > How was support for self-modifying code working? I don't know, I never looked at it. > For basic blocks on stack/ heap, can't we instrument a call to a > helper-function at beginning which checks (via checksum?) if the > original version of the code was changed, whenever the basic-block is > called? Sounds like it would work, as long as we're confident we can identify the stack/heap code blocks accurately. However, for programs like JIT-compilers that use the VALGRIND_DISCARD_TRANSLATIONS macro currently, it would be a performance hit to have an extra C call + checksum for every basic block. Is there a better way to do it? N |