Skip to content

Platform-specific function ABIs are not validated #81396

@jonas-schievink

Description

@jonas-schievink
Contributor

This code builds (and runs) fine on stable Rust when targeting x86_64-unknown-linux-gnu:

extern "aapcs" fn f() {}

fn main() {
    f();
}

Other nonsensical ABIs are also accepted, including win64, avr-interrupt (with feature gate). I expected all of these to result in a compilation error, since they are unsupported on x86_64-unknown-linux-gnu.

Activity

added
A-FFIArea: Foreign function interface (FFI)
T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.
C-bugCategory: This is a bug.
on Jan 25, 2021
ghost

ghost commented on Jun 12, 2021

@ghost
nagisa

nagisa commented on Jun 12, 2021

@nagisa
Member

Duplicate of #57182

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-FFIArea: Foreign function interface (FFI)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@jonas-schievink

        Issue actions

          Platform-specific function ABIs are not validated · Issue #81396 · rust-lang/rust