github.com/moontrade/unsafe@v0.9.1/cgo/call_libfuzzer.go (about) 1 //go:build libfuzzer && (amd64 || arm64) 2 3 package cgo 4 5 import _ "unsafe" 6 7 // NonBlocking C function fn without going all the way through cgo. 8 // Example: NonBlocking((*byte)(C.my_c_func), 0, 0) 9 // 10 // void my_c_func(size_t arg0, size_t arg1) { 11 // } 12 // 13 //go:noescape 14 //go:nosplit 15 //go:linkname NonBlocking runtime.libfuzzerCall 16 func NonBlocking(fn *byte, arg0, arg1 uintptr) 17 18 func Blocking(fn *byte, arg0, arg1 uintptr) { 19 cgo.Call(fn, arg0, arg1) 20 }