Source File
stubs.go
Belonging Package
runtime/secret
// Copyright 2025 The Go Authors. All rights reserved.// Use of this source code is governed by a BSD-style// license that can be found in the LICENSE file.//go:build goexperiment.runtimesecret && (arm64 || amd64)// testing stubs, these are implemented in assembly in// asm_$GOARCH.s//// Note that this file is also used as a template to build a// crashing binary that tries to leave secrets in places where// they are supposed to be erased. see crash_test.go for more infopackage secretimport// Load data from p into test registers.////go:noescapefunc loadRegisters( unsafe.Pointer)// Spill data from test registers into p.// Returns the amount of space filled in.////go:noescapefunc spillRegisters( unsafe.Pointer) uintptr// Load secret into all registers.////go:noescapefunc useSecret( []byte)// callback from assemblyfunc delay() {sleep(1_000_000)}// linknamed to avoid package importing time// for just testing code////go:linkname sleep time.Sleepfunc sleep(int64)
![]() |
The pages are generated with Golds v0.8.3-preview. (GOOS=linux GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @zigo_101 (reachable from the left QR code) to get the latest news of Golds. |