1
0
mirror of https://github.com/golang/go synced 2024-11-19 22:14:43 -07:00

runtime: fix instrumentation of slice append for race detection

R=golang-dev, iant
CC=golang-dev
https://golang.org/cl/6819107
This commit is contained in:
Dmitriy Vyukov 2012-11-08 20:37:05 +04:00
parent ef6806fb13
commit 3f7f030c59

View File

@ -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)