Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
cmd/compile: incorrect liveness information #19078
This bug is not present in release-branch.go1.8 nor earlier versions of Go. It is the root cause for some failures reported on #19029 (but not the ones using Go 1.7.5).
Here's a source file:
The liveness debugging output begins:
Note that in bb 0~r1 has magically become live between the start of the function and the call to newobject. That's wrong. It is not initialized until bb 3.
My guess is this was introduced by Keith's change to the handling of results in liveness bitmaps, but that's just a guess.
Again, not present in Go 1.8rc3, nor in Go 1.7.5. Those correctly delay ~r1 being live until after it is initialized.
referenced this issue
Feb 14, 2017
I thought for a while about a more complicated fix, which was to be more precise about when result slots were live. We'd need to mark every instruction that could panic so we could mark all the result slots as live at each of those points. It is a more precise fix but it is also more complicated and fragile.