]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: fix -m=2 infinite loop in escape.go
authorMatthew Dempsky <mdempsky@google.com>
Tue, 12 Nov 2019 00:45:34 +0000 (16:45 -0800)
committerDavid Chase <drchase@google.com>
Tue, 12 Nov 2019 17:14:12 +0000 (17:14 +0000)
commit07513d208a73fa25d1ee4969adfd0927bbf3ecc4
tree9ffbfb69aacf8a66414142c74e83a57992063b55
parentfc7ee0ba2c9f284ea2d4a37a0c133524e94d88cd
cmd/compile: fix -m=2 infinite loop in escape.go

This CL detects infinite loops due to negative dereference cycles
during escape analysis, and terminates the loop gracefully. We still
fail to print a complete explanation of the escape path, but esc.go
didn't print *any* explanation for these test cases, so the release
blocking issue here is simply that we don't infinite loop.

Updates #35518.

Change-Id: I39beed036e5a685706248852f1fa619af3b7abbc
Reviewed-on: https://go-review.googlesource.com/c/go/+/206619
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: David Chase <drchase@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
src/cmd/compile/internal/gc/escape.go
test/fixedbugs/issue35518.go [new file with mode: 0644]