aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/lfstack.go
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2014-11-24 12:07:11 -0500
committerRuss Cox <rsc@golang.org>2014-11-24 12:07:11 -0500
commitb8540fc28867623b23c23e97108a6e975e8a49e7 (patch)
treee5c56e6595f5ebf90fc796a7699e53da94076c84 /src/runtime/lfstack.go
parent273507aa8f17b2b619934ae63c99a2e31a4df5e2 (diff)
parenta236804c764c9aa1fb293c24be9c571de5795d05 (diff)
downloadgo-b8540fc28867623b23c23e97108a6e975e8a49e7.tar.gz
go-b8540fc28867623b23c23e97108a6e975e8a49e7.zip
[dev.garbage] all: merge dev.cc (493ad916c3b1) into dev.garbage
TBR=austin CC=golang-codereviews https://golang.org/cl/179290043
Diffstat (limited to 'src/runtime/lfstack.go')
-rw-r--r--src/runtime/lfstack.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/runtime/lfstack.go b/src/runtime/lfstack.go
index a4ad8a10c6..fd3325972a 100644
--- a/src/runtime/lfstack.go
+++ b/src/runtime/lfstack.go
@@ -12,6 +12,10 @@ import "unsafe"
func lfstackpush(head *uint64, node *lfnode) {
node.pushcnt++
new := lfstackPack(node, node.pushcnt)
+ if node1, _ := lfstackUnpack(new); node1 != node {
+ println("runtime: lfstackpush invalid packing: node=", node, " cnt=", hex(node.pushcnt), " packed=", hex(new), " -> node=", node1, "\n")
+ gothrow("lfstackpush")
+ }
for {
old := atomicload64(head)
node.next = old