New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cmd/compile: regression in writebarrier pass #19179
Comments
CL https://golang.org/cl/37250 mentions this issue. |
Catched with same bit in code with defer. func (bld *DbBuilder) Finish() error {
defer bld.Unlink() // <- here is an error
// ... other code
} Unfortunately, can't build small reproduce case. |
Changeset 37250 doesn't fix for me at the moment.
|
I reduced case to minimal. Looks like removing any line makes it compile package dbfile
import (
"encoding/binary"
)
type DbBuilder struct {
arr []int
}
func (bld *DbBuilder) Finish() error {
defer bld.Finish()
var hash []byte
for _, ixw := range bld.arr {
for {
if ixw != 0 {
return nil
}
ixw--
insertOne:
for {
for i := 0; i < 1; i++ {
if binary.LittleEndian.Uint16(hash[i:]) == 0 {
break insertOne
}
}
}
}
}
return nil
} |
@funny-falcon Thanks for the repro! However, the related values are not touched in the writebarrier pass, and they are in the correct order at that point. Later the tighten pass got something wrong. So it's a different bug. I'll take a look. |
@cherrymui |
@funny-falcon, I filed issue #19217, since it is a different bug, and even apply to Go 1.8. |
@cherrymui, thank you |
c4ef597 caused a regression where the following coder no longer compiles:
It now panics with:
\cc @cherrymui @dr2chase @josharian
The text was updated successfully, but these errors were encountered: