-
Notifications
You must be signed in to change notification settings - Fork 18k
cmd/compile: x/perf build broken by go:notinheap changes in Go 1.16 #41451
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
This is a release-blocker for Go 1.16 via #11811. |
So this error comes from this declaration:
(It appears there is no use of this type in the current codebase, but that's not really relevant here.) The type
That all looks correct. The actual implementation of There's no real error in the user's code, because
This is making me think we need to silently propagate the go:notinheap-ness of types in their declarations. So if we have
Then types |
Note that we already do this propagation for structs and arrays. It's only for named types that we don't propagate at the moment. |
We propagate for named types also. We just also emit an error if a type has the notinheap mark but wasn't explicitly marked with a pragma. I think if we just get rid of that latter error, we should be ok. |
Change https://golang.org/cl/255637 mentions this issue: |
I agree that it makes sense to propagate notinheap status across defined types. As far as I know at present only the runtime package uses notinheap, so the only question is whether that breaks anything in the runtime package. |
From https://build.golang.org/log/a4cfee6d6d30e30dadf73401f37e258cbd73dfb0 (and all other builders for
x/perf
at head):I can see two possible root causes, with four possible fixes.
If the
go:notinheap
diagnostic is incorrect, we should fix it (CC @randall77).If the diagnostic is correct and this is a bug in
github.com/mattn/go-sqlite
:a. We could fix
github.com/mattn/go-sqlite3
upstream and upgrade thex/perf
dependency to pull it in (CC @mattn).b. We could refactor
x/perf
to drop the dependency ongo-sqlite3
(CC @FiloSottile, maybe?).c. We could gate the improvements to the diagnostic on the
go
version in thego.mod
file, so that they don't trigger untilgo 1.16
. (But I'm not sure how that interacts with cmd/cgo: jmethodID/jfieldID is not mapped to uintptr if building with the Android NDK [1.15 backport] #41432, which was mentioned on many of the associated changes and is targeted to Go 1.15.3.)The text was updated successfully, but these errors were encountered: