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
runtime/race: atomic operations fail on non-heap addresess #9136
Labels
Milestone
Comments
Comment 1 by szamcsi@google.com: I also have a simple program that fails with -race: $ cat x.go package main import "fmt" func main() { a := []string{"a"} i := 0 a[i], a[len(a)-1], a = a[len(a)-1], "", a[:len(a)-1] fmt.Println(a) } $ go run x.go panic: runtime error: index out of range ... |
Moved this to https://golang.org/issue/9137 Thanks for the report! |
CL https://golang.org/cl/179030043 mentions this issue. |
This issue was closed by revision 2b3f379. Status changed to Fixed. |
rsc
added a commit
that referenced
this issue
May 11, 2015
…resses ««« CL 179030043 / e4ab8f908aac runtime: fix atomic operations on non-heap addresses Race detector runtime does not tolerate operations on addresses that was not previously declared with __tsan_map_shadow (namely, data, bss and heap). The corresponding address checks for atomic operations were removed in https://golang.org/cl/111310044 Restore these checks. It's tricker than just not calling into race runtime, because it is the race runtime that makes the atomic operations themselves (if we do not call into race runtime we skip the atomic operation itself as well). So instead we call __tsan_go_ignore_sync_start/end around the atomic operation. This forces race runtime to skip all other processing except than doing the atomic operation itself. Fixes #9136. LGTM=rsc R=rsc CC=golang-codereviews https://golang.org/cl/179030043 »»» TBR=dvyukov CC=golang-codereviews https://golang.org/cl/180030043
wheatman
pushed a commit
to wheatman/go-akaros
that referenced
this issue
Jun 25, 2018
…resses ««« CL 179030043 / e4ab8f908aac runtime: fix atomic operations on non-heap addresses Race detector runtime does not tolerate operations on addresses that was not previously declared with __tsan_map_shadow (namely, data, bss and heap). The corresponding address checks for atomic operations were removed in https://golang.org/cl/111310044 Restore these checks. It's tricker than just not calling into race runtime, because it is the race runtime that makes the atomic operations themselves (if we do not call into race runtime we skip the atomic operation itself as well). So instead we call __tsan_go_ignore_sync_start/end around the atomic operation. This forces race runtime to skip all other processing except than doing the atomic operation itself. Fixes golang#9136. LGTM=rsc R=rsc CC=golang-codereviews https://golang.org/cl/179030043 »»» TBR=dvyukov CC=golang-codereviews https://golang.org/cl/180030043
wheatman
pushed a commit
to wheatman/go-akaros
that referenced
this issue
Jun 26, 2018
…resses ««« CL 179030043 / e4ab8f908aac runtime: fix atomic operations on non-heap addresses Race detector runtime does not tolerate operations on addresses that was not previously declared with __tsan_map_shadow (namely, data, bss and heap). The corresponding address checks for atomic operations were removed in https://golang.org/cl/111310044 Restore these checks. It's tricker than just not calling into race runtime, because it is the race runtime that makes the atomic operations themselves (if we do not call into race runtime we skip the atomic operation itself as well). So instead we call __tsan_go_ignore_sync_start/end around the atomic operation. This forces race runtime to skip all other processing except than doing the atomic operation itself. Fixes golang#9136. LGTM=rsc R=rsc CC=golang-codereviews https://golang.org/cl/179030043 »»» TBR=dvyukov CC=golang-codereviews https://golang.org/cl/180030043
wheatman
pushed a commit
to wheatman/go-akaros
that referenced
this issue
Jul 9, 2018
…resses ««« CL 179030043 / e4ab8f908aac runtime: fix atomic operations on non-heap addresses Race detector runtime does not tolerate operations on addresses that was not previously declared with __tsan_map_shadow (namely, data, bss and heap). The corresponding address checks for atomic operations were removed in https://golang.org/cl/111310044 Restore these checks. It's tricker than just not calling into race runtime, because it is the race runtime that makes the atomic operations themselves (if we do not call into race runtime we skip the atomic operation itself as well). So instead we call __tsan_go_ignore_sync_start/end around the atomic operation. This forces race runtime to skip all other processing except than doing the atomic operation itself. Fixes golang#9136. LGTM=rsc R=rsc CC=golang-codereviews https://golang.org/cl/179030043 »»» TBR=dvyukov CC=golang-codereviews https://golang.org/cl/180030043
wheatman
pushed a commit
to wheatman/go-akaros
that referenced
this issue
Jul 20, 2018
…resses ««« CL 179030043 / e4ab8f908aac runtime: fix atomic operations on non-heap addresses Race detector runtime does not tolerate operations on addresses that was not previously declared with __tsan_map_shadow (namely, data, bss and heap). The corresponding address checks for atomic operations were removed in https://golang.org/cl/111310044 Restore these checks. It's tricker than just not calling into race runtime, because it is the race runtime that makes the atomic operations themselves (if we do not call into race runtime we skip the atomic operation itself as well). So instead we call __tsan_go_ignore_sync_start/end around the atomic operation. This forces race runtime to skip all other processing except than doing the atomic operation itself. Fixes golang#9136. LGTM=rsc R=rsc CC=golang-codereviews https://golang.org/cl/179030043 »»» TBR=dvyukov CC=golang-codereviews https://golang.org/cl/180030043
wheatman
pushed a commit
to wheatman/go-akaros
that referenced
this issue
Jul 30, 2018
…resses ««« CL 179030043 / e4ab8f908aac runtime: fix atomic operations on non-heap addresses Race detector runtime does not tolerate operations on addresses that was not previously declared with __tsan_map_shadow (namely, data, bss and heap). The corresponding address checks for atomic operations were removed in https://golang.org/cl/111310044 Restore these checks. It's tricker than just not calling into race runtime, because it is the race runtime that makes the atomic operations themselves (if we do not call into race runtime we skip the atomic operation itself as well). So instead we call __tsan_go_ignore_sync_start/end around the atomic operation. This forces race runtime to skip all other processing except than doing the atomic operation itself. Fixes golang#9136. LGTM=rsc R=rsc CC=golang-codereviews https://golang.org/cl/179030043 »»» TBR=dvyukov CC=golang-codereviews https://golang.org/cl/180030043
This issue was closed.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
The text was updated successfully, but these errors were encountered: