aboutsummaryrefslogtreecommitdiff
path: root/src/pkg
diff options
context:
space:
mode:
authorDmitriy Vyukov <dvyukov@google.com>2012-11-08 20:37:05 +0400
committerDmitriy Vyukov <dvyukov@google.com>2012-11-08 20:37:05 +0400
commit3f7f030c5965bbf62ae2cb54f10ea01d2f49e212 (patch)
tree501f1d0daae90a73cb86ecf95a2d81b1c04bc3dc /src/pkg
parentef6806fb13b1db44a57e4f26908803d55ed28e81 (diff)
downloadgo-3f7f030c5965bbf62ae2cb54f10ea01d2f49e212.tar.xz
runtime: fix instrumentation of slice append for race detection
R=golang-dev, iant CC=golang-dev https://golang.org/cl/6819107
Diffstat (limited to 'src/pkg')
-rw-r--r--src/pkg/runtime/slice.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/pkg/runtime/slice.c b/src/pkg/runtime/slice.c
index 3ec44b875f..2f62c4c02d 100644
--- a/src/pkg/runtime/slice.c
+++ b/src/pkg/runtime/slice.c
@@ -86,6 +86,8 @@ runtime·appendslice(SliceType *t, Slice x, Slice y, Slice ret)
runtime·racereadpc(x.array + i*t->elem->size, pc);
for(i=x.len; i<x.cap; i++)
runtime·racewritepc(x.array + i*t->elem->size, pc);
+ for(i=0; i<y.len; i++)
+ runtime·racereadpc(y.array + i*t->elem->size, pc);
}
if(m > x.cap)