[Valgrind-users] About wrapper

2018-07-29 Thread shuai xi
Hello developers: I want to write a tool for valgrind base on memcheck. I use the '_WRAP_ macros' to wrap malloc in libc, but there show me an error: valgrind: m_redir.c:638 (vgPlain_redir_notify_new_DebugInfo): Assertion 'is_plausible_guest_addr(sym_avmas.main)' failed. Segmentation fault (core

[Valgrind-users] how to change tmp value in dirty call

2018-08-15 Thread shuai xi
Hi@all, I am trying to develop a valgrind tool base on memcheck. Now i can get a shadow tmp id in memcheck's dirty call but i don't know how to change this tmp's value. Can i change or get this tmp's value by this id? Is there any Valgrind's API can do this? Thanks Shuai xi

[Valgrind-users] how to change the a register value of guest code in dirty call

2018-08-17 Thread shuai xi
? i read the code of vex's translate. I seems that there has no global values to store this information. Is there some ways to get this value? Very Thanks!! Shuai xi -- Check out the vibrant tech community on one

[Valgrind-users] About how to get the guest code memory

2018-08-20 Thread shuai xi
Hi@all, I add some hooks in the vgpreload*.so and get some information from it. The vgpreload*.so is a dynamically library loaded in the guest code. I want to get this information to do some analysis. But i don't know how to get this information from guest code memory to valgrind memory space.

[Valgrind-users] About how to turn off the malloc hook

2018-07-15 Thread shuai xi
hello developers, I want to reuse the shadow memory part of memcheck , but do not want to use the malloc hook part. When I set the 'VG_(needs).malloc_replacement = False',the malloc hook part seems still to be working. Which code do I need to modify to make malloc replace invalid?

[Valgrind-users] How to invalidate the malloc replacement

2018-07-22 Thread shuai xi
hello developers, sorry to ask this question again. When i delete the 'VG_(needs_malloc_replacement) (MC_(malloc).)' , valgrind show me the error :'--7969-- VG_USERREQ__CLIENT_CALL1: func=0x0'. It seems that the replace system is still working,but don't know which address to call. so, what

[Valgrind-users] About how to hook malloc to do sth and execute the original malloc

2018-07-12 Thread shuai xi
hello developer, i want to write a tool for valgrind to analysis an program automatically. I know that 'Memcheck's implementation of malloc has "nothing to do" with glibc's implementation' after readind some code of valgrind, but i want to use the glibc's malloc to avoid changing heap layout.

Re: [Valgrind-users] About how to hook malloc to do sth and execute the original malloc

2018-07-12 Thread shuai xi
the ==14498== main thread stack using the --main-stacksize= flag. ==14498== The main thread stack size used in this run was 8388608. But when i comment out the ' printf("1\n"); ', It seems ok. On Thu, Jul 12, 2018 at 7:24 PM Tom Hughes wrote: > On 12/07/18 10:26, shuai xi wr