Skip to content

extern "x86-interrupt" fn allows absurd signatures #132835

Open
@workingjubilee

Description

@workingjubilee

I tried this code:

#![feature(abi_x86_interrupt)]
extern "x86-interrupt" fn three_args(_a: u8, _b: u8, _c: u8) {}

fn main() {
    three_args(1, 2, 3);
}

I expected to see rustc reject this code, because this signature makes no sense for this ABI.

Instead, this happened:

rustc-LLVM ERROR: unsupported x86 interrupt prototype
error: could not compile playground (bin "playground")

Meta

rustc --version --verbose:

rustc 1.84.0-nightly (a0d98ff0e 2024-10-31)
binary: rustc
commit-hash: a0d98ff0e5b6e1f2c63fd26f68484792621b235c
commit-date: 2024-10-31
host: x86_64-unknown-linux-gnu
release: 1.84.0-nightly
LLVM version: 19.1.1

@rustbot label: +F-abi_x86_interrupt +A-LLVM +O-x86_64 +O-x86_32 +A-ABI +T-compiler

Related Issues

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-ABIArea: Concerning the application binary interface (ABI)A-LLVMArea: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.A-hardware-interruptsArea: Code for handling the "interrupt ABI" of various processorsC-bugCategory: This is a bug.F-abi_x86_interruptO-x86_32Target: x86 processors, 32 bit (like i686-*) (IA-32)O-x86_64Target: x86-64 processors (like x86_64-*) (also known as amd64 and x64)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

    Issue actions