You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The test starts server and after that sets testHookOnConn. It is OK since curl is not started yet, but race detector does not see the synchronization behind starting curl and accepting a new connection. Can you just move setup of testHookOnConn above start of the server? It should get rid of the race. Can't test it as it requires some docker magic that does not work on my machine.
However, there seems to be a false negative there. If race detector sees a race here:
var gotConn int32
testHookOnConn = func() { atomic.StoreInt32(&gotConn, 1) }
then it probably should also see a race on testHookOnConn var.
Are you sure you don't see a race on testHookOnConn?
Race detector has similar tests and races on func vars are reported. I've modeled what [race detector thinks] happens in the test, and it detects races on both x and testf:
I'm seeing what appears to be a false positive in the race detector on Linux in the x/net/http2 tests:
Except those two write lines, 2227 and 2228 are:
Is the implicit zeroing of that variable counting as a write?
The only reference to that variable is at the end of the test:
/cc @randall77
The text was updated successfully, but these errors were encountered: