runtime: binary analysis failed due to fake PC in gosave_systemstack_switch #71440
Labels
BugReport
Issues describing a possible bug in the Go implementation.
compiler/runtime
Issues related to the Go compiler and/or runtime.
WaitingForInfo
Issue is not actionable because of missing required information, which needs to be provided.
Go version
go version go 1.22.6 linux/amd64
Output of
go env
in your module/workspace:What did you do?
Hi, I want to build CFG of one binary but when I try to track the destination address of the instruction
4735a0: 4c 8d 0d 21 0e 00 00 lea 0xe21(%rip),%r9 # 4743c8 <runtime.systemstack_switch.abi0+0x8>
,this address is in the middle of one instruction and causes a fault.
gosave_systemstack_switch:
runtime.systemstack_switch.abi0:
What did you see happen?
Since the value here is in the middle of instruction, I couldn't finish CFG build work.
What did you expect to see?
The explanation for the "+8" in function gosave_systemstack_switch is to skip the prologue. And the prologue of amd64 should be 4 bytes, maybe better to change this vaule to 4?
gosave_systemstack_switch in runtime/asm_amd64.s:
The text was updated successfully, but these errors were encountered: