Skip to content
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

runtime: inconsistent definition for func runtime.memclrNoHeapPointers during import #19185

davidlazar opened this issue Feb 19, 2017 · 2 comments


Copy link

@davidlazar davidlazar commented Feb 19, 2017

This is purposefully one commit behind 1f77db9 and what we would see after we fix #19184.

$ go version
go version devel +8833af3f4b Wed Feb 15 21:14:37 2017 +0000 linux/amd64

In the runtime directory:

$ go test -a -short -gcflags '-l=4'
# runtime_test
./callers_test.go:8: cannot import "runtime" due to version skew - reinstall package (inconsistent definition for func runtime.memclrNoHeapPointers during import
	func(*byte, uintptr)
	func(unsafe.Pointer, uintptr))
FAIL	runtime [build failed]

One potential solution is to mark MemclrBytes noinline, but it's not clear if that is the right long-term solution.


This comment has been minimized.

Copy link

@gopherbot gopherbot commented Feb 20, 2017

CL mentions this issue.


This comment has been minimized.

Copy link

@cherrymui cherrymui commented Feb 20, 2017

The compiler thinks memclrNoHeapPointers has signature func(*byte, uintptr) (, whereas the actual function in runtime has signature func(unsafe.Pointer, uintptr).
CL changes the compiler's copy to match the runtime.
However, there are other functions marked as taking *byte or *any in the compiler, but actually takes a pointer to a specific runtime type, or arbitrary pointer type. There might be also problem if they get imported through inlining. Maybe we should let bimport's check allow this case?

@gopherbot gopherbot closed this in f6fc0dd Feb 28, 2017
@golang golang locked and limited conversation to collaborators Feb 28, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.