mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
cmd/compile: ignore contentEscapes for marking nodes as escaping
We can still stack allocate and VarKill nodes which don't escape but their content does. Fixes #16996 Change-Id: If8aa0fcf2c327b4cb880a3d5af8d213289e6f6bf Reviewed-on: https://go-review.googlesource.com/28575 Run-TryBot: Keith Randall <khr@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: David Chase <drchase@google.com>
This commit is contained in:
parent
a6edffb286
commit
923a74ce77
3 changed files with 19 additions and 1 deletions
|
|
@ -1572,7 +1572,7 @@ func esccall(e *EscState, n *Node, up *Node) {
|
|||
}
|
||||
|
||||
if haspointers(t.Type) {
|
||||
if escassignfromtag(e, note, nE.Escretval, src) == EscNone && up.Op != ODEFER && up.Op != OPROC {
|
||||
if escassignfromtag(e, note, nE.Escretval, src)&EscMask == EscNone && up.Op != ODEFER && up.Op != OPROC {
|
||||
a := src
|
||||
for a.Op == OCONVNOP {
|
||||
a = a.Left
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue