-
Notifications
You must be signed in to change notification settings - Fork 17.7k
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
x/tools/cmd/ssadump: interpreting causes a crash #43163
Comments
/cc @golang/tools-team |
"runtime" is required by ssadump to interpret.
However, x/tools/go/ssa/interp can no longer handle runtime's use of unsafe.Pointer during package initialization.
|
Change https://go.dev/cl/441817 mentions this issue: |
Changes `ssadump -run` to ensure that the package runtime is not imported (changed from must be imported). For several years, the runtime package has used unsafe constructs x/tools/go/ssa/interp cannot interpret. This must have been failing a similar amount of time. This is unfortunate, but is unlikely to be addressed soon. For golang/go#43163 Change-Id: I9e2aee640ff7b1123e591e6c49cac9967c5e8da8 Reviewed-on: https://go-review.googlesource.com/c/tools/+/441817 Run-TryBot: Tim King <[email protected]> gopls-CI: kokoro <[email protected]> Reviewed-by: Alan Donovan <[email protected]> TryBot-Result: Gopher Robot <[email protected]>
Closing for now as unfortunate. |
What version of Go are you using (
go version
)?I've tested both Go 1.15.5 and Go 1.14.
Does this issue reproduce with the latest release?
Yes, in the latest major release and with x/tools commit d93e913.
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
I have the following code in a directory named
const
:I run it with
ssadump -run .
when I'm in that directory (or alternativelyssadump -interp=RT -run .
).What did you expect to see?
I expect it to print "test".
What did you see instead?
It crashes:
What I really wanted to report was what appears to be a bug in either go/constant or x/tools/go/ssa, but I'm not sure how to reproduce this in an easy way with
ssadump
crashing on any program that I feed it.The text was updated successfully, but these errors were encountered: