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: reject -race and -msan on non-amd64 arches #24315

Closed
mdempsky opened this issue Mar 8, 2018 · 4 comments

Comments

Projects
None yet
6 participants
@mdempsky
Copy link
Member

commented Mar 8, 2018

cmd/compile currently allows using the -race and -msan flags on any architecture, but there's only runtime support on amd64. Further, -race support wouldn't current work on LR architectures even with runtime support, because racewalk.go hardcodes assumptions about where to find the caller's PC.

Another complication is there are a handful of regress tests that explicitly set -race. A recent refactoring (CL 99416) caused these tests to break, because I assumed no one would be using -race on an unsupported platform.

For comparison, the -dynlink and -shared flags are only usable on platforms where they're supported.

My personal preference would be to make setting -race or -msan an error on !amd64 arches.

@cherrymui suggested CL 99676 to make -race a silent no-op on !amd64.

/cc @aclements @ianlancetaylor

@cherrymui

This comment has been minimized.

Copy link
Contributor

commented Mar 8, 2018

I agree with @mdempsky that we probably should reject it on non-supporting platforms.

I made CL https://golang.org/cl/99677 to let run.go not passing -race to non-AMD64.

@ianlancetaylor

This comment has been minimized.

Copy link
Contributor

commented Mar 12, 2018

@mdempsky You wrote "My personal preference would be to make setting -race or -msan on a !amd64 arch." Do you mean make it an error?

@mdempsky

This comment has been minimized.

Copy link
Member Author

commented Mar 12, 2018

@ianlancetaylor Thanks for pointing that out. Yes, I meant making it an error. (Edited comment to fix that.)

@spf13 spf13 added the NeedsFix label Mar 26, 2018

@spf13 spf13 changed the title cmd/compile: -race and -msan on non-amd64 arches cmd/compile: reject -race and -msan on non-amd64 arches Mar 26, 2018

@andybons andybons added this to the Go1.11 milestone Mar 26, 2018

@ianlancetaylor ianlancetaylor self-assigned this Jun 30, 2018

@ianlancetaylor ianlancetaylor modified the milestones: Go1.11, Go1.12 Jun 30, 2018

@gopherbot

This comment has been minimized.

Copy link

commented Jun 30, 2018

Change https://golang.org/cl/121816 mentions this issue: cmd/compile: only support -race and -msan where they work

@gopherbot gopherbot closed this in 7e64377 Aug 21, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.