-
Notifications
You must be signed in to change notification settings - Fork 18k
cmd/compile: escape analysis bug involving interfaces #11931
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
Confirmed. I see a slightly different error on OSX, but a panic non the less. The suspicious looking fault address is a side effect of the SIGSEGV handler on darwin freaking out if the fault address is higher than the 48th bit.
The same code passes with the race detector under 1.4.2 on the same host so for the moment it is possible that this is memory corruption unrelated to a data race. /cc @rsc @randall77 |
I'm bisecting... |
See b3be360
|
CC @dvyukov |
Escape analysis bug. Reproduction:
So it's nothing to do with maps. Plain *int isn't handled correctly either. But it's something to do with interfaces. |
Just to add what @dr2chase and I just found: in the original test case, the hmap is being allocated on a stack and then accessed from another G, so clearly it shouldn't have been stack allocated. The hmap appears to be long gone by this point. |
CL https://golang.org/cl/12921 mentions this issue. |
Just tested with latest master and our tests pass again. 👍 Thanks for the quick fix and happy sailing to 1.5! |
We started seeing this panic in our tests at ipfs.io. I didn't try go1.5beta1 but its in beta 2 and 3. (They work fine in 1.4.x)
(Full trace log)
It seems to come from this map lookup but I can't figure out whats wrong with it. I wish I had a more minimal test case.
The text was updated successfully, but these errors were encountered: