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 code generation bug when taking slice[:0] #29502
What version of Go are you using (
@FiloSottile how come we've marked this freshly opened bug for Go1.12 yet it also exists for Go1.11 but also when Go1.12 is just about to be released(at least according to the schedule)? Perhaps we can mark this for backport?
I've bisected this to bdc7d56 on the 1.11 branch.
referenced this issue
Jan 2, 2019
Before the prove pass, we have
where b10 will panic. v10 is constant 0, and v56 is the slice len, which is
i.e. v45 = v31 + 1. This looks correct.
The prove pass derives that v70 (Geq64) is false, therefore unconditionally goes to the panic block.
The prove pass' debug output is below, which looks ok to me until the last line.
I'm not familiar enough with the prove code to tell where it actually does wrong. The "disprove" seems to come from an unsatisfiable condition v63 >= v45, where
So it seems something related to overflow...