//go:build baremetal || wasip1 || wasm_unknown || wasip2 || nintendoswitch || (!darwin && !linux) package runtime import ( "internal/gclayout" "unsafe" ) // isSecurePtr stub for platforms without the secure allocator. Always returns // false so the runtime comparison path takes the fast (non-constant-time) // branch. On these targets SecureAlloc itself is unavailable; any code that // relies on constant-time compare must either run on a platform with the // secalloc machinery or perform the compare explicitly via // crypto/subtle.ConstantTimeCompare. func isSecurePtr(ptr unsafe.Pointer) bool { return false } // secureAwareByteAlloc stub: secure is always false on these platforms // (isSecurePtr never returns true), so callers will only ever hit the heap // path. Preserved symbol shape so bytesConcat can call it unconditionally. func secureAwareByteAlloc(n uintptr, secure bool) []byte { buf := alloc(n, gclayout.NoPtrs.AsPtr()) return unsafe.Slice((*byte)(buf), n) }