Source File
ptr.go
Belonging Package
github.com/tetratelabs/wazero/internal/engine/wazevo/wazevoapi
package wazevoapiimport// PtrFromUintptr resurrects the original *T from the given uintptr.// The caller of this function MUST be sure that ptr is valid.func [ any]( uintptr) * {// Wraps ptrs as the double pointer in order to avoid the unsafe access as detected by race detector.//// For example, if we have (*function)(unsafe.Pointer(ptr)) instead, then the race detector's "checkptr"// subroutine warns as "checkptr: pointer arithmetic result points to invalid allocation"// https://github.com/golang/go/blob/go1.24.0/src/runtime/checkptr.go#L69var *uintptr = &return *(**)(unsafe.Pointer())}
![]() |
The pages are generated with Golds v0.8.2. (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. |