diff options
Diffstat (limited to 'src/runtime/export_test.go')
| -rw-r--r-- | src/runtime/export_test.go | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/runtime/export_test.go b/src/runtime/export_test.go index b21179cc8c..89f887b765 100644 --- a/src/runtime/export_test.go +++ b/src/runtime/export_test.go @@ -451,3 +451,24 @@ type G = g func Getg() *G { return getg() } + +//go:noinline +func PanicForTesting(b []byte, i int) byte { + return unexportedPanicForTesting(b, i) +} + +//go:noinline +func unexportedPanicForTesting(b []byte, i int) byte { + return b[i] +} + +func G0StackOverflow() { + systemstack(func() { + stackOverflow(nil) + }) +} + +func stackOverflow(x *byte) { + var buf [256]byte + stackOverflow(&buf[0]) +} |
