• Russ Cox's avatar
    cmd/gc: fix escape analysis · 572d984e
    Russ Cox authored
    If the analysis reached a node twice, then the analysis was cut off.
    However, if the second arrival is at a lower depth (closer to escaping)
    then it is important to repeat the traversal.
    
    The repeating must be cut off at some point to avoid the occasional
    infinite recursion. This CL cuts it off as soon as possible while still
    passing all tests.
    
    Fixes #4751.
    
    R=ken2
    CC=golang-dev, lvd
    https://golang.org/cl/7303043
    572d984e
escape2.go 24 KB