Skip to content

runtime/race: doesn't support sync.Pool #17306

@pascaldekloe

Description

@pascaldekloe

The sync.Pool is disabled when the race detector is active with issue #7203. Accidental reuse of data after pool submissions is not unheard of.

What version of Go are you using (go version)?

go version devel +03a1dc3 Wed Sep 28 23:13:53 2016 +0000 darwin/amd64

What operating system and processor architecture are you using (go env)?

GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/pdekloe/repo/colfer"
GORACE=""
GOROOT="/Users/pdekloe/repo/go"
GOTOOLDIR="/Users/pdekloe/repo/go/pkg/tool/darwin_amd64"
CC="clang"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/sz/9wzvxsb57p73r4099d6_5zgr39574r/T/go-build242286039=/tmp/go-build -gno-record-gcc-switches -fno-common"
CXX="clang++"
CGO_ENABLED="1"

What did you do?

Cause a race condition by leaking data that was submitted into sync.Pool for reuse.

What did you expect to see?

A race detection.

What did you see instead?

My bug.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions