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

------------------------------------------------------------------------------
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
_______________________________________________
Valgrind-users mailing list
Valgrind-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/valgrind-users

Reply via email to