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/compile: go build -msan flag fails with CONVNOP error #14589

Closed
ianlancetaylor opened this issue Mar 1, 2016 · 7 comments
Closed

cmd/compile: go build -msan flag fails with CONVNOP error #14589

ianlancetaylor opened this issue Mar 1, 2016 · 7 comments
Milestone

Comments

@ianlancetaylor
Copy link
Contributor

On current tip, after the merge of the SSA branch, go build -msan flag fails. (Other directories also fail in similar ways).

> CC=clang ~/go2/bin/go build -msan flag
# flag
../../../src/flag/flag.go:291: internal compiler error: CONVNOP unrecognized non-integer map[string]*Flag -> *uint8

CC @randall77

@ianlancetaylor ianlancetaylor added this to the Go1.7 milestone Mar 1, 2016
@ianlancetaylor
Copy link
Contributor Author

I see there is a special case for flag_race in cmd/compile/internal/gc/ssa.go for flag_race. That may need to test instrumenting rather than flag_race.

@ianlancetaylor
Copy link
Contributor Author

@ianlancetaylor ianlancetaylor self-assigned this Mar 1, 2016
@randall77
Copy link
Contributor

When I try to reproduce, I get:

$ go build -msan flag
# runtime/msan
runtime/msan/msan.go:17:2: warning: implicit declaration of function '__msan_check_mem_is_initialized' is invalid in C99 [-Wimplicit-function-declaration]
# runtime/msan
/tmp/go-build379857825/runtime/msan/_obj/msan.cgo2.o: In function `__msan_read_go':
runtime/msan/msan.go:17: undefined reference to `__msan_check_mem_is_initialized'
clang: error: linker command failed with exit code 1 (use -v to see invocation)

What am I doing wrong? Do I need to build some other way than make.bash?

@ianlancetaylor
Copy link
Contributor Author

Which version of clang do you have installed? On GNU/Linux you need at least clang 3.6.

@randall77
Copy link
Contributor

That's probably it. I have:
Ubuntu clang version 3.4-1ubuntu3 (tags/RELEASE_34/final) (based on LLVM 3.4)

Standard Google Ubuntu workstation. apt-get says clang is already at the newest version. Ugh.

@ianlancetaylor
Copy link
Contributor Author

Pro tip: sudo apt-get install clang-3.6.

@randall77
Copy link
Contributor

Well that's very unhelpful of apt-get.
Thanks.

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