Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
runtime: fix conflict between lfstack and checkptr
lfstack does very unsafe things. In particular, it will not work with nodes that live on the heap. In normal use by the runtime, that is the case (it is only used for gc work bufs). But the lfstack test does use heap objects. It goes through some hoops to prevent premature deallocation, but those hoops are not enough to convince -d=checkptr that everything is ok. Instead, allocate the test objects outside the heap, like the runtime does for all of its lfstack usage. Remove the lifetime workaround from the test. Reported in https://groups.google.com/g/golang-nuts/c/psjrUV2ZKyI Change-Id: If611105eab6c823a4d6c105938ce145ed731781d Reviewed-on: https://go-review.googlesource.com/c/go/+/448899 Reviewed-by: Austin Clements <[email protected]> Reviewed-by: Keith Randall <[email protected]> TryBot-Result: Gopher Robot <[email protected]> Run-TryBot: Keith Randall <[email protected]>
- Loading branch information