]> Cypherpunks repositories - gostls13.git/commitdiff
runtime: error formatting fix
authorAustin Clements <austin@google.com>
Fri, 19 Apr 2019 21:39:11 +0000 (17:39 -0400)
committerAustin Clements <austin@google.com>
Mon, 22 Apr 2019 14:08:47 +0000 (14:08 +0000)
g.m is an muintptr, but we want to print it in hex like a pointer.

Change-Id: Ifc48ed77fb2e93cff7a49d98adc7b9679d26c3b1
Reviewed-on: https://go-review.googlesource.com/c/go/+/172988
Run-TryBot: Austin Clements <austin@google.com>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
src/runtime/proc.go

index 16794e1ab05f74af577db91d36b54f03c7497038..30ddeadff5db142ec0c93b1222c700622551bb10 100644 (file)
@@ -4124,7 +4124,7 @@ func releasep() *p {
        }
        _p_ := _g_.m.p.ptr()
        if _p_.m.ptr() != _g_.m || _p_.mcache != _g_.m.mcache || _p_.status != _Prunning {
-               print("releasep: m=", _g_.m, " m->p=", _g_.m.p.ptr(), " p->m=", _p_.m, " m->mcache=", _g_.m.mcache, " p->mcache=", _p_.mcache, " p->status=", _p_.status, "\n")
+               print("releasep: m=", _g_.m, " m->p=", _g_.m.p.ptr(), " p->m=", hex(_p_.m), " m->mcache=", _g_.m.mcache, " p->mcache=", _p_.mcache, " p->status=", _p_.status, "\n")
                throw("releasep: invalid p state")
        }
        if trace.enabled {