Source file src/runtime/tracebackx_test.go

     1  // Copyright 2023 The Go Authors. All rights reserved.
     2  // Use of this source code is governed by a BSD-style
     3  // license that can be found in the LICENSE file.
     4  
     5  package runtime
     6  
     7  func XTestSPWrite(t TestingT) {
     8  	// Test that we can traceback from the stack check prologue of a function
     9  	// that writes to SP. See #62326.
    10  
    11  	// Start a goroutine to minimize the initial stack and ensure we grow the stack.
    12  	done := make(chan bool)
    13  	go func() {
    14  		testSPWrite() // Defined in assembly
    15  		done <- true
    16  	}()
    17  	<-done
    18  }
    19  

View as plain text