Descriptionruntime: 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/ #
MessagesTotal messages: 4
|