From 1d88f9dd4ddc99c557593007ac4118492d559d05 Mon Sep 17 00:00:00 2001 From: Keith Randall Date: Mon, 8 Sep 2014 15:42:48 -0700 Subject: [PATCH] runtime: note the double-releasem isn't an error. LGTM=bradfitz R=dave, bradfitz CC=golang-codereviews https://golang.org/cl/136390043 --- src/runtime/malloc.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/runtime/malloc.go b/src/runtime/malloc.go index b3c9c1fd78..8181312f17 100644 --- a/src/runtime/malloc.go +++ b/src/runtime/malloc.go @@ -134,6 +134,8 @@ func gomallocgc(size uintptr, typ *_type, flags int) unsafe.Pointer { if mp.curg != nil { mp.curg.stackguard0 = mp.curg.stackguard } + // Note: one releasem for the acquirem just above. + // The other for the acquirem at start of malloc. releasem(mp) releasem(mp) } @@ -309,6 +311,8 @@ marked: if mp.curg != nil { mp.curg.stackguard0 = mp.curg.stackguard } + // Note: one releasem for the acquirem just above. + // The other for the acquirem at start of malloc. releasem(mp) releasem(mp) } -- 2.50.0