gocore: add missing append in root piece construction
Currently when constructing a Root from a stack variable, we compute all
the pieces of the stack variable, and intend to store those pieces along
with the root. Except, the code is currently buggy and doesn't actually
append to the slice of pieces. Oops. Add in the append, which suddenly
makes a whole bunch of stack variables visible.
Change-Id: I0ae7577aa3959f72c0641711aa3799b3708447a0
Reviewed-on: https://go-review.googlesource.com/c/debug/+/659336
Auto-Submit: Michael Knyszek <mknyszek@google.com>
Commit-Queue: Michael Knyszek <mknyszek@google.com>
Reviewed-by: Nicolas Hillegeer <aktau@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
diff --git a/internal/gocore/process.go b/internal/gocore/process.go
index 5080b8c..e01480e 100644
--- a/internal/gocore/process.go
+++ b/internal/gocore/process.go
@@ -766,6 +766,7 @@
rp.value = p.Val
}
off += int64(p.Size)
+ rps = append(rps, rp)
}
f.roots = append(f.roots, p.makeCompositeRoot(v.name, v.typ, f, rps))
} else if addr != 0 && len(pieces) == 0 {