From f75af8c1464e948b5e166cf5ab09ebf0d82fc253 Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Mon, 27 Jul 2020 22:27:54 -0700 Subject: libgo: update to go1.15rc1 Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/245157 --- libgo/go/runtime/checkptr.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'libgo/go/runtime/checkptr.go') diff --git a/libgo/go/runtime/checkptr.go b/libgo/go/runtime/checkptr.go index d5f116c..e52f7df 100644 --- a/libgo/go/runtime/checkptr.go +++ b/libgo/go/runtime/checkptr.go @@ -14,18 +14,18 @@ func checkptrAlignment(p unsafe.Pointer, elem *_type, n uintptr) { // no pointers themselves. See issue 37298. // TODO(mdempsky): What about fieldAlign? if elem.ptrdata != 0 && uintptr(p)&(uintptr(elem.align)-1) != 0 { - throw("checkptr: unsafe pointer conversion") + throw("checkptr: misaligned pointer conversion") } // Check that (*[n]elem)(p) doesn't straddle multiple heap objects. if size := n * elem.size; size > 1 && checkptrBase(p) != checkptrBase(add(p, size-1)) { - throw("checkptr: unsafe pointer conversion") + throw("checkptr: converted pointer straddles multiple allocations") } } func checkptrArithmetic(p unsafe.Pointer, originals []unsafe.Pointer) { if 0 < uintptr(p) && uintptr(p) < minLegalPointer { - throw("checkptr: unsafe pointer arithmetic") + throw("checkptr: pointer arithmetic computed bad pointer value") } // Check that if the computed pointer p points into a heap @@ -42,7 +42,7 @@ func checkptrArithmetic(p unsafe.Pointer, originals []unsafe.Pointer) { } } - throw("checkptr: unsafe pointer arithmetic") + throw("checkptr: pointer arithmetic result points to invalid allocation") } // checkptrBase returns the base address for the allocation containing -- cgit v1.1