aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/stack.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/runtime/stack.go')
-rw-r--r--src/runtime/stack.go14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/runtime/stack.go b/src/runtime/stack.go
index d5e587a209..14e1a75ccd 100644
--- a/src/runtime/stack.go
+++ b/src/runtime/stack.go
@@ -649,11 +649,10 @@ func adjustpointers(scanp unsafe.Pointer, bv *bitvector, adjinfo *adjustinfo, f
}
// Note: the argument/return area is adjusted by the callee.
-func adjustframe(frame *stkframe, arg unsafe.Pointer) bool {
- adjinfo := (*adjustinfo)(arg)
+func adjustframe(frame *stkframe, adjinfo *adjustinfo) {
if frame.continpc == 0 {
// Frame is dead.
- return true
+ return
}
f := frame.fn
if stackDebug >= 2 {
@@ -663,7 +662,7 @@ func adjustframe(frame *stkframe, arg unsafe.Pointer) bool {
// A special routine at the bottom of stack of a goroutine that does a systemstack call.
// We will allow it to be copied even though we don't
// have full GC info for it (because it is written in asm).
- return true
+ return
}
locals, args, objs := frame.getStackMap(&adjinfo.cache, true)
@@ -736,8 +735,6 @@ func adjustframe(frame *stkframe, arg unsafe.Pointer) bool {
}
}
}
-
- return true
}
func adjustctxt(gp *g, adjinfo *adjustinfo) {
@@ -931,7 +928,10 @@ func copystack(gp *g, newsize uintptr) {
gp.stktopsp += adjinfo.delta
// Adjust pointers in the new stack.
- gentraceback(^uintptr(0), ^uintptr(0), 0, gp, 0, nil, 0x7fffffff, adjustframe, noescape(unsafe.Pointer(&adjinfo)), 0)
+ var u unwinder
+ for u.init(gp, 0); u.valid(); u.next() {
+ adjustframe(&u.frame, &adjinfo)
+ }
// free old stack
if stackPoisonCopy != 0 {