mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
cmd/compile: expand large stack frame error messages
Change-Id: Ib9f621e380dd9a6beace27ec5ff62780012f8274 Reviewed-on: https://go-review.googlesource.com/c/144600 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Keith Randall <khr@golang.org>
This commit is contained in:
parent
f28191340e
commit
cc36b835e4
3 changed files with 19 additions and 6 deletions
|
|
@ -279,7 +279,7 @@ func compileSSA(fn *Node, worker int) {
|
|||
// Note: check arg size to fix issue 25507.
|
||||
if f.Frontend().(*ssafn).stksize >= maxStackSize || fn.Type.ArgWidth() >= maxStackSize {
|
||||
largeStackFramesMu.Lock()
|
||||
largeStackFrames = append(largeStackFrames, fn.Pos)
|
||||
largeStackFrames = append(largeStackFrames, largeStack{locals: f.Frontend().(*ssafn).stksize, args: fn.Type.ArgWidth(), pos: fn.Pos})
|
||||
largeStackFramesMu.Unlock()
|
||||
return
|
||||
}
|
||||
|
|
@ -294,7 +294,8 @@ func compileSSA(fn *Node, worker int) {
|
|||
// the assembler may emit inscrutable complaints about invalid instructions.
|
||||
if pp.Text.To.Offset >= maxStackSize {
|
||||
largeStackFramesMu.Lock()
|
||||
largeStackFrames = append(largeStackFrames, fn.Pos)
|
||||
locals := f.Frontend().(*ssafn).stksize
|
||||
largeStackFrames = append(largeStackFrames, largeStack{locals: locals, args: fn.Type.ArgWidth(), callee: pp.Text.To.Offset - locals, pos: fn.Pos})
|
||||
largeStackFramesMu.Unlock()
|
||||
return
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue