go/src/runtime/traceback_test.go

// Test traceback printing of inlined frames.
func TestTracebackInlined(t *testing.T) {}

type ttiResult

//go:noinline
func ttiLeaf() *ttiResult {}

//go:noinline
func ttiSimple1() *ttiResult {}

func ttiSimple2() *ttiResult {}

func ttiSimple3() *ttiResult {}

//go:noinline
func ttiSigpanic1() (res *ttiResult) {}

func ttiSigpanic2() {}

func ttiSigpanic3() {}

var alwaysTrue

//go:noinline
func ttiWrapper1() *ttiResult {}

type ttiWrapper

func (w ttiWrapper) m1() *ttiResult {}

//go:noinline
func ttiExcluded1() *ttiResult {}

// ttiExcluded2 should be excluded from tracebacks. There are
// various ways this could come up. Linking it to a "runtime." name is
// rather synthetic, but it's easy and reliable. See issue #42754 for
// one way this happened in real code.
//
//go:linkname ttiExcluded2 runtime.ttiExcluded2
//go:noinline
func ttiExcluded2() *ttiResult {}

func ttiExcluded3() *ttiResult {}

var testTracebackArgsBuf

func TestTracebackElision(t *testing.T) {}

// tteStack creates a stack of n logical frames and sends the traceback to
// stack. It cycles through 5 logical frames per physical frame to make it
// unlikely that any part of the traceback will end on a physical boundary.
func tteStack(n int, stack chan<- string) {}

func tte0(n int) string {}

func tte1(n int) string {}

func tte2(n int) string {}

func tte3(n int) string {}

func tte4(n int) string {}

func TestTracebackArgs(t *testing.T) {}

//go:noinline
func testTracebackArgs1(a, b, c, d, e int) int {}

//go:noinline
func testTracebackArgs2(a bool, b struct {}

//go:noinline
//go:registerparams
func testTracebackArgs3(x [3]byte, a, b, c int, y [3]byte) int {}

//go:noinline
func testTracebackArgs4(a bool, x [1][1][1][1][1][1][1][1][1][1]int) int {}

//go:noinline
func testTracebackArgs5(a bool, x struct {}

//go:noinline
func testTracebackArgs6a(a, b, c, d, e, f, g, h, i, j int) int {}

//go:noinline
func testTracebackArgs6b(a, b, c, d, e, f, g, h, i, j, k int) int {}

//go:noinline
func testTracebackArgs7a(a [10]int) int {}

//go:noinline
func testTracebackArgs7b(a [11]int) int {}

//go:noinline
func testTracebackArgs7c(a [10]int, b int) int {}

//go:noinline
func testTracebackArgs7d(a [11]int, b int) int {}

type testArgsType8a

type testArgsType8b

type testArgsType8c

type testArgsType8d

//go:noinline
func testTracebackArgs8a(a testArgsType8a) int {}

//go:noinline
func testTracebackArgs8b(a testArgsType8b) int {}

//go:noinline
func testTracebackArgs8c(a testArgsType8c) int {}

//go:noinline
func testTracebackArgs8d(a testArgsType8d) int {}

// nosplit to avoid preemption or morestack spilling registers.
//
//go:nosplit
//go:noinline
func testTracebackArgs9(a int64, b int32, c int16, d int8, x [2]int, y int) int {}

// nosplit to avoid preemption or morestack spilling registers.
//
//go:nosplit
//go:noinline
func testTracebackArgs10(a, b, c, d, e int32) int {}

// norace to avoid race instrumentation changing spill locations.
// nosplit to avoid preemption or morestack spilling registers.
//
//go:norace
//go:nosplit
//go:noinline
func testTracebackArgs11a(a, b, c int32) int {}

// norace to avoid race instrumentation changing spill locations.
// nosplit to avoid preemption or morestack spilling registers.
//
//go:norace
//go:nosplit
//go:noinline
func testTracebackArgs11b(a, b, c, d int32) int {}

// norace to avoid race instrumentation changing spill locations.
// nosplit to avoid preemption or morestack spilling registers.
//
//go:norace
//go:nosplit
//go:noinline
func testTracebackArgsSlice(a []int) int {}

var testTracebackArgsSliceBackingStore

// Poison the arg area with deterministic values.
//
//go:noinline
func poisonStack() [20]int {}

func TestTracebackParentChildGoroutines(t *testing.T) {}

type traceback

type tbFrame

// parseTraceback parses a printed traceback to make it easier for tests to
// check the result.
func parseTraceback(t *testing.T, tb string) []*traceback {}

// parseTraceback1 is like parseTraceback, but expects tb to contain exactly one
// goroutine.
func parseTraceback1(t *testing.T, tb string) *traceback {}

//go:noinline
func testTracebackGenericFn[T any](buf []byte) int {}

func testTracebackGenericFnInlined[T any](buf []byte) int {}

type testTracebackGenericTyp

//go:noinline
func (t testTracebackGenericTyp[P]) M(buf []byte) int {}

func (t testTracebackGenericTyp[P]) Inlined(buf []byte) int {}

func TestTracebackGeneric(t *testing.T) {}