]> Cypherpunks.ru repositories - gostls13.git/blobdiff - src/runtime/lfstack.go
[dev.garbage] all: merge dev.cc (493ad916c3b1) into dev.garbage
[gostls13.git] / src / runtime / lfstack.go
index a4ad8a10c69584aa3d4f2408757a00bbed4879c7..fd3325972a855fb4bd965765db316ce53f615c7a 100644 (file)
@@ -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