]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: print "internal compiler error" message for all compiler panics
authorDan Scales <danscales@google.com>
Wed, 5 Jan 2022 23:20:50 +0000 (15:20 -0800)
committerDan Scales <danscales@google.com>
Tue, 11 Jan 2022 17:13:50 +0000 (17:13 +0000)
commit1abe9c1c73739786bb927342c4072e229affea8f
tree7b93ecb2862ae322ebf0c437d117e92d2faaf849
parent1cc3c735802f93eaf74b21795b8027163318ace1
cmd/compile: print "internal compiler error" message for all compiler panics

Change hidePanic (now renamed handlePanic) to print out the "internal
compiler error" message for all panics and runtime exceptions, similar
to what we already do for the SSA backend in ssa.Compile().

Previously, hidePanic would not catch panics/exceptions unless it wanted
to completely hide the panic because there had already been some
compiler errors.

Tested by manually inserting a seg fault in the compiler, and verifying
that the seg fault is cause and "internal compiler error" message (with
stack trace) is displayed proeprly.

Updates #50423

Change-Id: Ibe846012e147fcdcc63ac147aae4bdfc47bf5a58
Reviewed-on: https://go-review.googlesource.com/c/go/+/376057
Trust: Dan Scales <danscales@google.com>
Run-TryBot: Dan Scales <danscales@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Russ Cox <rsc@golang.org>
src/cmd/compile/internal/gc/main.go