]> Cypherpunks repositories - gostls13.git/commit
runtime: adjust malloc race instrumentation for tiny allocs
authorDmitriy Vyukov <dvyukov@google.com>
Tue, 28 Jan 2014 18:34:32 +0000 (22:34 +0400)
committerDmitriy Vyukov <dvyukov@google.com>
Tue, 28 Jan 2014 18:34:32 +0000 (22:34 +0400)
commitce884036d2199ebec22e4f9200789a532a1225d1
treea1825de16c6d303c71eda56d3f51f635fb7d6858
parentc88a6719255f5dc8c85b367eaf9569f171e73b56
runtime: adjust malloc race instrumentation for tiny allocs
Tiny alloc memory block is shared by different goroutines running on the same thread.
We call racemalloc after enabling preemption in mallocgc,
as the result another goroutine can act on not yet race-cleared tiny block.
Call racemalloc before enabling preemption.
Fixes #7224.

LGTM=dave
R=golang-codereviews, dave
CC=golang-codereviews
https://golang.org/cl/57730043
src/pkg/runtime/malloc.goc
src/pkg/runtime/race/testdata/mop_test.go