- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 29 for CheckPtr (0.13 sec)
-
src/runtime/checkptr.go
if elem.Pointers() && uintptr(p)&(uintptr(elem.Align_)-1) != 0 { throw("checkptr: misaligned pointer conversion") } // Check that (*[n]elem)(p) doesn't straddle multiple heap objects. // TODO(mdempsky): Fix #46938 so we don't need to worry about overflow here. if checkptrStraddles(p, n*elem.Size_) { throw("checkptr: converted pointer straddles multiple allocations") } }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 00:18:55 UTC 2024 - 3.6K bytes - Viewed (0) -
src/runtime/testdata/testprog/checkptr.go
cuiweixie <******@****.***> 1660643533 +0800
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Aug 31 17:15:15 UTC 2022 - 2.4K bytes - Viewed (0) -
src/runtime/checkptr_test.go
}{ {"CheckPtrAlignmentPtr", "fatal error: checkptr: misaligned pointer conversion\n"}, {"CheckPtrAlignmentNoPtr", ""}, {"CheckPtrAlignmentNilPtr", ""}, {"CheckPtrArithmetic", "fatal error: checkptr: pointer arithmetic result points to invalid allocation\n"}, {"CheckPtrArithmetic2", "fatal error: checkptr: pointer arithmetic result points to invalid allocation\n"}, {"CheckPtrSize", "fatal error: checkptr: converted pointer straddles multiple allocations\n"},
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Aug 31 17:15:15 UTC 2022 - 2.9K bytes - Viewed (0) -
src/cmd/compile/internal/ssa/nilcheck_test.go
If("bool1", "b1", "b2")), Bloc("b1", Valu("ptr1", OpAddr, ptrType, 0, nil, "sb"), Goto("checkPtr")), Bloc("b2", Valu("ptr2", OpAddr, ptrType, 0, nil, "sb"), Goto("checkPtr")), // both ptr1 and ptr2 are guaranteed non-nil here Bloc("checkPtr", Valu("phi", OpPhi, ptrType, 0, nil, "ptr1", "ptr2"), Valu("bool2", OpIsNonNil, c.config.Types.Bool, 0, nil, "phi"),
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Nov 17 23:34:11 UTC 2023 - 12.3K bytes - Viewed (0) -
src/cmd/compile/internal/ssa/fuse_test.go
c := testConfig(t) ptrType := c.config.Types.BytePtr fun := c.Fun("entry", Bloc("entry", Valu("mem", OpInitMem, types.TypeMem, 0, nil), Valu("sb", OpSB, c.config.Types.Uintptr, 0, nil), Goto("checkPtr")), Bloc("checkPtr", Valu("ptr1", OpLoad, ptrType, 0, nil, "sb", "mem"), Valu("nilptr", OpConstNil, ptrType, 0, nil), Valu("bool1", OpNeqPtr, c.config.Types.Bool, 0, nil, "ptr1", "nilptr"), If("bool1", "then", "exit")),
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Oct 31 20:45:54 UTC 2023 - 7.4K bytes - Viewed (0) -
test/fixedbugs/issue35073a.go
// run -gcflags=-d=checkptr // Copyright 2020 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // Test that reflect.Value.UnsafeAddr/Pointer is handled // correctly by -d=checkptr package main import ( "reflect" "unsafe" ) func main() { n := 10 m := make(map[string]string)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Nov 20 15:12:49 UTC 2023 - 497 bytes - Viewed (0) -
test/fixedbugs/bug513.go
// run -race -gcflags=all=-d=checkptr=0 //go:build ((linux && amd64) || (linux && ppc64le) || (darwin && amd64) || (freebsd && amd64) || (netbsd && amd64) || (windows && amd64)) && cgo // Copyright 2021 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // Although -race turns on -d=checkptr, the explicit -d=checkptr=0 // should override it. package main
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Oct 19 23:33:25 UTC 2023 - 596 bytes - Viewed (0) -
src/internal/unsafeheader/unsafeheader_test.go
// // This test is expected to fail under -race (which implicitly enables // -d=checkptr) if the runtime views the header types as incompatible with the // underlying built-in types. func TestWriteThroughHeader(t *testing.T) { t.Run("Slice", func(t *testing.T) { s := []byte("Hello, checkptr!")[:5] var alias []byte hdr := (*unsafeheader.Slice)(unsafe.Pointer(&alias)) hdr.Data = unsafe.Pointer(&s[0])
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Dec 13 18:45:54 UTC 2021 - 2.9K bytes - Viewed (0) -
test/fixedbugs/issue34968.go
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Oct 19 23:33:25 UTC 2023 - 289 bytes - Viewed (0) -
test/fixedbugs/issue35073b.go
// errorcheck -0 -d=checkptr -m // Copyright 2020 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // Test that we can inline the receiver arguments for // reflect.Value.UnsafeAddr/Pointer, even in checkptr mode. package main import ( "reflect" "unsafe" ) func main() { n := 10 // ERROR "moved to heap: n"
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Nov 20 15:12:49 UTC 2023 - 706 bytes - Viewed (0)