Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Compiler Segfault when sse2 is disabled and lto is fat #102664

Open
Nugine opened this issue Oct 4, 2022 · 1 comment
Open

Compiler Segfault when sse2 is disabled and lto is fat #102664

Nugine opened this issue Oct 4, 2022 · 1 comment
Labels
A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. A-target-feature Area: Enabling/disabling target features like AVX, Neon, etc. C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@Nugine
Copy link
Contributor

Nugine commented Oct 4, 2022

Code

fn main() {
    let n: usize = 1000;
    let time: u128 = 1_000_000;
    let data_len: usize = 100_000;
    let throughput = {
        let total = n as u128 * data_len as u128 * 4;
        let time_sec = time as f64 / 1e9;
        let gib = u128::pow(1024, 3);
        total as f64 / gib as f64 / time_sec
    };
    dbg!(throughput);
}

Compiler flags: -C opt-level=3 -C target-feature=-sse2 -C lto=fat

Meta

rustc --version --verbose:

rustc 1.66.0-nightly (f83e0266c 2022-10-03)
binary: rustc
commit-hash: f83e0266cf7aaa4b41505c49a5fd9c2363166522
commit-date: 2022-10-03
host: x86_64-unknown-linux-gnu
release: 1.66.0-nightly
LLVM version: 15.0.2

Error output

/home/nugine/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/librustc_driver-6662c669726bd598.so(+0x288f1b3)[0x7f3ea16e91b3]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x14420)[0x7f3e9ec93420]
/home/nugine/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/libLLVM-15-rust-1.66.0-nightly.so(+0x3465602)[0x7f3e9cc14602]
/home/nugine/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/libLLVM-15-rust-1.66.0-nightly.so(+0x3463f4b)[0x7f3e9cc12f4b]
/home/nugine/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/libLLVM-15-rust-1.66.0-nightly.so(_ZN4llvm13FPPassManager13runOnFunctionERNS_8FunctionE+0x858)[0x7f3e9c9b6298]
/home/nugine/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/libLLVM-15-rust-1.66.0-nightly.so(_ZN4llvm13FPPassManager11runOnModuleERNS_6ModuleE+0x2f)[0x7f3e9c9b58af]
/home/nugine/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/libLLVM-15-rust-1.66.0-nightly.so(_ZN4llvm6legacy15PassManagerImpl3runERNS_6ModuleE+0x213)[0x7f3e9c9b5103]
/home/nugine/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/librustc_driver-6662c669726bd598.so(+0x23800f2)[0x7f3ea11da0f2]
/home/nugine/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/librustc_driver-6662c669726bd598.so(+0x237fa49)[0x7f3ea11d9a49]
/home/nugine/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/librustc_driver-6662c669726bd598.so(+0x237d99a)[0x7f3ea11d799a]
/home/nugine/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/librustc_driver-6662c669726bd598.so(+0x237ad35)[0x7f3ea11d4d35]
/home/nugine/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/librustc_driver-6662c669726bd598.so(+0x2379d57)[0x7f3ea11d3d57]
/home/nugine/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/librustc_driver-6662c669726bd598.so(+0x23781b8)[0x7f3ea11d21b8]
/home/nugine/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/librustc_driver-6662c669726bd598.so(+0x22f8378)[0x7f3ea1152378]
/home/nugine/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/libstd-3dd5f78c3b43746e.so(rust_metadata_std_90f0bfaf7a72c976+0xfe373)[0x7f3e9edd5373]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x8609)[0x7f3e9ec87609]
/lib/x86_64-linux-gnu/libc.so.6(clone+0x43)[0x7f3e9ebac133]
Segmentation fault (core dumped)

Backtrace

None

@Nugine Nugine added C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Oct 4, 2022
@matthiaskrgr matthiaskrgr added the A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. label Oct 4, 2022
@Nugine
Copy link
Contributor Author

Nugine commented Oct 9, 2022

@workingjubilee workingjubilee added the A-target-feature Area: Enabling/disabling target features like AVX, Neon, etc. label Mar 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. A-target-feature Area: Enabling/disabling target features like AVX, Neon, etc. C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

3 participants