-
Notifications
You must be signed in to change notification settings - Fork 18k
cmd/compile: race detector mishandles OBLOCK nodes #9137
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
Comments
Comment 2 by szamcsi@google.com: Sorry, I should have added that it was failing in 1.4rc1 and it was working with 1.3.3 |
The racewalk gets this as its input BLOCK Because the first op in the block is a CALLFUNC, the racewalk code assumes that it's a multi-valued return and puts the instrumentation after the block in order to not clobber the stack. |
What if we explicitly mark OBLOCKs that copy out return values of a call with a special flag. And then specially handle only these blocks in racewalk rather than try to guess OBLOCK type by looking at the first node. |
How about using rlist on the CALL* nodes? It's not used and it would remove the semantic conflation that the BLOCK node has right now. |
This sounds equally good to me. The root cause of the issue is that OBLOCK guessing in racewalk. And your proposal also removes it. |
Rewriting racewalk as SSA pass should fix this. |
That's not a fix for Go 1.5. It needs to be fixed for Go 1.5. |
CL https://golang.org/cl/11713 mentions this issue. |
The text was updated successfully, but these errors were encountered: