diff options
| author | Cuong Manh Le <cuong.manhle.vn@gmail.com> | 2025-07-29 18:45:23 +0700 |
|---|---|---|
| committer | Gopher Robot <gobot@golang.org> | 2025-08-05 08:28:50 -0700 |
| commit | 5ab9f23977694ab87614fd30e081d294eb313efd (patch) | |
| tree | 3702479ac75143397f09baa0c3fcdfa63231f146 /src/runtime/checkptr_test.go | |
| parent | fcc036f03b07e58f76ed94bc9a9483ddef96f81c (diff) | |
| download | go-5ab9f23977694ab87614fd30e081d294eb313efd.tar.xz | |
cmd/compile, runtime: add checkptr instrumentation for unsafe.Add
Fixes #74431
Change-Id: Id651ea0b82599ccaff8816af0a56ddbb149b6f89
Reviewed-on: https://go-review.googlesource.com/c/go/+/692015
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Keith Randall <khr@golang.org>
Auto-Submit: Cuong Manh Le <cuong.manhle.vn@gmail.com>
Reviewed-by: Keith Randall <khr@google.com>
Reviewed-by: t hepudds <thepudds1460@gmail.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Diffstat (limited to 'src/runtime/checkptr_test.go')
| -rw-r--r-- | src/runtime/checkptr_test.go | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/runtime/checkptr_test.go b/src/runtime/checkptr_test.go index 811c0f0355..119708be7f 100644 --- a/src/runtime/checkptr_test.go +++ b/src/runtime/checkptr_test.go @@ -35,6 +35,7 @@ func TestCheckPtr(t *testing.T) { {"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"}, + {"CheckPtrArithmeticUnsafeAdd", "fatal error: checkptr: pointer arithmetic result points to invalid allocation\n"}, {"CheckPtrSize", "fatal error: checkptr: converted pointer straddles multiple allocations\n"}, {"CheckPtrSmall", "fatal error: checkptr: pointer arithmetic computed bad pointer value\n"}, {"CheckPtrSliceOK", ""}, |
