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
Closed

cmd/compile: reject -race and -msan on non-amd64 arches #24315

mdempsky opened this issue Mar 8, 2018 · 4 comments
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.
Milestone

Comments

@mdempsky
Copy link
Member

mdempsky 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

@mdempsky mdempsky added the NeedsDecision Feedback is required from experts, contributors, and/or the community before a change can be made. label Mar 8, 2018
@cherrymui
Copy link
Member

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
Copy link
Contributor

@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
Copy link
Member Author

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

@spf13 spf13 added the NeedsFix The path to resolution is known, but the work has not been done. label Mar 26, 2018
@gopherbot gopherbot removed the NeedsDecision Feedback is required from experts, contributors, and/or the community before a change can be made. 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
Copy link

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

@golang golang locked and limited conversation to collaborators Aug 21, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.
Projects
None yet
Development

No branches or pull requests

6 participants