Skip to content

s390x crashes in run-pass/saturating-float-casts #49827

Closed
@cuviper

Description

@cuviper

The compiler crashes when building run-pass/saturating-float-casts.rs on s390x-unknown-linux-gnu.

---- [run-pass] run-pass/saturating-float-casts.rs stdout ----

error: compilation failed!
status: exit code: 101
command: "/home/jistone/rust/build/s390x-unknown-linux-gnu/stage2/bin/rustc" "/home/jistone/rust/src/test/run-pass/saturating-float-casts.rs" "-L" "/home/jistone/rust/build/s390x-unknown-linux-gnu/test/run-pass" "--target=s390x-unknown-linux-gnu" "-C" "prefer-dynamic" "-o" "/home/jistone/rust/build/s390x-unknown-linux-gnu/test/run-pass/saturating-float-casts.stage2-s390x-unknown-linux-gnu" "-Crpath" "-O" "-Zmiri" "-Zunstable-options" "-Lnative=/home/jistone/rust/build/s390x-unknown-linux-gnu/native/rust-test-helpers" "-Z" "saturating-float-casts" "-L" "/home/jistone/rust/build/s390x-unknown-linux-gnu/test/run-pass/saturating-float-casts.stage2-s390x-unknown-linux-gnu.aux"
stdout:
------------------------------------------

------------------------------------------
stderr:
------------------------------------------
thread 'main' panicked at 'assertion failed: `(left == right)`
  left: `OK | INEXACT`,
 right: `OK`', librustc_trans/mir/rvalue.rs:845:9
stack backtrace:
   0: std::sys::unix::backtrace::tracing::imp::unwind_backtrace
   1: std::sys_common::backtrace::print
   2: std::panicking::default_hook::{{closure}}
   3: std::panicking::default_hook
   4: rustc::util::common::panic_hook
   5: std::panicking::rust_panic_with_hook
   6: std::panicking::begin_panic_fmt
   7: rustc_trans::mir::rvalue::cast_float_to_int
   8: rustc_trans::mir::rvalue::<impl rustc_trans::mir::FunctionCx<'a, 'tcx>>::trans_rvalue_operand
   9: rustc_trans::mir::rvalue::<impl rustc_trans::mir::FunctionCx<'a, 'tcx>>::trans_rvalue
  10: rustc_trans::mir::trans_mir
  11: rustc_trans::base::trans_instance
  12: rustc_trans::trans_item::MonoItemExt::define
  13: rustc_trans::base::compile_codegen_unit
  14: rustc::ty::maps::<impl rustc::ty::maps::queries::compile_codegen_unit<'tcx>>::compute_result
  15: rustc::dep_graph::graph::DepGraph::with_task_impl
  16: rustc::ty::context::tls::with_related_context
  17: rustc::ty::maps::<impl rustc::ty::maps::queries::compile_codegen_unit<'tcx>>::force_with_lock
  18: rustc::ty::maps::<impl rustc::ty::maps::queries::compile_codegen_unit<'tcx>>::try_get
  19: rustc::ty::maps::TyCtxtAt::compile_codegen_unit
  20: rustc::ty::maps::<impl rustc::ty::context::TyCtxt<'a, 'tcx, 'lcx>>::compile_codegen_unit
  21: rustc_trans::base::trans_crate
  22: <rustc_trans::LlvmTransCrate as rustc_trans_utils::trans_crate::TransCrate>::trans_crate
  23: rustc::util::common::time
  24: rustc_driver::driver::phase_4_translate_to_llvm
  25: rustc_driver::driver::compile_input::{{closure}}
  26: rustc::ty::context::tls::enter_context
  27: <std::thread::local::LocalKey<T>>::with
  28: rustc::ty::context::TyCtxt::create_and_enter
  29: rustc_driver::driver::compile_input
  30: rustc_driver::run_compiler_impl
  31: syntax::with_globals
  32: rustc_driver::run
  33: rustc_driver::main
  34: std::rt::lang_start::{{closure}}
  35: std::panicking::try::do_call
  36: __rust_maybe_catch_panic
  37: std::rt::lang_start_internal
  38: main
  39: __libc_start_main
  40: <unknown>
query stack during panic:
#0 [compile_codegen_unit] compile_codegen_unit
end of query stack

That failed assertion is in compute_clamp_bounds here:

assert_eq!(rounded_min.status, Status::OK);

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-MIRArea: Mid-level IR (MIR) - https://blog.rust-lang.org/2016/04/19/MIR.htmlC-bugCategory: This is a bug.I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️O-SystemZTarget: SystemZ processors (s390x)T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions