Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(1354)

Issue 179030043: code review 179030043: runtime: fix atomic operations on non-heap addresses (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
9 years, 5 months ago by dvyukov
Modified:
9 years, 5 months ago
Reviewers:
gobot, rsc
CC:
rsc, golang-codereviews
Visibility:
Public.

Description

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://codereview.appspot.com/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 issue 9136.

Patch Set 1 #

Patch Set 2 : diff -r 500cb52e08e69d03071a425a8ca659150594f9c7 https://dvyukov%40google.com@code.google.com/p/go/ #

Patch Set 3 : diff -r 500cb52e08e69d03071a425a8ca659150594f9c7 https://dvyukov%40google.com@code.google.com/p/go/ #

Patch Set 4 : diff -r 500cb52e08e69d03071a425a8ca659150594f9c7 https://dvyukov%40google.com@code.google.com/p/go/ #

Patch Set 5 : diff -r 500cb52e08e69d03071a425a8ca659150594f9c7 https://dvyukov%40google.com@code.google.com/p/go/ #

Patch Set 6 : diff -r 500cb52e08e69d03071a425a8ca659150594f9c7 https://dvyukov%40google.com@code.google.com/p/go/ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+73 lines, -13 lines) Patch
M src/runtime/race.c View 1 2 3 3 chunks +6 lines, -7 lines 0 comments Download
A src/runtime/race/race_unix_test.go View 1 2 3 4 1 chunk +30 lines, -0 lines 0 comments Download
M src/runtime/race_amd64.s View 1 2 3 3 chunks +37 lines, -6 lines 0 comments Download

Messages

Total messages: 4
dvyukov
Hello rsc@golang.org (cc: golang-codereviews@googlegroups.com), I'd like you to review this change to https://dvyukov%40google.com@code.google.com/p/go/
9 years, 5 months ago (2014-11-20 11:24:24 UTC) #1
rsc
LGTM Thanks very much for the quick fix.
9 years, 5 months ago (2014-11-20 14:50:40 UTC) #2
rsc
*** Submitted as https://code.google.com/p/go/source/detail?r=e4ab8f908aac *** runtime: fix atomic operations on non-heap addresses Race detector runtime ...
9 years, 5 months ago (2014-11-20 14:51:10 UTC) #3
gobot
9 years, 5 months ago (2014-11-20 15:09:42 UTC) #4
This CL appears to have broken the plan9-386-cnielsen builder.
See http://build.golang.org/log/609ad1b791adc550c010bc17d479b92fad2510e5
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b