New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
concurrent map delete and read not panic, read got key of default value #17922
Comments
This is fixed in tip, https://go-review.googlesource.com/c/24749/ (treating iteration as read) |
@randall77, Thanks for your reply! |
Don't forget this part
If in doubt, run your code under the race detector. On Tue, Nov 15, 2016 at 5:53 PM, Caspian notifications@github.com wrote:
|
@davecheney,OK,thanks very much! |
And it never will. It will be in Go 1.8 and later. |
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (
go version
)?go version go1.7.3 linux/amd64
What operating system and processor architecture are you using (
go env
)?GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/opt/go_3rdparty"
GORACE=""
GOROOT="/opt/go"
GOTOOLDIR="/opt/go/pkg/tool/linux_amd64"
CC="gcc"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build972690274=/tmp/go-build -gno-record-gcc-switches"
CXX="g++"
CGO_ENABLED="1"
What did you do?
If possible, provide a recipe for reproducing the error.
A complete runnable program is good.
A link on play.golang.org is best.
concurrent map delete and read should panic, but it didn't panic and then read success with key of default value !
This is the test code:
What did you expect to see?
panic info like this:
fatal error: concurrent map read and map write
What did you see instead?
The text was updated successfully, but these errors were encountered: