Skip to content
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

runtime/race: missed race on []byte #5567

Closed
AlekSi opened this issue May 27, 2013 · 5 comments
Closed

runtime/race: missed race on []byte #5567

AlekSi opened this issue May 27, 2013 · 5 comments

Comments

@AlekSi
Copy link
Contributor

AlekSi commented May 27, 2013

What steps will reproduce the problem?
http://play.golang.org/p/3A5HyhWX3m (see comment on top)

What is the expected output?
Race detector warnings.

What do you see instead?
No warnings.

Which compiler are you using (5g, 6g, 8g, gccgo)?
6g

Which operating system are you using?
Mac OS X 10.8.3

Which version are you using?  (run 'go version')
Both 1.1 and current tip.
@dvyukov
Copy link
Member

dvyukov commented May 27, 2013

Comment 1:

I suspect it's because race detector does not understand that syscall.Read() writes to
the memory.

Labels changed: added racedetector.

Owner changed to @dvyukov.

Status changed to Accepted.

@gopherbot
Copy link

Comment 2 by Lytvynov.A.V:

This might probably be a different but similar issue:
http://play.golang.org/p/WT5NUDVs_r
bytes.Buffer does not use syscall.Read() but it uses builtin copy (so I assume it's some
syscall anyways).
Interestingly, with smaller buffer (100, for example) it does detect the race.

@dvyukov
Copy link
Member

dvyukov commented May 27, 2013

Comment 3:

And this is because 200%4==0

@dvyukov
Copy link
Member

dvyukov commented Jun 6, 2013

Comment 4:

@Lytvynov.A.V
yes, this is a different issue, I've filed:
https://golang.org/issue/5654

@dvyukov
Copy link
Member

dvyukov commented Jun 10, 2013

Comment 5:

This issue was closed by revision fc80764.

Status changed to Fixed.

@golang golang locked and limited conversation to collaborators Jun 24, 2016
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants