From: Eliot M. <mo...@cs...> - 2012-02-23 13:02:40
|
On 2/23/2012 7:51 AM, jee wrote: > My code change itself with running, and, I use VALGRIND_DISCARD_TRANSLATIONS with I changed the > function's assembly code. > > and my code is pure C++. i rewrite the assembly code like this: > inline hook: > mov addr, %rax > jmp *%rax > I insert this assembly code to the begin of functions, > > I can run my elf fine. but with valgrind, the code's behavior is....random. mostly, it goto deadly lock. You have self-modifying code, so probably need to specify some flavor of the --smc-check option to valgrind. See the man page :-) ... Best wishes -- Eliot Moss |