- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 72 for GoBytes (0.19 sec)
-
src/cmd/cgo/internal/testsanitizers/testdata/libfuzzer2.go
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 12 11:59:56 UTC 2023 - 254 bytes - Viewed (0) -
src/cmd/cgo/internal/testsanitizers/testdata/libfuzzer1.go
package main import "C" import "unsafe" //export LLVMFuzzerTestOneInput func LLVMFuzzerTestOneInput(p unsafe.Pointer, sz C.int) C.int { b := C.GoBytes(p, sz) if len(b) >= 6 && b[0] == 'F' && b[1] == 'u' && b[2] == 'z' && b[3] == 'z' && b[4] == 'M' && b[5] == 'e' { panic("found it") } return 0 }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 12 11:59:56 UTC 2023 - 321 bytes - Viewed (0) -
src/runtime/linkname.go
//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 //go:linkname divideError // used in tests //go:linkname extraMInUse
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 29 17:58:53 UTC 2024 - 778 bytes - Viewed (0) -
src/runtime/string.go
} *(*slice)(unsafe.Pointer(&b)) = slice{p, size, int(mem / 4)} return } // used by cmd/cgo func gobytes(p *byte, n int) (b []byte) { if n == 0 { return make([]byte, 0) } if n < 0 || uintptr(n) > maxAlloc { panic(errorString("gobytes: length out of range")) } bp := mallocgc(uintptr(n), nil, false) memmove(bp, unsafe.Pointer(p), uintptr(n))
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 01:17:26 UTC 2024 - 13.4K bytes - Viewed (0) -
src/cmd/compile/internal/staticdata/data.go
info.Name = file info.Size = size } return symdata, size, nil } var slicedataGen int func slicedata(pos src.XPos, s string) *obj.LSym { slicedataGen++ symname := fmt.Sprintf(".gobytes.%d", slicedataGen) lsym := types.LocalPkg.Lookup(symname).LinksymABI(obj.ABI0) off := dstringdata(lsym, 0, s, pos, "slice") objw.Global(lsym, int32(off), obj.NOPTR|obj.LOCAL) return lsym }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Sep 01 15:08:50 UTC 2023 - 10.3K bytes - Viewed (0) -
src/cmd/cgo/out.go
func _Cfunc_GoStringN(p *_Ctype_char, l _Ctype_int) string { return _cgo_runtime_gostringn(p, int(l)) } ` const goBytesDef = ` //go:linkname _cgo_runtime_gobytes runtime.gobytes func _cgo_runtime_gobytes(unsafe.Pointer, int) []byte // GoBytes converts the C data p with explicit length l to a Go []byte. func _Cfunc_GoBytes(p unsafe.Pointer, l _Ctype_int) []byte { return _cgo_runtime_gobytes(p, int(l)) } `
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Mar 29 16:41:10 UTC 2024 - 59.6K bytes - Viewed (0) -
src/cmd/cgo/internal/test/test.go
Name string Got, Want interface{} } var testPairs = []testPair{ {"GoString", C.GoString(C.greeting), greeting}, {"GoStringN", C.GoStringN(C.greeting, 5), greeting[:5]}, {"GoBytes", C.GoBytes(unsafe.Pointer(C.greeting), 5), []byte(greeting[:5])}, } func testHelpers(t *testing.T) { for _, pair := range testPairs { if !reflect.DeepEqual(pair.Got, pair.Want) {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon May 20 15:50:06 UTC 2024 - 48.5K bytes - Viewed (0) -
src/cmd/cgo/doc.go
// C string to Go string func C.GoString(*C.char) string // C data with explicit length to Go string func C.GoStringN(*C.char, C.int) string // C data with explicit length to Go []byte func C.GoBytes(unsafe.Pointer, C.int) []byte As a special case, C.malloc does not call the C library malloc directly but instead calls a Go helper function that wraps the C library malloc
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon May 13 17:12:16 UTC 2024 - 42.2K bytes - Viewed (0) -
platforms/core-execution/hashing/src/test/groovy/org/gradle/internal/hash/HashCodeTest.groovy
"CAFEBABE" | ByteArrayBackedHashCode | 4 | 0xBEBAFECA | toBytes(0xCA, 0xFE, 0xBA, 0xBE) "abbaabba" | ByteArrayBackedHashCode | 4 | 0xBAABBAAB | toBytes([0xAB, 0xBA] * 2) "abbaabbaabba" | ByteArrayBackedHashCode | 6 | 0xBAABBAAB | toBytes([0xAB, 0xBA] * 3)
Registered: Wed Jun 12 18:38:38 UTC 2024 - Last Modified: Fri Sep 22 08:43:29 UTC 2023 - 8.2K bytes - Viewed (0) -
platforms/core-runtime/serialization/src/test/groovy/org/gradle/internal/serialize/DefaultSerializerRegistryTest.groovy
def serializer = registry.build(Number) expect: serialize(123L, serializer) == 123L serialize(123, serializer) == 123 toBytes(123L, serializer).length == toBytes(123L, longSerializer).length + 1 } def "does not write type tag when there is only one matching registered type"() { given: def registry = new DefaultSerializerRegistry()
Registered: Wed Jun 12 18:38:38 UTC 2024 - Last Modified: Mon Apr 15 16:06:56 UTC 2024 - 6.2K bytes - Viewed (0)