- Sort Score
- Result 10 results
- Languages All
Results 1 - 7 of 7 for cgoCheckPointer (0.31 sec)
-
src/runtime/pinner_test.go
func() { defer assertDidPanic(t) runtime.CgoCheckPointer(p2, nil) }() pinner.Pin(p) runtime.CgoCheckPointer(p2, nil) } func TestPinnerCgoCheckInterface(t *testing.T) { var pinner runtime.Pinner defer pinner.Unpin() var ifc any var o obj ifc = &o p := &ifc assertCgoCheckPanics(t, p) pinner.Pin(&o) runtime.CgoCheckPointer(p, true) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Sep 13 18:36:12 UTC 2023 - 11K bytes - Viewed (0) -
src/runtime/cgocall.go
// cgoCheckPointer will pin the pointer for the duration of the cgo // call. (This is necessary but not sufficient; the cgo program will // also have to change to pin Go pointers that cannot point to Go // pointers.) // cgoCheckPointer checks if the argument contains a Go pointer that // points to an unpinned Go pointer, and panics if it does. func cgoCheckPointer(ptr any, arg any) {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 01:16:47 UTC 2024 - 24.2K bytes - Viewed (0) -
src/crypto/internal/boring/sha.go
// To do that, we call noescape (including via addr). // We must also make sure that the data pointer arguments have the form unsafe.Pointer(&...) // so that cgo does not annotate them with cgoCheckPointer calls. If it did that, it might look // beyond the byte slice and find Go pointers in unprocessed parts of a larger allocation. // To do both of these simultaneously, the idiom is unsafe.Pointer(&*addr(p)),
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Jul 20 17:51:31 UTC 2023 - 16.2K bytes - Viewed (0) -
src/cmd/cgo/internal/testerrors/ptr_test.go
support: `type S34 struct { a [8]byte; p *int; b int64; }`, body: `s := &S34{p: new(int)}; C.f34(unsafe.Pointer(&s.a), 32, unsafe.Pointer(&s.b))`, fail: false, }, { // Test that second argument to cgoCheckPointer is // evaluated when a deferred function is deferred, not // when it is run. name: "defer2", c: `void f35(char **pc) {}`, support: `type S35a struct { s []*C.char }; type S35b struct { ps *S35a }`,
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Aug 03 16:07:49 UTC 2023 - 21.2K bytes - Viewed (0) -
src/runtime/export_test.go
var PhysPageSize = physPageSize var PhysHugePageSize = physHugePageSize var NetpollGenericInit = netpollGenericInit var Memmove = memmove var MemclrNoHeapPointers = memclrNoHeapPointers var CgoCheckPointer = cgoCheckPointer const CrashStackImplemented = crashStackImplemented const TracebackInnerFrames = tracebackInnerFrames const TracebackOuterFrames = tracebackOuterFrames var MapKeys = keys var MapValues = values
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 30 17:50:53 UTC 2024 - 46.1K bytes - Viewed (0) -
src/cmd/compile/internal/types2/issues_test.go
field _Ctype_int } type _Ctype_void [0]byte //go:linkname _cgo_runtime_cgocall runtime.cgocall func _cgo_runtime_cgocall(unsafe.Pointer, uintptr) int32 //go:linkname _cgoCheckPointer runtime.cgoCheckPointer func _cgoCheckPointer(interface{}, interface{}) //go:linkname _cgoCheckResult runtime.cgoCheckResult func _cgoCheckResult(interface{}) `
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 30 19:19:55 UTC 2024 - 28.1K bytes - Viewed (0) -
src/go/types/issues_test.go
field _Ctype_int } type _Ctype_void [0]byte //go:linkname _cgo_runtime_cgocall runtime.cgocall func _cgo_runtime_cgocall(unsafe.Pointer, uintptr) int32 //go:linkname _cgoCheckPointer runtime.cgoCheckPointer func _cgoCheckPointer(interface{}, interface{}) //go:linkname _cgoCheckResult runtime.cgoCheckResult func _cgoCheckResult(interface{}) `
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 30 19:19:55 UTC 2024 - 28.1K bytes - Viewed (0)