Skip to content

"cargo miri run" fails: cannot alloc memory for unsized type #675

Closed
@RalfJung

Description

@RalfJung

Our nightly CI job failed in a surprising way:

thread 'rustc' panicked at 'cannot alloc memory for unsized type', src/librustc_mir/interpret/place.rs:942:13
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
stack backtrace:
   0: std::sys::unix::backtrace::tracing::imp::unwind_backtrace
             at src/libstd/sys/unix/backtrace/tracing/gcc_s.rs:39
   1: std::sys_common::backtrace::_print
             at src/libstd/sys_common/backtrace.rs:71
   2: std::panicking::default_hook::{{closure}}
             at src/libstd/sys_common/backtrace.rs:59
             at src/libstd/panicking.rs:197
   3: std::panicking::default_hook
             at src/libstd/panicking.rs:211
   4: rustc::util::common::panic_hook
   5: std::panicking::rust_panic_with_hook
             at src/libstd/panicking.rs:478
   6: std::panicking::begin_panic
   7: rustc_mir::interpret::place::<impl rustc_mir::interpret::eval_context::InterpretCx<M>>::allocate
   8: rustc_mir::interpret::step::<impl rustc_mir::interpret::eval_context::InterpretCx<M>>::run
   9: miri::eval_main
  10: rustc_interface::passes::BoxedGlobalCtxt::access::{{closure}}
  11: rustc_interface::passes::create_global_ctxt::{{closure}}
  12: rustc_interface::passes::BoxedGlobalCtxt::enter
  13: <miri::MiriCompilerCalls as rustc_driver::Callbacks>::after_analysis
  14: rustc_interface::interface::run_compiler_in_existing_thread_pool
  15: std::thread::local::LocalKey<T>::with
  16: scoped_tls::ScopedKey<T>::set
  17: syntax::with_globals
query stack during panic:
end of query stack

That is with rust-lang/rust@b025802a2. CI on the last PR worked fine. Hence the offending commit is in rust-lang/rust@f717b58...b025802.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-interpreterArea: affects the core interpreterC-bugCategory: This is a bug.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions