diff options
| author | Michael Pratt <mpratt@google.com> | 2024-09-16 15:58:36 -0400 |
|---|---|---|
| committer | Michael Pratt <mpratt@google.com> | 2024-09-17 17:01:20 +0000 |
| commit | 4f881115d4067bda8a236aabcae8c41cdd13b4d0 (patch) | |
| tree | 2249bfaec1950819e5e22184e61e60dcd076ae40 /src/runtime/export_test.go | |
| parent | 41ca2637d4df8b8edf63436c6caab56821d2af38 (diff) | |
| download | go-4f881115d4067bda8a236aabcae8c41cdd13b4d0.tar.xz | |
runtime: move getcallersp to internal/runtime/sys
Moving these intrinsics to a base package enables other internal/runtime
packages to use them.
For #54766.
Change-Id: I45a530422207dd94b5ad4eee51216c9410a84040
Reviewed-on: https://go-review.googlesource.com/c/go/+/613261
Reviewed-by: Cherry Mui <cherryyz@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Diffstat (limited to 'src/runtime/export_test.go')
| -rw-r--r-- | src/runtime/export_test.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/runtime/export_test.go b/src/runtime/export_test.go index e5f571814b..3bde1aea29 100644 --- a/src/runtime/export_test.go +++ b/src/runtime/export_test.go @@ -504,7 +504,7 @@ func LockOSCounts() (external, internal uint32) { //go:noinline func TracebackSystemstack(stk []uintptr, i int) int { if i == 0 { - pc, sp := sys.GetCallerPC(), getcallersp() + pc, sp := sys.GetCallerPC(), sys.GetCallerSP() var u unwinder u.initAt(pc, sp, 0, getg(), unwindJumpStack) // Don't ignore errors, for testing return tracebackPCs(&u, 0, stk) @@ -587,7 +587,7 @@ func unexportedPanicForTesting(b []byte, i int) byte { func G0StackOverflow() { systemstack(func() { g0 := getg() - sp := getcallersp() + sp := sys.GetCallerSP() // The stack bounds for g0 stack is not always precise. // Use an artificially small stack, to trigger a stack overflow // without actually run out of the system stack (which may seg fault). |
