diff --git a/src/cmd/compile/internal/gc/subr.go b/src/cmd/compile/internal/gc/subr.go index c552dd01a1..83888be6f7 100644 --- a/src/cmd/compile/internal/gc/subr.go +++ b/src/cmd/compile/internal/gc/subr.go @@ -11,6 +11,7 @@ import ( "encoding/binary" "fmt" "os" + "runtime/debug" "sort" "strconv" "strings" @@ -151,6 +152,11 @@ func Fatalf(fmt_ string, args ...interface{}) { fmt.Printf("\n") fmt.Printf("Please file a bug report including a short program that triggers the error.\n") fmt.Printf("https://golang.org/issue/new\n") + } else { + // Not a release; dump a stack trace, too. + fmt.Println() + os.Stdout.Write(debug.Stack()) + fmt.Println() } hcrash()