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
cmd/compile: internal compiler error: treecopy Name, when using go test -race #12225
Labels
Milestone
Comments
This was referenced Aug 20, 2015
/cc @dvyukov @josharian |
@dvyukov any known workaround to alter the code and achieve the same thing without tripping on this bug? |
@tsuna This seems to work: func ice() {
x := []byte("")
_ = *(*int)(unsafe.Pointer(&x[0]))
} |
git blame points to:
|
CL https://golang.org/cl/16938 mentions this issue. |
CL https://golang.org/cl/17034 mentions this issue. |
CL https://golang.org/cl/17125 mentions this issue. |
rsc
added a commit
that referenced
this issue
Nov 23, 2015
…r containing string->[]byte conversion The assumption is that there are no nested function calls in complex expressions. For the most part that assumption is true. It wasn't for these calls inserted during walk. Fix that. I looked through all the calls to mkcall in walk and these were the only cases that emitted calls, that could be part of larger expressions (like not delete), and that were not already handled. Fixes #12225. Change-Id: Iad380683fe2e054d480e7ae4e8faf1078cdd744c Reviewed-on: https://go-review.googlesource.com/17034 Reviewed-by: Ian Lance Taylor <iant@golang.org> Reviewed-on: https://go-review.googlesource.com/17125
mwhudson
added a commit
to mwhudson/go
that referenced
this issue
Jan 4, 2016
I don't understand how this is linked to the behaviour seen in the bug, but it feels like the right thing to do. Fixes golang#12225 Change-Id: Id4a9d8e957e6dcfb7750bdc18363125e6dc020e7
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
What version of Go are you using (go version)?
go version go1.5 darwin/amd64
What operating system and processor architecture are you using?
OS X 10.9.5, Intel
What did you do?
Run
go build -race
on this file:It doesn't matter what's passed to
[]byte(...)
, but it seems to matter that it be constructed from a string, not as a literal byte slice (i.e. not[]byte{...}
).What did you expect to see?
At best a proper compiler error (although I'm not sure why this could be rejected by the compiler), otherwise a runtime crash.
What did you see instead?
The text was updated successfully, but these errors were encountered: