提交 d30221da 编写于 作者: A aarzilli

proc/variables: chanRecvReturnAddress uses outdated frame info

g.SP refers to the frame the goroutine was in the last time it was
scheduled out. Instead of calling proc.(*Process).stacktrace directly
we should call proc.(*Process).GoroutineStacktrace that substitutes
fresh values retrieved from thread registers when necessary.
This bug leads to occasional problems with `next`.
上级 f2e5214e
......@@ -152,7 +152,7 @@ func (g *G) ChanRecvBlocked() bool {
// chanRecvReturnAddr returns the address of the return from a channel read.
func (g *G) chanRecvReturnAddr(dbp *Process) (uint64, error) {
locs, err := dbp.stacktrace(g.PC, g.SP, 4)
locs, err := dbp.GoroutineStacktrace(g, 4)
if err != nil {
return 0, err
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册