Skip to content

-Ccontrol-flow-guard should raise an error on unsupported platforms #91060

Open
@nagisa

Description

@nagisa
Member

Right now specifying -Ccontrol-flow-guard and targetting a non-msvc platform will silently ignore the -Ccontrol-flow-guard option. Given the purpose of the flag and the audience Rust targets, I think this is an ill-considered behaviour. Especially of concern I think is when a non-MSVC windows target is used. An engineer might think the mitigations are enabled and the code would work fine in their testing, possibly only because the mitigations were never really turned on!

I believe that mitigation-related flags are sensitive enough to warrant an error when rustc isn't able to implement those mitigations for the artifact.

Activity

changed the title [-]-Ccontrol-flow-guard should raise an error on unsupported platforms[/-] [+]`-Ccontrol-flow-guard` should raise an error on unsupported platforms[/+] on Nov 19, 2021
nagisa

nagisa commented on Nov 19, 2021

@nagisa
MemberAuthor
added
T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.
A-securityArea: Security (example: address space layout randomization).
on Nov 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-securityArea: Security (example: address space layout randomization).C-bugCategory: This is a bug.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @nagisa@inquisitivecrystal

        Issue actions

          `-Ccontrol-flow-guard` should raise an error on unsupported platforms · Issue #91060 · rust-lang/rust