From 7ab2230d32032398ce58e73a41005ee66a0f862a Mon Sep 17 00:00:00 2001 From: pkujhd Date: Mon, 9 Mar 2020 18:34:51 +0800 Subject: [PATCH] fix incorrect fi.funcdata[_FUNCDATA_StackObjects] --- dymcode.1.12.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dymcode.1.12.go b/dymcode.1.12.go index dc3b8ebf..1283fbb5 100644 --- a/dymcode.1.12.go +++ b/dymcode.1.12.go @@ -9,7 +9,7 @@ import ( ) func AddStackObject(code *CodeReloc, fi *funcInfoData, seg *segment, symPtr map[string]uintptr) { - if len(fi.funcdata) > _FUNCDATA_StackObjects { + if len(fi.funcdata) > _FUNCDATA_StackObjects && fi.funcdata[_FUNCDATA_StackObjects] != 0xFFFFFFFFF { stackObjectRecordSize := unsafe.Sizeof(stackObjectRecord{}) b := code.Mod.stkmaps[fi.funcdata[_FUNCDATA_StackObjects]] n := *(*int)(unsafe.Pointer(&b[0]))