Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 9 of 9 for cgoCheckPointer (0.21 sec)

  1. 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)
  2. src/runtime/linkname.go

    import _ "unsafe"
    
    // used in internal/godebug and syscall
    //go:linkname write
    
    // used by cgo
    //go:linkname _cgo_panic_internal
    //go:linkname cgoAlwaysFalse
    //go:linkname cgoUse
    //go:linkname cgoCheckPointer
    //go:linkname cgoCheckResult
    //go:linkname cgoNoCallback
    //go:linkname gobytes
    //go:linkname gostringn
    
    // used in plugin
    //go:linkname doInit
    
    // used in math/bits
    //go:linkname overflowError
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 17:58:53 UTC 2024
    - 778 bytes
    - Viewed (0)
  3. 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)
  4. 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)
  5. 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)
  6. 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)
  7. 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)
  8. src/cmd/cgo/out.go

    `
    
    const goProlog = `
    //go:linkname _cgo_runtime_cgocall runtime.cgocall
    func _cgo_runtime_cgocall(unsafe.Pointer, uintptr) int32
    
    //go:linkname _cgoCheckPointer runtime.cgoCheckPointer
    //go:noescape
    func _cgoCheckPointer(interface{}, interface{})
    
    //go:linkname _cgoCheckResult runtime.cgoCheckResult
    //go:noescape
    func _cgoCheckResult(interface{})
    `
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Mar 29 16:41:10 UTC 2024
    - 59.6K bytes
    - Viewed (0)
  9. 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)
Back to top