Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

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

Closed
Luv-Ray opened this issue Aug 19, 2024 · 2 comments
Closed

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

Luv-Ray opened this issue Aug 19, 2024 · 2 comments
Labels
C-bug Category: This is a bug. requires-nightly This issue requires a nightly compiler in some way.

Comments

@Luv-Ray
Copy link
Contributor

Luv-Ray commented Aug 19, 2024

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>;
}
  • if I run rustc -C lto -Z virtual-function-elimination vfe.rs and run the produced binary, it runs perfectly.
  • if I run ./x test --stage 1 tests/ui/codegen/vfe.rs, if fails with the error:
running 1 tests

[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

@rustbot rustbot added needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. C-bug Category: This is a bug. requires-nightly This issue requires a nightly compiler in some way. labels Aug 19, 2024
@matthiaskrgr
Copy link
Member

might be a duplicate of #98132

@saethlin saethlin removed the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Aug 20, 2024
@Enselic
Copy link
Member

Enselic commented Jan 1, 2025

Triage: No objection to close as duplicate so let's close as duplicate.

@Enselic Enselic closed this as completed Jan 1, 2025
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
C-bug Category: This is a bug. requires-nightly This issue requires a nightly compiler in some way.
Projects
None yet
Development

No branches or pull requests

5 participants