So I was just checking with the client how the function tracking happens, memtrace is there.
I used these 2 clients 1) function tracking (trace malloc function) 2) memtrace_86
So I was just wondering if I do a malloc in my client for function tracking itself will it detect? answer -> it doesn't.
I just wanted to know why. I mean, when we are dealing with Symbol of the function and all the system calls are tracked. the things that are indirectly called by the target application also then still, how is the architecture of dynamorio exactly that It is successfully able to isolate the target application and not even see the calls done by itself?
The same things for memtrace_x86 as well like it only gets the read, write calls done by target application and not the dynamorio. How does this happen?
If The client code is executed within the same process as the target application then how does this happen?
the reason i am asking this is because when I had a pointer lets say
in target_app.cpp
void* m1=(void*) malloc(4);
our tracking client
In wrap_post where I got the address or the pointer m1 I did a malloc_usable_size(m1)
int* malloc_return1=(int *)drwrap_get_retval(wrapcxt);
size_t curr_sz= malloc_usable_size(malloc_return1);
I apparently got the accurate answer for this. So had this doubt about how the isolation exactly happens? like how does dynamorio doesn't see its own calls?