diff options
| author | Dmitriy Vyukov <dvyukov@google.com> | 2012-11-08 20:37:05 +0400 |
|---|---|---|
| committer | Dmitriy Vyukov <dvyukov@google.com> | 2012-11-08 20:37:05 +0400 |
| commit | 3f7f030c5965bbf62ae2cb54f10ea01d2f49e212 (patch) | |
| tree | 501f1d0daae90a73cb86ecf95a2d81b1c04bc3dc /src | |
| parent | ef6806fb13b1db44a57e4f26908803d55ed28e81 (diff) | |
| download | go-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')
| -rw-r--r-- | src/pkg/runtime/slice.c | 2 |
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) |
