]> Cypherpunks repositories - gostls13.git/commit
test: add escape regress tests for runtime and sync atomics
authorMatthew Dempsky <mdempsky@google.com>
Tue, 16 Apr 2019 23:32:26 +0000 (16:32 -0700)
committerMatthew Dempsky <mdempsky@google.com>
Wed, 17 Apr 2019 16:36:30 +0000 (16:36 +0000)
commit52d9ce89ef71d95a4ce5f1a92155bb0c0b811957
tree4692a7760f3d15add410155b6c361eb0d876f127
parent755b50952c9571202322bf63a42254ea8ea5655c
test: add escape regress tests for runtime and sync atomics

There weren't any tests to make sure these work correctly, and this
led to escape analysis regressions in both linux/s390x and js/wasm.

The underlying issue that cmd/compile is only getting some of these
correct because escape analysis doesn't understand //go:linkname is
still present, but at least this addresses the fragility aspect.

Updates #15283.

Change-Id: I546aee1899d098b2e3de45e9b33c3ca22de485f8
Reviewed-on: https://go-review.googlesource.com/c/go/+/172420
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Austin Clements <austin@google.com>
test/escape_runtime_atomic.go [new file with mode: 0644]
test/escape_sync_atomic.go [new file with mode: 0644]