]> Cypherpunks repositories - gostls13.git/commitdiff
runtime: fix offset in invalidptr panic message
authorAustin Clements <austin@google.com>
Mon, 21 Sep 2015 15:49:52 +0000 (11:49 -0400)
committerAustin Clements <austin@google.com>
Tue, 22 Sep 2015 16:55:17 +0000 (16:55 +0000)
Change-Id: I00e1eebbf5e1a01c8fad5ca5324aa8eec1e4d731
Reviewed-on: https://go-review.googlesource.com/14792
Reviewed-by: Rick Hudson <rlh@golang.org>
src/runtime/mbitmap.go

index 6998b14e7a9938124bda00a4b45e7b32440273ce..e7319c10dea098ad6bd76df02eeee7df7831bd10 100644 (file)
@@ -225,7 +225,7 @@ func heapBitsForObject(p, refBase, refOff uintptr) (base uintptr, hbits heapBits
                        }
                        print("idx=", hex(idx), " span.start=", hex(s.start<<_PageShift), " span.limit=", hex(s.limit), " span.state=", s.state, "\n")
                        if refBase != 0 {
-                               print("runtime: found in object at *(", hex(refBase), "+", hex(off), ")\n")
+                               print("runtime: found in object at *(", hex(refBase), "+", hex(refOff), ")\n")
                                gcDumpObject("object", refBase, refOff)
                        }
                        throw("found bad pointer in Go heap (incorrect use of unsafe or cgo?)")