This has a data race: ``` package main func main() { sl := make([]string, 1) go func () { var x string _ = x for _, x = range sl { } }() sl[0] = "" } ``` but changing the for loop to `for _, _ = range sl {` fixes it. Currently, Goose models both as a data race, because the same `slice.for_range` iterator is used, which requires loading the value of each element. This is a conservative semantics, but makes some programs difficult/impossible to prove (e.g. this is more annoying than necessary https://github.com/goose-lang/goose/blob/c12b8af04edef8ccdee729bbd0149f5161531987/testdata/examples/channel/workq/w.go#L75-L77) (Copied from https://github.com/goose-lang/goose/issues/188.)
This has a data race:
but changing the for loop to
for _, _ = range sl {fixes it. Currently, Goose models both as a data race, because the sameslice.for_rangeiterator is used, which requires loading the value of each element. This is a conservative semantics, but makes some programs difficult/impossible to prove (e.g. this is more annoying than necessary https://github.com/goose-lang/goose/blob/c12b8af04edef8ccdee729bbd0149f5161531987/testdata/examples/channel/workq/w.go#L75-L77)(Copied from goose-lang/goose#188.)