Skip to content

Commit 4671da0

Browse files
committed
runtime: print runtime frames in throwsplit trace
newstack manually prints the stack trace if we try to grow the stack when throwsplit is set. However, the default behavior is to omit runtime frames. Since runtime frames can be critical to understanding this crash, this change fixes this traceback to include them. Updates #21431. Change-Id: I5aa43f43aa2f10a8de7d67bcec743427be3a3b5d Reviewed-on: https://go-review.googlesource.com/79518 Run-TryBot: Austin Clements <[email protected]> Reviewed-by: Ian Lance Taylor <[email protected]> TryBot-Result: Gobot Gobot <[email protected]>
1 parent 09739d2 commit 4671da0

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/runtime/stack.go

+1
Original file line numberDiff line numberDiff line change
@@ -942,6 +942,7 @@ func newstack() {
942942
"\tmorebuf={pc:", hex(morebuf.pc), " sp:", hex(morebuf.sp), " lr:", hex(morebuf.lr), "}\n",
943943
"\tsched={pc:", hex(gp.sched.pc), " sp:", hex(gp.sched.sp), " lr:", hex(gp.sched.lr), " ctxt:", gp.sched.ctxt, "}\n")
944944

945+
thisg.m.traceback = 2 // Include runtime frames
945946
traceback(morebuf.pc, morebuf.sp, morebuf.lr, gp)
946947
throw("runtime: stack split at bad time")
947948
}

0 commit comments

Comments
 (0)