Skip to content

ICE on LTO #47438

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

Closed
coder543 opened this issue Jan 14, 2018 · 4 comments
Closed

ICE on LTO #47438

coder543 opened this issue Jan 14, 2018 · 4 comments
Labels
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

@coder543
Copy link

coder543 commented Jan 14, 2018

cargo output:

error: internal compiler error: unexpected panic

note: the compiler unexpectedly panicked. this is a bug.

note: we would appreciate a bug report: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports

note: rustc 1.23.0 (766bd11c8 2018-01-01) running on x86_64-unknown-linux-gnu

note: run with `RUST_BACKTRACE=1` for a backtrace

thread 'rustc' panicked at 'assertion failed: !sess.lto()', /checkout/src/librustc_trans/back/link.rs:1291:8
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
stack backtrace:
   0: std::sys::imp::backtrace::tracing::imp::unwind_backtrace
             at /checkout/src/libstd/sys/unix/backtrace/tracing/gcc_s.rs:49
   1: std::sys_common::backtrace::_print
             at /checkout/src/libstd/sys_common/backtrace.rs:68
   2: std::panicking::default_hook::{{closure}}
             at /checkout/src/libstd/sys_common/backtrace.rs:57
             at /checkout/src/libstd/panicking.rs:381
   3: std::panicking::default_hook
             at /checkout/src/libstd/panicking.rs:391
   4: std::panicking::rust_panic_with_hook
             at /checkout/src/libstd/panicking.rs:577
   5: std::panicking::begin_panic
   6: _ZN11rustc_trans4back4link13link_natively17hbc0fdd9d75452ac3E.llvm.4DE6DCE7
   7: rustc_trans::back::link::link_binary
   8: <rustc_trans::LlvmTransCrate as rustc_trans_utils::trans_crate::TransCrate>::link_binary
   9: rustc_driver::driver::compile_input
  10: rustc_driver::run_compiler

error: Could not compile `asmtest`.

To learn more, run the command again with --verbose.

To reproduce, compile this project with LTO enabled. It uses libasm to ease the use of assembly on stable Rust. For some reason, LTO stops working. Everything works fine without LTO enabled.

@sfackler sfackler added the I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ label Jan 15, 2018
@matthiaskrgr
Copy link
Member

Maybe a duplicate of #45689 ?

@coder543
Copy link
Author

The ICE that I reported above is occurring on 1.23.0 (stable), which is a little different, and the circumstances do not involve rustfmt, but it is the same line of code that's crashing, and they could be related.

@XAMPPRocky XAMPPRocky added T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. C-bug Category: This is a bug. labels Apr 23, 2018
@Elinvynia
Copy link
Contributor

Elinvynia commented May 9, 2020

I was unable to reproduce this on:

rustc --version --verbose
rustc 1.45.0-nightly (7ebd87a7a 2020-05-08)
binary: rustc
commit-hash: 7ebd87a7a1e0e21767422e115c9455ef6e6d4bee
commit-date: 2020-05-08
host: x86_64-unknown-linux-gnu
release: 1.45.0-nightly
LLVM version: 9.0

Same with stable:

rustc 1.43.1 (8d69840ab 2020-05-04)
binary: rustc
commit-hash: 8d69840ab92ea7f4d323420088dd8c9775f180cd
commit-date: 2020-05-04
host: x86_64-unknown-linux-gnu
release: 1.43.1
LLVM version: 9.0

@csmoe
Copy link
Member

csmoe commented Feb 11, 2022

cannot reproduced on rustc 1.58.1 (db9d1b20b 2022-01-20)

@csmoe csmoe closed this as completed Feb 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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

6 participants