-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Compiling rustc with -Zrandomize-layout triggers assert in rustc_codegen_llvm/src/type_of.rs #101646
Labels
-Zrandomize-layout
Unstable option: Randomize the layout of types.
C-bug
Category: This is a bug.
requires-nightly
This issue requires a nightly compiler in some way.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Comments
the8472
added
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
C-bug
Category: This is a bug.
requires-nightly
This issue requires a nightly compiler in some way.
labels
Sep 10, 2022
I'm fairly sure I fixed this in #97861 but I haven't worked on that PR in a while |
dtolnay
added a commit
to dtolnay/prettyplease
that referenced
this issue
Feb 19, 2023
This reverts commit ef7636f. rust-lang/rust#101646 thread 'rustc' panicked at 'assertion failed: target_offset >= offset', compiler/rustc_codegen_llvm/src/type_of.rs:126:9 stack backtrace: 0: 0x7f5ec70a0a7a - std::backtrace_rs::backtrace::libunwind::trace::h9ab7cd28287cf18f at /rustc/4507fdaaa27ea2fb59a41df2ce7d1f290da53dae/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5 1: 0x7f5ec70a0a7a - std::backtrace_rs::backtrace::trace_unsynchronized::h3e7e6ca06d1d63cf at /rustc/4507fdaaa27ea2fb59a41df2ce7d1f290da53dae/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5 2: 0x7f5ec70a0a7a - std::sys_common::backtrace::_print_fmt::h5b6184fd459f0c71 at /rustc/4507fdaaa27ea2fb59a41df2ce7d1f290da53dae/library/std/src/sys_common/backtrace.rs:65:5 3: 0x7f5ec70a0a7a - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h8ed5468732b78071 at /rustc/4507fdaaa27ea2fb59a41df2ce7d1f290da53dae/library/std/src/sys_common/backtrace.rs:44:22 4: 0x7f5ec71009fe - core::fmt::write::h89c1e855e81d7a96 at /rustc/4507fdaaa27ea2fb59a41df2ce7d1f290da53dae/library/core/src/fmt/mod.rs:1232:17 5: 0x7f5ec7090f25 - std::io::Write::write_fmt::ha23ba71db044374b at /rustc/4507fdaaa27ea2fb59a41df2ce7d1f290da53dae/library/std/src/io/mod.rs:1684:15 6: 0x7f5ec70a0845 - std::sys_common::backtrace::_print::h194cdf55c322d5fe at /rustc/4507fdaaa27ea2fb59a41df2ce7d1f290da53dae/library/std/src/sys_common/backtrace.rs:47:5 7: 0x7f5ec70a0845 - std::sys_common::backtrace::print::h4549e75783bab124 at /rustc/4507fdaaa27ea2fb59a41df2ce7d1f290da53dae/library/std/src/sys_common/backtrace.rs:34:9 8: 0x7f5ec70a35bf - std::panicking::default_hook::{{closure}}::h04a46ea9ff60bf2c at /rustc/4507fdaaa27ea2fb59a41df2ce7d1f290da53dae/library/std/src/panicking.rs:267:22 9: 0x7f5ec70a32fb - std::panicking::default_hook::h6f3c116d48f73fba at /rustc/4507fdaaa27ea2fb59a41df2ce7d1f290da53dae/library/std/src/panicking.rs:286:9 10: 0x7f5eca3725f5 - <rustc_driver_impl[48a98004e06292cf]::DEFAULT_HOOK::{closure#0}::{closure#0} as core[69c2f5c35675f1ee]::ops::function::FnOnce<(&core[69c2f5c35675f1ee]::panic::panic_info::PanicInfo,)>>::call_once::{shim:vtable#0} 11: 0x7f5ec70a3dfd - <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call::h779d28c2deb011a8 at /rustc/4507fdaaa27ea2fb59a41df2ce7d1f290da53dae/library/alloc/src/boxed.rs:2002:9 12: 0x7f5ec70a3dfd - std::panicking::rust_panic_with_hook::h5a936503487f19f5 at /rustc/4507fdaaa27ea2fb59a41df2ce7d1f290da53dae/library/std/src/panicking.rs:692:13 13: 0x7f5ec70a3b32 - std::panicking::begin_panic_handler::{{closure}}::hf8db4efce7a7f23f 31: 0x7f41b0ad0088 - <rustc_middle[2a277d44e6a99f4f]::ty::context::GlobalCtxt>::enter::<<rustc_interface[3e6023fe39c52850]::queries::Queries>::ongoing_codegen::{closure#0}::{closure#0}, core[69c2f5c35675f1ee]::result::Result<alloc[d821da156a43ed98]::boxed::Box<dyn core[69c2f5c35675f1ee]::any::Any>, rustc_errors[abf5e0320c3520e7]::ErrorGuaranteed>> 32: 0x7f41b0acf774 - <rustc_interface[3e6023fe39c52850]::queries::Queries>::ongoing_codegen 33: 0x7f41b0ace91a - <rustc_interface[3e6023fe39c52850]::interface::Compiler>::enter::<rustc_driver_impl[48a98004e06292cf]::run_compiler::{closure#1}::{closure#2}, core[69c2f5c35675f1ee]::result::Result<core[69c2f5c35675f1ee]::option::Option<rustc_interface[3e6023fe39c52850]::queries::Linker>, rustc_errors[abf5e0320c3520e7]::ErrorGuaranteed>> 34: 0x7f41b0acc9c4 - rustc_span[97beb3ced854c2e2]::with_source_map::<core[69c2f5c35675f1ee]::result::Result<(), rustc_errors[abf5e0320c3520e7]::ErrorGuaranteed>, rustc_interface[3e6023fe39c52850]::interface::run_compiler<core[69c2f5c35675f1ee]::result::Result<(), rustc_errors[abf5e0320c3520e7]::ErrorGuaranteed>, rustc_driver_impl[48a98004e06292cf]::run_compiler::{closure#1}>::{closure#0}::{closure#0}> 35: 0x7f41b0acbf2d - std[d6315e0f51da5517]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[3e6023fe39c52850]::util::run_in_thread_pool_with_globals<rustc_interface[3e6023fe39c52850]::interface::run_compiler<core[69c2f5c35675f1ee]::result::Result<(), rustc_errors[abf5e0320c3520e7]::ErrorGuaranteed>, rustc_driver_impl[48a98004e06292cf]::run_compiler::{closure#1}>::{closure#0}, core[69c2f5c35675f1ee]::result::Result<(), rustc_errors[abf5e0320c3520e7]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[69c2f5c35675f1ee]::result::Result<(), rustc_errors[abf5e0320c3520e7]::ErrorGuaranteed>> 36: 0x7f41b0acb97c - <<std[d6315e0f51da5517]::thread::Builder>::spawn_unchecked_<rustc_interface[3e6023fe39c52850]::util::run_in_thread_pool_with_globals<rustc_interface[3e6023fe39c52850]::interface::run_compiler<core[69c2f5c35675f1ee]::result::Result<(), rustc_errors[abf5e0320c3520e7]::ErrorGuaranteed>, rustc_driver_impl[48a98004e06292cf]::run_compiler::{closure#1}>::{closure#0}, core[69c2f5c35675f1ee]::result::Result<(), rustc_errors[abf5e0320c3520e7]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[69c2f5c35675f1ee]::result::Result<(), rustc_errors[abf5e0320c3520e7]::ErrorGuaranteed>>::{closure#1} as core[69c2f5c35675f1ee]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0} 37: 0x7f41ae57fc83 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::heeffe32503a99aa5 at /rustc/4507fdaaa27ea2fb59a41df2ce7d1f290da53dae/library/alloc/src/boxed.rs:1988:9 38: 0x7f41ae57fc83 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h5085270dbf970bb4 at /rustc/4507fdaaa27ea2fb59a41df2ce7d1f290da53dae/library/alloc/src/boxed.rs:1988:9 39: 0x7f41ae57fc83 - std::sys::unix::thread::Thread::new::thread_start::h76c3abd575e0d195 at /rustc/4507fdaaa27ea2fb59a41df2ce7d1f290da53dae/library/std/src/sys/unix/thread.rs:108:17 40: 0x7f41ae2c0b43 - <unknown> 41: 0x7f41ae352a00 - <unknown> 42: 0x0 - <unknown> error: the compiler unexpectedly panicked. this is a bug. note: we would appreciate a bug report: https://github.com/rust-lang/rust/issues/new?labels=C-bug%2C+I-ICE%2C+T-compiler&template=ice.md note: rustc 1.69.0-nightly (4507fdaaa 2023-02-18) running on x86_64-unknown-linux-gnu note: compiler flags: --crate-type lib -C embed-bitcode=no -C debuginfo=2 -Z randomize-layout note: some of the compiler flags provided by cargo are hidden query stack during panic: end of query stack error: could not compile `prettyplease` Error: Process completed with exit code 101.
trevyn
added a commit
to trevyn/turbocharger
that referenced
this issue
Jun 10, 2023
Enselic
added
the
-Zrandomize-layout
Unstable option: Randomize the layout of types.
label
Apr 19, 2024
is this still happening? |
No longer seems to happen. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
-Zrandomize-layout
Unstable option: Randomize the layout of types.
C-bug
Category: This is a bug.
requires-nightly
This issue requires a nightly compiler in some way.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
#101339 aims to enable -Zrandomize-layout in CI. Attempting to merge it results in this build failure.
It reproduces locally by checking out merge commit 7613125631f18e024b670e1764b3eeeca257045e and running
./src/ci/docker/run.sh x86_64-gnu-llvm-13
.With
RUSTC_LOG=rustc_codegen_llvm::type_of=debug
I getCC @Kixiron
The text was updated successfully, but these errors were encountered: