rust-lang / rust

Empowering everyone to build reliable and efficient software.
https://www.rust-lang.org
Other
98.2k stars 12.7k forks source link

signal: 4 (SIGILL) when testing virtual-function-elimination #129267

Open Luv-Ray opened 2 months ago

Luv-Ray commented 2 months ago

Found when I trying to solve #123955 Here is the program, saved as tests/ui/codegen/vfe.rs:

//@ run-pass
//@ compile-flags: -C lto -Zvirtual-function-elimination
//@ no-prefer-dynamic

trait Empty {}
impl Empty for () {}

fn main() {
    _ = Box::new(()) as Box<dyn Empty>;
}

[ui] tests/ui/codegen/vfe.rs ... F

failures:

---- [ui] tests/ui/codegen/vfe.rs stdout ----

error: test run failed! status: signal: 4 (SIGILL) (core dumped) command: cd "/home/ray/Desktop/rust/build/x86_64-unknown-linux-gnu/test/ui/codegen/vfe" && RUSTC="/home/ray/Desktop/rust/build/x86_64-unknown-linux-gnu/stage1/bin/rustc" RUST_TEST_THREADS="16" "/home/ray/Desktop/rust/build/x86_64-unknown-linux-gnu/test/ui/codegen/vfe/a" stdout: none stderr: none


I'm curious if this is about the `./x test` issue.

@rustbot label +C-bug +requires-nightly
matthiaskrgr commented 2 months ago

might be a duplicate of https://github.com/rust-lang/rust/issues/98132