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

cmd/cover: undefined: unsafe.GoCover_700 in unsafe.GoCover_700.Count #10408

Closed
dvyukov opened this issue Apr 10, 2015 · 1 comment
Closed

cmd/cover: undefined: unsafe.GoCover_700 in unsafe.GoCover_700.Count #10408

dvyukov opened this issue Apr 10, 2015 · 1 comment
Milestone

Comments

@dvyukov
Copy link
Member

dvyukov commented Apr 10, 2015

$ go test -run=none -coverpkg=std index/suffixarray

fails with:

_testmain.go:2037: undefined: unsafe.GoCover_700 in unsafe.GoCover_700.Count
_testmain.go:2037: undefined: unsafe.GoCover_700 in unsafe.GoCover_700.Pos
_testmain.go:2037: undefined: unsafe.GoCover_700 in unsafe.GoCover_700.NumStmt
@dvyukov dvyukov added this to the Go1.5 milestone Apr 10, 2015
@robpike
Copy link
Contributor

robpike commented Apr 13, 2015

A much faster version:

go test -coverpkg unsafe reflect

The problem is that code like this is generated in testmain.go:

coverRegisterFile("unsafe/unsafe.go", _cover143.GoCover_700.Count[:], _cover143.GoCover_700.Pos[:], _cover143.GoCover_700.NumStmt[:])

Something needs to tell go test that there is no unsafe package being built even if we ask for it.

@golang golang locked and limited conversation to collaborators Jun 25, 2016
@rsc rsc unassigned robpike Jun 23, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants