runtime: add crash stack support for riscv64

Change-Id: Ib89a71e20f9c6b86c97814c75cb427e9bd7075e5
Reviewed-on: https://go-review.googlesource.com/c/go/+/538735
Reviewed-by: David Chase <drchase@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Run-TryBot: Joel Sing <joel@sing.id.au>
This commit is contained in:
Joel Sing 2023-11-01 01:34:33 +11:00
parent 285ac5a11e
commit cfe36fd122
5 changed files with 37 additions and 9 deletions

View file

@ -804,7 +804,7 @@ func TestG0StackOverflow(t *testing.T) {
if n := strings.Count(string(out), "morestack on g0\n"); n != 1 {
t.Fatalf("%s\n(exit status %v)", out, err)
}
if runtime.GOARCH == "amd64" || runtime.GOARCH == "arm64" {
if runtime.CrashStackImplemented {
// check for a stack trace
want := "runtime.stackOverflow"
if n := strings.Count(string(out), want); n < 5 {