]> Cypherpunks repositories - gostls13.git/commitdiff
runtime: improve message when a bad pointer is found on the stack
authorAustin Clements <austin@google.com>
Fri, 2 Sep 2016 16:14:38 +0000 (12:14 -0400)
committerAustin Clements <austin@google.com>
Fri, 2 Sep 2016 17:04:37 +0000 (17:04 +0000)
Currently this message says "invalid stack pointer", which could be
interpreted as the value of SP being invalid. Change it to "invalid
pointer found on stack" to emphasize that it's a pointer on the stack
that's invalid.

Updates #16948.

Change-Id: I753624f8cc7e08cf13d3ea5d9c790cc4af9fa372
Reviewed-on: https://go-review.googlesource.com/28430
Run-TryBot: Austin Clements <austin@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com>
src/runtime/stack.go

index 9528405c9699c7f5496fd7a41222cda39260e127..d022b8274b942cc7ab388afba6f5c8dce9e24d13 100644 (file)
@@ -598,7 +598,7 @@ func adjustpointers(scanp unsafe.Pointer, cbv *bitvector, adjinfo *adjustinfo, f
                                // Live analysis wrong?
                                getg().m.traceback = 2
                                print("runtime: bad pointer in frame ", funcname(f), " at ", pp, ": ", hex(p), "\n")
-                               throw("invalid stack pointer")
+                               throw("invalid pointer found on stack")
                        }
                        if minp <= p && p < maxp {
                                if stackDebug >= 3 {