summaryrefslogtreecommitdiff
path: root/src/cmd/gc/builtin.c
diff options
context:
space:
mode:
authorR?my Oudompheng <oudomphe@phare.normalesup.org>2013-06-14 11:14:45 +0200
committerR?my Oudompheng <oudomphe@phare.normalesup.org>2013-06-14 11:14:45 +0200
commitbb665158525bb95362213b246d29ae8a00e9f819 (patch)
tree25efc98e913710b016848493336bad57742c5673 /src/cmd/gc/builtin.c
parentf817b1751f23350f3d1d8d37f813e269cd7631fd (diff)
downloadgo-bb665158525bb95362213b246d29ae8a00e9f819.tar.gz
cmd/gc: instrument arrays properly in race detector.
The previous implementation would only record access to the address of the array but the memory access to the whole memory range must be recorded instead. R=golang-dev, dvyukov, r CC=golang-dev https://codereview.appspot.com/8053044
Diffstat (limited to 'src/cmd/gc/builtin.c')
-rw-r--r--src/cmd/gc/builtin.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/cmd/gc/builtin.c b/src/cmd/gc/builtin.c
index 9053dfe10..baa7d7845 100644
--- a/src/cmd/gc/builtin.c
+++ b/src/cmd/gc/builtin.c
@@ -113,6 +113,8 @@ char *runtimeimport =
"func @\"\".racefuncexit ()\n"
"func @\"\".raceread (? uintptr)\n"
"func @\"\".racewrite (? uintptr)\n"
+ "func @\"\".racereadrange (@\"\".addr·1 uintptr, @\"\".size·2 uintptr)\n"
+ "func @\"\".racewriterange (@\"\".addr·1 uintptr, @\"\".size·2 uintptr)\n"
"\n"
"$$\n";
char *unsafeimport =