Skip to content

Commit 542a807

Browse files
committed
fixup! Fix ARM64 stack corruption in ghost_stack by skipping internal frames
1 parent 8a872ae commit 542a807

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

src/memray/_memray/ghost_stack/src/ghost_stack.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -305,11 +305,6 @@ class GhostStackImpl {
305305

306306
if (save_loc_ret == 0 && loc.type == UNW_SLT_MEMORY && loc.u.addr != 0) {
307307
ret_loc = reinterpret_cast<uintptr_t*>(loc.u.addr);
308-
// Sanity check: ret_loc should be somewhere near FP (which is our sp variable)
309-
uintptr_t addr = loc.u.addr;
310-
if (addr < sp - 0x10000 || addr > sp + 0x10000) {
311-
ret_loc = nullptr; // Don't use this suspicious address
312-
}
313308
}
314309
#else
315310
// macOS: return address is at fp + sizeof(void*)

0 commit comments

Comments
 (0)