Skip to content

Disable AES intrinsics on x86-64 Miri #588

Description

@nazar-pc

Similarly to #585, for targets with aes feature enabled the following happens:

error: unsupported operation: can't call LLVM intrinsic `llvm.x86.aesni.aeskeygenassist` on architecture `x86_64`
   --> ~/.cache/rustup/toolchains/nightly-2026-08-25-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/../../stdarch/crates/core_arch/src/x86/aes.rs:100:14
    |
100 |     unsafe { aeskeygenassist(a, IMM8 as u8) }
    |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unsupported operation occurred here
    |
    = help: this means the program tried to do something Miri does not support; it does not indicate a bug in the program
    = note: this is on thread `aes::tests::tes`
    = note: stack backtrace:
            0: core::arch::x86_64::_mm_aeskeygenassist_si128::<1>
                at ~/.cache/rustup/toolchains/nightly-2026-08-25-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/../../stdarch/crates/core_arch/src/x86/aes.rs:100:14: 100:44
            1: aes::backends::x86_aes::expand::aes128_expand_key::expand_round::<1>
                at ~/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/aes-0.9.3/src/backends/x86_aes/expand.rs:17:14: 17:46
            2: aes::backends::x86_aes::expand::aes128_expand_key

This is not an issue for generic x86-64-v1 target where aes feature is not mandatory.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions