Open rdbo opened 1 year ago
It seems to be allocating the trampoline memory as write only:
[*] Some Function Trampoline: 0x801038000
proc maps:
0x801038000 0x801039000 0x1000 0x20000 -w- ----
This doesn't make sense, because it is being allocated with PROT_EXEC | PROT_READ | PROT_WRITE
, which is what LM_PROT_XRW
is set as.
I just recompiled libmem on FreeBSD with the warning fixes and things got even wilder. It is crashing on LM_CALLOC
, even though both parameters are valid:
LM_CALLOC(len + 1, sizeof(lm_byte_t));
And it is also crashing on mmap:
mmap(NULL, size, prot, MAP_PRIVATE | MAP_ANON, -1, 0)
Error:
Program received signal SIGSEGV, Segmentation fault.
Invalid permissions for mapped object.
Again, no clue what this is.
The tests on FreeBSD are failing during the hooking of
some_function
intest1.c
. The reason for that is not clear yet.