I call DobbyHook function,but it always assert faild。
In InterceptRouting::GenerateRelocatedCode method
// save original prologue
memcpy((void *)entry_->origin_insns, (void *)origin_->addr, origin_->size);
It looks like forgot about the origin_insn_size field for assignment,this will cause the call to DobbyDestroy to fail, because the assertion of DobbyCodePatch function fails。
Suggested Modification:
// save original prologue
memcpy((void *)entry_->origin_insns, (void *)origin_->addr, origin_->size);
entry_->origin_insn_size = origin_->size;
Environment: macOS 12.6 (x64)
I am using the lastest commit.
I call DobbyHook function,but it always assert faild。 In InterceptRouting::GenerateRelocatedCode method
It looks like forgot about the origin_insn_size field for assignment,this will cause the call to DobbyDestroy to fail, because the assertion of DobbyCodePatch function fails。
Suggested Modification: