github agiledragon/gomonkey v2.14.4
Fix short-function overwrite on darwin/arm64 and amd64 unwind mismatch

3 hours ago
  • Fix adjacent-function corruption on darwin/arm64 when ApplyFunc / ApplyCore writes a 24-byte jump into a function shorter than 24 bytes. Function-entry patches now use the existing 4-byte branch plus an executable trampoline, the same path ApplyPrivateMethod already uses.
  • Fix an amd64 crash (invalid runtime symbol table) when CPU profiling or stack unwinding samples a patched entry. The entry is now a 5-byte JMP rel32 into a NOSPLIT/NOFRAME trampoline with zero stack delta, so Go no longer reads the original function's pcsp table at entry+10. Origin and Reset keep and release that trampoline. The pool has 256 slots and the target must be within rel32 range; if none is reachable, patching fails before the target code is modified.

Reference: #192

Don't miss a new gomonkey release

NewReleases is sending notifications on new releases.