aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/internal/obj/mips
diff options
context:
space:
mode:
authorKeith Randall <khr@golang.org>2017-10-10 17:43:41 -0700
committerKeith Randall <khr@golang.org>2017-10-11 18:24:13 +0000
commite130dcf051862276c42df2f120457803d2e70138 (patch)
treeaa8910b37da3fd045754ab73a50881f505035919 /src/cmd/internal/obj/mips
parent624630b8247ca8150e10417f0da3e2fb2ce19eac (diff)
downloadgo-e130dcf051862276c42df2f120457803d2e70138.tar.xz
cmd/compile: abort earlier if stack frame too large
If the stack frame is too large, abort immediately. We used to generate code first, then abort. In issue 22200, generating code raised a panic so we got an ICE instead of an error message. Change the max frame size to 1GB (from 2GB). Stack frames between 1.1GB and 2GB didn't used to work anyway, the pcln table generation would have failed and generated an ICE. Fixes #22200 Change-Id: I1d918ab27ba6ebf5c87ec65d1bccf973f8c8541e Reviewed-on: https://go-review.googlesource.com/69810 Run-TryBot: Keith Randall <khr@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
Diffstat (limited to 'src/cmd/internal/obj/mips')
-rw-r--r--src/cmd/internal/obj/mips/asm0.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/cmd/internal/obj/mips/asm0.go b/src/cmd/internal/obj/mips/asm0.go
index 6257e5b83d..2dcfa97bf7 100644
--- a/src/cmd/internal/obj/mips/asm0.go
+++ b/src/cmd/internal/obj/mips/asm0.go
@@ -893,6 +893,7 @@ func buildop(ctxt *obj.Link) {
switch r {
default:
ctxt.Diag("unknown op in build: %v", r)
+ ctxt.DiagFlush()
log.Fatalf("bad code")
case AABSF: