Stream: git-wasmtime

Topic: wasmtime / issue #5395 Cranelift: Crash in debugging WASM


view this post on Zulip Wasmtime GitHub notifications bot (Dec 07 2022 at 20:03):

brendandburns labeled issue #5395:

Thanks for filing an issue! Please fill out the TODOs below.

Steps to Reproduce

wasmtime run -g starter.wasm (wasm attached)

starter.was.zip

Expected Results

Debug execution should work. Program executes correctly without the -g flag.

Actual Results

# wasmtime run -g bin/Debug/net7.0/starter.wasm
thread 'main' panicked at 'assertion failed: range_start < range_end', crates/cranelift/src/debug/transform/expression.rs:689:13
stack backtrace:
   0:     0x558e7428a1c0 - std::backtrace_rs::backtrace::libunwind::trace::h32eb3e08e874dd27
                               at /rustc/897e37553bba8b42751c67658967889d11ecd120/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5
   1:     0x558e7428a1c0 - std::backtrace_rs::backtrace::trace_unsynchronized::haa3f451d27bc11a5
                               at /rustc/897e37553bba8b42751c67658967889d11ecd120/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x558e7428a1c0 - std::sys_common::backtrace::_print_fmt::h5b94a01bb4289bb5
                               at /rustc/897e37553bba8b42751c67658967889d11ecd120/library/std/src/sys_common/backtrace.rs:66:5
   3:     0x558e7428a1c0 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::hb070b7fa7e3175df
                               at /rustc/897e37553bba8b42751c67658967889d11ecd120/library/std/src/sys_common/backtrace.rs:45:22
   4:     0x558e742aebbe - core::fmt::write::hd5207aebbb9a86e9
                               at /rustc/897e37553bba8b42751c67658967889d11ecd120/library/core/src/fmt/mod.rs:1202:17
   5:     0x558e74284515 - std::io::Write::write_fmt::h3bd699bbd129ab8a
                               at /rustc/897e37553bba8b42751c67658967889d11ecd120/library/std/src/io/mod.rs:1679:15
   6:     0x558e7428b9f3 - std::sys_common::backtrace::_print::h7a21be552fdf58da
                               at /rustc/897e37553bba8b42751c67658967889d11ecd120/library/std/src/sys_common/backtrace.rs:48:5
   7:     0x558e7428b9f3 - std::sys_common::backtrace::print::ha85c41fe4dd80b13
                               at /rustc/897e37553bba8b42751c67658967889d11ecd120/library/std/src/sys_common/backtrace.rs:35:9
   8:     0x558e7428b9f3 - std::panicking::default_hook::{{closure}}::h04cca40023d0eeca
                               at /rustc/897e37553bba8b42751c67658967889d11ecd120/library/std/src/panicking.rs:295:22
   9:     0x558e7428b6df - std::panicking::default_hook::haa3ca8c310ed5402
                               at /rustc/897e37553bba8b42751c67658967889d11ecd120/library/std/src/panicking.rs:314:9
  10:     0x558e7428c09a - std::panicking::rust_panic_with_hook::h7b190ce1a948faac
                               at /rustc/897e37553bba8b42751c67658967889d11ecd120/library/std/src/panicking.rs:698:17
  11:     0x558e7428bf51 - std::panicking::begin_panic_handler::{{closure}}::hbafbfdc3e1b97f68
                               at /rustc/897e37553bba8b42751c67658967889d11ecd120/library/std/src/panicking.rs:586:13
  12:     0x558e7428a66c - std::sys_common::backtrace::__rust_end_short_backtrace::hda93e5fef243b4c0
                               at /rustc/897e37553bba8b42751c67658967889d11ecd120/library/std/src/sys_common/backtrace.rs:138:18
  13:     0x558e7428bcb2 - rust_begin_unwind
                               at /rustc/897e37553bba8b42751c67658967889d11ecd120/library/std/src/panicking.rs:584:5
  14:     0x558e73b48153 - core::panicking::panic_fmt::h8d17ca1073d9a733
                               at /rustc/897e37553bba8b42751c67658967889d11ecd120/library/core/src/panicking.rs:142:14
  15:     0x558e73b4801d - core::panicking::panic::hf0565452d0d0936c
                               at /rustc/897e37553bba8b42751c67658967889d11ecd120/library/core/src/panicking.rs:48:5
  16:     0x558e73e10774 - wasmtime_cranelift::debug::transform::expression::ValueLabelRangesBuilder::process_label::h0330cc399cf05dc7
  17:     0x558e73e0e0df - wasmtime_cranelift::debug::transform::expression::CompiledExpression::build_with_locals::hadd8fdcea44efbcb
  18:     0x558e73e01cb1 - wasmtime_cranelift::debug::transform::simulate::generate_simulated_dwarf::h00319698559bad23
  19:     0x558e73e19d30 - wasmtime_cranelift::debug::transform::transform_dwarf::hbf122a28f47ff1e5
  20:     0x558e73e4673c - wasmtime_cranelift::debug::write_debuginfo::emit_dwarf::h49884fd3e60c8452
  21:     0x558e73e0b7a1 - <wasmtime_cranelift::compiler::Compiler as wasmtime_environ::compilation::Compiler>::append_dwarf::h259f1b6374c71f3c
  22:     0x558e73cda00e - wasmtime::module::Module::build_artifacts::h7464dac298520486
  23:     0x558e73cd2d5e - core::ops::function::FnOnce::call_once::hc3f1cfe9d8efba9e
  24:     0x558e73d28e82 - wasmtime_cache::ModuleCacheEntry::get_data_raw::h409e53792f24ba53
  25:     0x558e73cd9019 - wasmtime::module::Module::from_binary::h67399655eca4e58e
  26:     0x558e73b5a889 - wasmtime::module::Module::from_file::h41b3bec67222a9c0
  27:     0x558e73c1633a - wasmtime_cli::commands::run::RunCommand::load_module::h533df73bf9ca31e4
  28:     0x558e73c152d9 - wasmtime_cli::commands::run::RunCommand::load_main_module::h30816ab05f358e89
  29:     0x558e73c143e1 - wasmtime_cli::commands::run::RunCommand::execute::h3e5bf7454f6deb5e
  30:     0x558e73b4e667 - wasmtime::main::h3d0de3bd65cce4ac
  31:     0x558e73b4a923 - std::sys_common::backtrace::__rust_begin_short_backtrace::hf63df8345dd90192
  32:     0x558e73b49a49 - std::rt::lang_start::{{closure}}::hd2c4ffc18ae30024
  33:     0x558e7427ed9f - core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &F>::call_once::hb69be6e0857c6cfb
                               at /rustc/897e37553bba8b42751c67658967889d11ecd120/library/core/src/ops/function.rs:283:13
  34:     0x558e7427ed9f - std::panicking::try::do_call::h396dfc441ee9c786
                               at /rustc/897e37553bba8b42751c67658967889d11ecd120/library/std/src/panicking.rs:492:40
  35:     0x558e7427ed9f - std::panicking::try::h6cdda972d28b3a4f
                               at /rustc/897e37553bba8b42751c67658967889d11ecd120/library/std/src/panicking.rs:456:19
  36:     0x558e7427ed9f - std::panic::catch_unwind::h376039ec264e8ef9
                               at /rustc/897e37553bba8b42751c67658967889d11ecd120/library/std/src/panic.rs:137:14
  37:     0x558e7427ed9f - std::rt::lang_start_internal::{{closure}}::hc94720ca3d4cb727
                               at /rustc/897e37553bba8b42751c67658967889d11ecd120/library/std/src/rt.rs:148:48
  38:     0x558e7427ed9f - std::panicking::try::do_call::h2422fb95933fa2d5
                               at /rustc/897e37553bba8b42751c67658967889d11ecd120/library/std/src/panicking.rs:492:40
  39:     0x558e7427ed9f - std::panicking::try::h488286b5ec8333ff
                               at /rustc/897e37553bba8b42751c67658967889d11ecd120/library/std/src/panicking.rs:456:19
  40:     0x558e7427ed9f - std::panic::catch_unwind::h81636549836d2a25
                               at /rustc/897e37553bba8b42751c67658967889d11ecd120/library/std/src/panic.rs:137:14
  41:     0x558e7427ed9f - std::rt::lang_start_internal::h6ba1bb743c1e9df9
                               at /rustc/897e37553bba8b42751c67658967889d11ecd120/library/std/src/rt.rs:148:20
  42:     0x558e73b4e7f8 - main
  43:     0x7f982faa9d90 - <unknown>
  44:     0x7f982faa9e40 - __libc_start_main
  45:     0x558e73b48432 - <unknown>
  46:                0x0 - <unknown>

Versions and Environment

Cranelift version or commit: wasmtime 3
Operating system: Ubuntu 22.04
Architecture: amd64

view this post on Zulip Wasmtime GitHub notifications bot (Dec 07 2022 at 20:03):

brendandburns opened issue #5395:

Thanks for filing an issue! Please fill out the TODOs below.

Steps to Reproduce

wasmtime run -g starter.wasm (wasm attached)

starter.was.zip

Expected Results

Debug execution should work. Program executes correctly without the -g flag.

Actual Results

# wasmtime run -g bin/Debug/net7.0/starter.wasm
thread 'main' panicked at 'assertion failed: range_start < range_end', crates/cranelift/src/debug/transform/expression.rs:689:13
stack backtrace:
   0:     0x558e7428a1c0 - std::backtrace_rs::backtrace::libunwind::trace::h32eb3e08e874dd27
                               at /rustc/897e37553bba8b42751c67658967889d11ecd120/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5
   1:     0x558e7428a1c0 - std::backtrace_rs::backtrace::trace_unsynchronized::haa3f451d27bc11a5
                               at /rustc/897e37553bba8b42751c67658967889d11ecd120/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x558e7428a1c0 - std::sys_common::backtrace::_print_fmt::h5b94a01bb4289bb5
                               at /rustc/897e37553bba8b42751c67658967889d11ecd120/library/std/src/sys_common/backtrace.rs:66:5
   3:     0x558e7428a1c0 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::hb070b7fa7e3175df
                               at /rustc/897e37553bba8b42751c67658967889d11ecd120/library/std/src/sys_common/backtrace.rs:45:22
   4:     0x558e742aebbe - core::fmt::write::hd5207aebbb9a86e9
                               at /rustc/897e37553bba8b42751c67658967889d11ecd120/library/core/src/fmt/mod.rs:1202:17
   5:     0x558e74284515 - std::io::Write::write_fmt::h3bd699bbd129ab8a
                               at /rustc/897e37553bba8b42751c67658967889d11ecd120/library/std/src/io/mod.rs:1679:15
   6:     0x558e7428b9f3 - std::sys_common::backtrace::_print::h7a21be552fdf58da
                               at /rustc/897e37553bba8b42751c67658967889d11ecd120/library/std/src/sys_common/backtrace.rs:48:5
   7:     0x558e7428b9f3 - std::sys_common::backtrace::print::ha85c41fe4dd80b13
                               at /rustc/897e37553bba8b42751c67658967889d11ecd120/library/std/src/sys_common/backtrace.rs:35:9
   8:     0x558e7428b9f3 - std::panicking::default_hook::{{closure}}::h04cca40023d0eeca
                               at /rustc/897e37553bba8b42751c67658967889d11ecd120/library/std/src/panicking.rs:295:22
   9:     0x558e7428b6df - std::panicking::default_hook::haa3ca8c310ed5402
                               at /rustc/897e37553bba8b42751c67658967889d11ecd120/library/std/src/panicking.rs:314:9
  10:     0x558e7428c09a - std::panicking::rust_panic_with_hook::h7b190ce1a948faac
                               at /rustc/897e37553bba8b42751c67658967889d11ecd120/library/std/src/panicking.rs:698:17
  11:     0x558e7428bf51 - std::panicking::begin_panic_handler::{{closure}}::hbafbfdc3e1b97f68
                               at /rustc/897e37553bba8b42751c67658967889d11ecd120/library/std/src/panicking.rs:586:13
  12:     0x558e7428a66c - std::sys_common::backtrace::__rust_end_short_backtrace::hda93e5fef243b4c0
                               at /rustc/897e37553bba8b42751c67658967889d11ecd120/library/std/src/sys_common/backtrace.rs:138:18
  13:     0x558e7428bcb2 - rust_begin_unwind
                               at /rustc/897e37553bba8b42751c67658967889d11ecd120/library/std/src/panicking.rs:584:5
  14:     0x558e73b48153 - core::panicking::panic_fmt::h8d17ca1073d9a733
                               at /rustc/897e37553bba8b42751c67658967889d11ecd120/library/core/src/panicking.rs:142:14
  15:     0x558e73b4801d - core::panicking::panic::hf0565452d0d0936c
                               at /rustc/897e37553bba8b42751c67658967889d11ecd120/library/core/src/panicking.rs:48:5
  16:     0x558e73e10774 - wasmtime_cranelift::debug::transform::expression::ValueLabelRangesBuilder::process_label::h0330cc399cf05dc7
  17:     0x558e73e0e0df - wasmtime_cranelift::debug::transform::expression::CompiledExpression::build_with_locals::hadd8fdcea44efbcb
  18:     0x558e73e01cb1 - wasmtime_cranelift::debug::transform::simulate::generate_simulated_dwarf::h00319698559bad23
  19:     0x558e73e19d30 - wasmtime_cranelift::debug::transform::transform_dwarf::hbf122a28f47ff1e5
  20:     0x558e73e4673c - wasmtime_cranelift::debug::write_debuginfo::emit_dwarf::h49884fd3e60c8452
  21:     0x558e73e0b7a1 - <wasmtime_cranelift::compiler::Compiler as wasmtime_environ::compilation::Compiler>::append_dwarf::h259f1b6374c71f3c
  22:     0x558e73cda00e - wasmtime::module::Module::build_artifacts::h7464dac298520486
  23:     0x558e73cd2d5e - core::ops::function::FnOnce::call_once::hc3f1cfe9d8efba9e
  24:     0x558e73d28e82 - wasmtime_cache::ModuleCacheEntry::get_data_raw::h409e53792f24ba53
  25:     0x558e73cd9019 - wasmtime::module::Module::from_binary::h67399655eca4e58e
  26:     0x558e73b5a889 - wasmtime::module::Module::from_file::h41b3bec67222a9c0
  27:     0x558e73c1633a - wasmtime_cli::commands::run::RunCommand::load_module::h533df73bf9ca31e4
  28:     0x558e73c152d9 - wasmtime_cli::commands::run::RunCommand::load_main_module::h30816ab05f358e89
  29:     0x558e73c143e1 - wasmtime_cli::commands::run::RunCommand::execute::h3e5bf7454f6deb5e
  30:     0x558e73b4e667 - wasmtime::main::h3d0de3bd65cce4ac
  31:     0x558e73b4a923 - std::sys_common::backtrace::__rust_begin_short_backtrace::hf63df8345dd90192
  32:     0x558e73b49a49 - std::rt::lang_start::{{closure}}::hd2c4ffc18ae30024
  33:     0x558e7427ed9f - core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &F>::call_once::hb69be6e0857c6cfb
                               at /rustc/897e37553bba8b42751c67658967889d11ecd120/library/core/src/ops/function.rs:283:13
  34:     0x558e7427ed9f - std::panicking::try::do_call::h396dfc441ee9c786
                               at /rustc/897e37553bba8b42751c67658967889d11ecd120/library/std/src/panicking.rs:492:40
  35:     0x558e7427ed9f - std::panicking::try::h6cdda972d28b3a4f
                               at /rustc/897e37553bba8b42751c67658967889d11ecd120/library/std/src/panicking.rs:456:19
  36:     0x558e7427ed9f - std::panic::catch_unwind::h376039ec264e8ef9
                               at /rustc/897e37553bba8b42751c67658967889d11ecd120/library/std/src/panic.rs:137:14
  37:     0x558e7427ed9f - std::rt::lang_start_internal::{{closure}}::hc94720ca3d4cb727
                               at /rustc/897e37553bba8b42751c67658967889d11ecd120/library/std/src/rt.rs:148:48
  38:     0x558e7427ed9f - std::panicking::try::do_call::h2422fb95933fa2d5
                               at /rustc/897e37553bba8b42751c67658967889d11ecd120/library/std/src/panicking.rs:492:40
  39:     0x558e7427ed9f - std::panicking::try::h488286b5ec8333ff
                               at /rustc/897e37553bba8b42751c67658967889d11ecd120/library/std/src/panicking.rs:456:19
  40:     0x558e7427ed9f - std::panic::catch_unwind::h81636549836d2a25
                               at /rustc/897e37553bba8b42751c67658967889d11ecd120/library/std/src/panic.rs:137:14
  41:     0x558e7427ed9f - std::rt::lang_start_internal::h6ba1bb743c1e9df9
                               at /rustc/897e37553bba8b42751c67658967889d11ecd120/library/std/src/rt.rs:148:20
  42:     0x558e73b4e7f8 - main
  43:     0x7f982faa9d90 - <unknown>
  44:     0x7f982faa9e40 - __libc_start_main
  45:     0x558e73b48432 - <unknown>
  46:                0x0 - <unknown>

Versions and Environment

Cranelift version or commit: wasmtime 3
Operating system: Ubuntu 22.04
Architecture: amd64

view this post on Zulip Wasmtime GitHub notifications bot (Dec 07 2022 at 20:03):

brendandburns labeled issue #5395:

Thanks for filing an issue! Please fill out the TODOs below.

Steps to Reproduce

wasmtime run -g starter.wasm (wasm attached)

starter.was.zip

Expected Results

Debug execution should work. Program executes correctly without the -g flag.

Actual Results

# wasmtime run -g bin/Debug/net7.0/starter.wasm
thread 'main' panicked at 'assertion failed: range_start < range_end', crates/cranelift/src/debug/transform/expression.rs:689:13
stack backtrace:
   0:     0x558e7428a1c0 - std::backtrace_rs::backtrace::libunwind::trace::h32eb3e08e874dd27
                               at /rustc/897e37553bba8b42751c67658967889d11ecd120/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5
   1:     0x558e7428a1c0 - std::backtrace_rs::backtrace::trace_unsynchronized::haa3f451d27bc11a5
                               at /rustc/897e37553bba8b42751c67658967889d11ecd120/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x558e7428a1c0 - std::sys_common::backtrace::_print_fmt::h5b94a01bb4289bb5
                               at /rustc/897e37553bba8b42751c67658967889d11ecd120/library/std/src/sys_common/backtrace.rs:66:5
   3:     0x558e7428a1c0 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::hb070b7fa7e3175df
                               at /rustc/897e37553bba8b42751c67658967889d11ecd120/library/std/src/sys_common/backtrace.rs:45:22
   4:     0x558e742aebbe - core::fmt::write::hd5207aebbb9a86e9
                               at /rustc/897e37553bba8b42751c67658967889d11ecd120/library/core/src/fmt/mod.rs:1202:17
   5:     0x558e74284515 - std::io::Write::write_fmt::h3bd699bbd129ab8a
                               at /rustc/897e37553bba8b42751c67658967889d11ecd120/library/std/src/io/mod.rs:1679:15
   6:     0x558e7428b9f3 - std::sys_common::backtrace::_print::h7a21be552fdf58da
                               at /rustc/897e37553bba8b42751c67658967889d11ecd120/library/std/src/sys_common/backtrace.rs:48:5
   7:     0x558e7428b9f3 - std::sys_common::backtrace::print::ha85c41fe4dd80b13
                               at /rustc/897e37553bba8b42751c67658967889d11ecd120/library/std/src/sys_common/backtrace.rs:35:9
   8:     0x558e7428b9f3 - std::panicking::default_hook::{{closure}}::h04cca40023d0eeca
                               at /rustc/897e37553bba8b42751c67658967889d11ecd120/library/std/src/panicking.rs:295:22
   9:     0x558e7428b6df - std::panicking::default_hook::haa3ca8c310ed5402
                               at /rustc/897e37553bba8b42751c67658967889d11ecd120/library/std/src/panicking.rs:314:9
  10:     0x558e7428c09a - std::panicking::rust_panic_with_hook::h7b190ce1a948faac
                               at /rustc/897e37553bba8b42751c67658967889d11ecd120/library/std/src/panicking.rs:698:17
  11:     0x558e7428bf51 - std::panicking::begin_panic_handler::{{closure}}::hbafbfdc3e1b97f68
                               at /rustc/897e37553bba8b42751c67658967889d11ecd120/library/std/src/panicking.rs:586:13
  12:     0x558e7428a66c - std::sys_common::backtrace::__rust_end_short_backtrace::hda93e5fef243b4c0
                               at /rustc/897e37553bba8b42751c67658967889d11ecd120/library/std/src/sys_common/backtrace.rs:138:18
  13:     0x558e7428bcb2 - rust_begin_unwind
                               at /rustc/897e37553bba8b42751c67658967889d11ecd120/library/std/src/panicking.rs:584:5
  14:     0x558e73b48153 - core::panicking::panic_fmt::h8d17ca1073d9a733
                               at /rustc/897e37553bba8b42751c67658967889d11ecd120/library/core/src/panicking.rs:142:14
  15:     0x558e73b4801d - core::panicking::panic::hf0565452d0d0936c
                               at /rustc/897e37553bba8b42751c67658967889d11ecd120/library/core/src/panicking.rs:48:5
  16:     0x558e73e10774 - wasmtime_cranelift::debug::transform::expression::ValueLabelRangesBuilder::process_label::h0330cc399cf05dc7
  17:     0x558e73e0e0df - wasmtime_cranelift::debug::transform::expression::CompiledExpression::build_with_locals::hadd8fdcea44efbcb
  18:     0x558e73e01cb1 - wasmtime_cranelift::debug::transform::simulate::generate_simulated_dwarf::h00319698559bad23
  19:     0x558e73e19d30 - wasmtime_cranelift::debug::transform::transform_dwarf::hbf122a28f47ff1e5
  20:     0x558e73e4673c - wasmtime_cranelift::debug::write_debuginfo::emit_dwarf::h49884fd3e60c8452
  21:     0x558e73e0b7a1 - <wasmtime_cranelift::compiler::Compiler as wasmtime_environ::compilation::Compiler>::append_dwarf::h259f1b6374c71f3c
  22:     0x558e73cda00e - wasmtime::module::Module::build_artifacts::h7464dac298520486
  23:     0x558e73cd2d5e - core::ops::function::FnOnce::call_once::hc3f1cfe9d8efba9e
  24:     0x558e73d28e82 - wasmtime_cache::ModuleCacheEntry::get_data_raw::h409e53792f24ba53
  25:     0x558e73cd9019 - wasmtime::module::Module::from_binary::h67399655eca4e58e
  26:     0x558e73b5a889 - wasmtime::module::Module::from_file::h41b3bec67222a9c0
  27:     0x558e73c1633a - wasmtime_cli::commands::run::RunCommand::load_module::h533df73bf9ca31e4
  28:     0x558e73c152d9 - wasmtime_cli::commands::run::RunCommand::load_main_module::h30816ab05f358e89
  29:     0x558e73c143e1 - wasmtime_cli::commands::run::RunCommand::execute::h3e5bf7454f6deb5e
  30:     0x558e73b4e667 - wasmtime::main::h3d0de3bd65cce4ac
  31:     0x558e73b4a923 - std::sys_common::backtrace::__rust_begin_short_backtrace::hf63df8345dd90192
  32:     0x558e73b49a49 - std::rt::lang_start::{{closure}}::hd2c4ffc18ae30024
  33:     0x558e7427ed9f - core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &F>::call_once::hb69be6e0857c6cfb
                               at /rustc/897e37553bba8b42751c67658967889d11ecd120/library/core/src/ops/function.rs:283:13
  34:     0x558e7427ed9f - std::panicking::try::do_call::h396dfc441ee9c786
                               at /rustc/897e37553bba8b42751c67658967889d11ecd120/library/std/src/panicking.rs:492:40
  35:     0x558e7427ed9f - std::panicking::try::h6cdda972d28b3a4f
                               at /rustc/897e37553bba8b42751c67658967889d11ecd120/library/std/src/panicking.rs:456:19
  36:     0x558e7427ed9f - std::panic::catch_unwind::h376039ec264e8ef9
                               at /rustc/897e37553bba8b42751c67658967889d11ecd120/library/std/src/panic.rs:137:14
  37:     0x558e7427ed9f - std::rt::lang_start_internal::{{closure}}::hc94720ca3d4cb727
                               at /rustc/897e37553bba8b42751c67658967889d11ecd120/library/std/src/rt.rs:148:48
  38:     0x558e7427ed9f - std::panicking::try::do_call::h2422fb95933fa2d5
                               at /rustc/897e37553bba8b42751c67658967889d11ecd120/library/std/src/panicking.rs:492:40
  39:     0x558e7427ed9f - std::panicking::try::h488286b5ec8333ff
                               at /rustc/897e37553bba8b42751c67658967889d11ecd120/library/std/src/panicking.rs:456:19
  40:     0x558e7427ed9f - std::panic::catch_unwind::h81636549836d2a25
                               at /rustc/897e37553bba8b42751c67658967889d11ecd120/library/std/src/panic.rs:137:14
  41:     0x558e7427ed9f - std::rt::lang_start_internal::h6ba1bb743c1e9df9
                               at /rustc/897e37553bba8b42751c67658967889d11ecd120/library/std/src/rt.rs:148:20
  42:     0x558e73b4e7f8 - main
  43:     0x7f982faa9d90 - <unknown>
  44:     0x7f982faa9e40 - __libc_start_main
  45:     0x558e73b48432 - <unknown>
  46:                0x0 - <unknown>

Versions and Environment

Cranelift version or commit: wasmtime 3
Operating system: Ubuntu 22.04
Architecture: amd64

view this post on Zulip Wasmtime GitHub notifications bot (Dec 07 2022 at 20:03):

brendandburns edited issue #5395:

Thanks for filing an issue! Please fill out the TODOs below.

Steps to Reproduce

wasmtime run -g starter.wasm (wasm attached)

starter.was.zip

Expected Results

Debug execution should work. Program executes correctly without the -g flag.

Actual Results

# wasmtime run -g starter.wasm
thread 'main' panicked at 'assertion failed: range_start < range_end', crates/cranelift/src/debug/transform/expression.rs:689:13
stack backtrace:
   0:     0x558e7428a1c0 - std::backtrace_rs::backtrace::libunwind::trace::h32eb3e08e874dd27
                               at /rustc/897e37553bba8b42751c67658967889d11ecd120/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5
   1:     0x558e7428a1c0 - std::backtrace_rs::backtrace::trace_unsynchronized::haa3f451d27bc11a5
                               at /rustc/897e37553bba8b42751c67658967889d11ecd120/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x558e7428a1c0 - std::sys_common::backtrace::_print_fmt::h5b94a01bb4289bb5
                               at /rustc/897e37553bba8b42751c67658967889d11ecd120/library/std/src/sys_common/backtrace.rs:66:5
   3:     0x558e7428a1c0 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::hb070b7fa7e3175df
                               at /rustc/897e37553bba8b42751c67658967889d11ecd120/library/std/src/sys_common/backtrace.rs:45:22
   4:     0x558e742aebbe - core::fmt::write::hd5207aebbb9a86e9
                               at /rustc/897e37553bba8b42751c67658967889d11ecd120/library/core/src/fmt/mod.rs:1202:17
   5:     0x558e74284515 - std::io::Write::write_fmt::h3bd699bbd129ab8a
                               at /rustc/897e37553bba8b42751c67658967889d11ecd120/library/std/src/io/mod.rs:1679:15
   6:     0x558e7428b9f3 - std::sys_common::backtrace::_print::h7a21be552fdf58da
                               at /rustc/897e37553bba8b42751c67658967889d11ecd120/library/std/src/sys_common/backtrace.rs:48:5
   7:     0x558e7428b9f3 - std::sys_common::backtrace::print::ha85c41fe4dd80b13
                               at /rustc/897e37553bba8b42751c67658967889d11ecd120/library/std/src/sys_common/backtrace.rs:35:9
   8:     0x558e7428b9f3 - std::panicking::default_hook::{{closure}}::h04cca40023d0eeca
                               at /rustc/897e37553bba8b42751c67658967889d11ecd120/library/std/src/panicking.rs:295:22
   9:     0x558e7428b6df - std::panicking::default_hook::haa3ca8c310ed5402
                               at /rustc/897e37553bba8b42751c67658967889d11ecd120/library/std/src/panicking.rs:314:9
  10:     0x558e7428c09a - std::panicking::rust_panic_with_hook::h7b190ce1a948faac
                               at /rustc/897e37553bba8b42751c67658967889d11ecd120/library/std/src/panicking.rs:698:17
  11:     0x558e7428bf51 - std::panicking::begin_panic_handler::{{closure}}::hbafbfdc3e1b97f68
                               at /rustc/897e37553bba8b42751c67658967889d11ecd120/library/std/src/panicking.rs:586:13
  12:     0x558e7428a66c - std::sys_common::backtrace::__rust_end_short_backtrace::hda93e5fef243b4c0
                               at /rustc/897e37553bba8b42751c67658967889d11ecd120/library/std/src/sys_common/backtrace.rs:138:18
  13:     0x558e7428bcb2 - rust_begin_unwind
                               at /rustc/897e37553bba8b42751c67658967889d11ecd120/library/std/src/panicking.rs:584:5
  14:     0x558e73b48153 - core::panicking::panic_fmt::h8d17ca1073d9a733
                               at /rustc/897e37553bba8b42751c67658967889d11ecd120/library/core/src/panicking.rs:142:14
  15:     0x558e73b4801d - core::panicking::panic::hf0565452d0d0936c
                               at /rustc/897e37553bba8b42751c67658967889d11ecd120/library/core/src/panicking.rs:48:5
  16:     0x558e73e10774 - wasmtime_cranelift::debug::transform::expression::ValueLabelRangesBuilder::process_label::h0330cc399cf05dc7
  17:     0x558e73e0e0df - wasmtime_cranelift::debug::transform::expression::CompiledExpression::build_with_locals::hadd8fdcea44efbcb
  18:     0x558e73e01cb1 - wasmtime_cranelift::debug::transform::simulate::generate_simulated_dwarf::h00319698559bad23
  19:     0x558e73e19d30 - wasmtime_cranelift::debug::transform::transform_dwarf::hbf122a28f47ff1e5
  20:     0x558e73e4673c - wasmtime_cranelift::debug::write_debuginfo::emit_dwarf::h49884fd3e60c8452
  21:     0x558e73e0b7a1 - <wasmtime_cranelift::compiler::Compiler as wasmtime_environ::compilation::Compiler>::append_dwarf::h259f1b6374c71f3c
  22:     0x558e73cda00e - wasmtime::module::Module::build_artifacts::h7464dac298520486
  23:     0x558e73cd2d5e - core::ops::function::FnOnce::call_once::hc3f1cfe9d8efba9e
  24:     0x558e73d28e82 - wasmtime_cache::ModuleCacheEntry::get_data_raw::h409e53792f24ba53
  25:     0x558e73cd9019 - wasmtime::module::Module::from_binary::h67399655eca4e58e
  26:     0x558e73b5a889 - wasmtime::module::Module::from_file::h41b3bec67222a9c0
  27:     0x558e73c1633a - wasmtime_cli::commands::run::RunCommand::load_module::h533df73bf9ca31e4
  28:     0x558e73c152d9 - wasmtime_cli::commands::run::RunCommand::load_main_module::h30816ab05f358e89
  29:     0x558e73c143e1 - wasmtime_cli::commands::run::RunCommand::execute::h3e5bf7454f6deb5e
  30:     0x558e73b4e667 - wasmtime::main::h3d0de3bd65cce4ac
  31:     0x558e73b4a923 - std::sys_common::backtrace::__rust_begin_short_backtrace::hf63df8345dd90192
  32:     0x558e73b49a49 - std::rt::lang_start::{{closure}}::hd2c4ffc18ae30024
  33:     0x558e7427ed9f - core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &F>::call_once::hb69be6e0857c6cfb
                               at /rustc/897e37553bba8b42751c67658967889d11ecd120/library/core/src/ops/function.rs:283:13
  34:     0x558e7427ed9f - std::panicking::try::do_call::h396dfc441ee9c786
                               at /rustc/897e37553bba8b42751c67658967889d11ecd120/library/std/src/panicking.rs:492:40
  35:     0x558e7427ed9f - std::panicking::try::h6cdda972d28b3a4f
                               at /rustc/897e37553bba8b42751c67658967889d11ecd120/library/std/src/panicking.rs:456:19
  36:     0x558e7427ed9f - std::panic::catch_unwind::h376039ec264e8ef9
                               at /rustc/897e37553bba8b42751c67658967889d11ecd120/library/std/src/panic.rs:137:14
  37:     0x558e7427ed9f - std::rt::lang_start_internal::{{closure}}::hc94720ca3d4cb727
                               at /rustc/897e37553bba8b42751c67658967889d11ecd120/library/std/src/rt.rs:148:48
  38:     0x558e7427ed9f - std::panicking::try::do_call::h2422fb95933fa2d5
                               at /rustc/897e37553bba8b42751c67658967889d11ecd120/library/std/src/panicking.rs:492:40
  39:     0x558e7427ed9f - std::panicking::try::h488286b5ec8333ff
                               at /rustc/897e37553bba8b42751c67658967889d11ecd120/library/std/src/panicking.rs:456:19
  40:     0x558e7427ed9f - std::panic::catch_unwind::h81636549836d2a25
                               at /rustc/897e37553bba8b42751c67658967889d11ecd120/library/std/src/panic.rs:137:14
  41:     0x558e7427ed9f - std::rt::lang_start_internal::h6ba1bb743c1e9df9
                               at /rustc/897e37553bba8b42751c67658967889d11ecd120/library/std/src/rt.rs:148:20
  42:     0x558e73b4e7f8 - main
  43:     0x7f982faa9d90 - <unknown>
  44:     0x7f982faa9e40 - __libc_start_main
  45:     0x558e73b48432 - <unknown>
  46:                0x0 - <unknown>

Versions and Environment

Cranelift version or commit: wasmtime 3
Operating system: Ubuntu 22.04
Architecture: amd64

view this post on Zulip Wasmtime GitHub notifications bot (Dec 07 2022 at 20:06):

bjorn3 commented on issue #5395:

To quote @cfallin from https://github.com/bytecodealliance/wasmtime/issues/4669#issuecomment-1210997950 (which is probably the same issue):

We currently don't have anyone on the project who understands our DWARF-handling code well and has time to work on it; so while this is definitely a bug, it's not likely to have a fast resolution. We do have an intent to have someone eventually focus on this, as priorities allow, so we should keep this issue open. Just wanted to give some context on the current situation...

view this post on Zulip Wasmtime GitHub notifications bot (Dec 07 2022 at 22:42):

alexcrichton commented on issue #5395:

I believe this is more-or-less a duplicate of https://github.com/bytecodealliance/wasmtime/issues/3999 so I'm going to close this in favor of that. I'd also highlight Chris's quote as well and recommend against enabling -g for now.

view this post on Zulip Wasmtime GitHub notifications bot (Dec 07 2022 at 22:42):

alexcrichton closed issue #5395:

Thanks for filing an issue! Please fill out the TODOs below.

Steps to Reproduce

wasmtime run -g starter.wasm (wasm attached)

starter.was.zip

Expected Results

Debug execution should work. Program executes correctly without the -g flag.

Actual Results

# wasmtime run -g starter.wasm
thread 'main' panicked at 'assertion failed: range_start < range_end', crates/cranelift/src/debug/transform/expression.rs:689:13
stack backtrace:
   0:     0x558e7428a1c0 - std::backtrace_rs::backtrace::libunwind::trace::h32eb3e08e874dd27
                               at /rustc/897e37553bba8b42751c67658967889d11ecd120/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5
   1:     0x558e7428a1c0 - std::backtrace_rs::backtrace::trace_unsynchronized::haa3f451d27bc11a5
                               at /rustc/897e37553bba8b42751c67658967889d11ecd120/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x558e7428a1c0 - std::sys_common::backtrace::_print_fmt::h5b94a01bb4289bb5
                               at /rustc/897e37553bba8b42751c67658967889d11ecd120/library/std/src/sys_common/backtrace.rs:66:5
   3:     0x558e7428a1c0 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::hb070b7fa7e3175df
                               at /rustc/897e37553bba8b42751c67658967889d11ecd120/library/std/src/sys_common/backtrace.rs:45:22
   4:     0x558e742aebbe - core::fmt::write::hd5207aebbb9a86e9
                               at /rustc/897e37553bba8b42751c67658967889d11ecd120/library/core/src/fmt/mod.rs:1202:17
   5:     0x558e74284515 - std::io::Write::write_fmt::h3bd699bbd129ab8a
                               at /rustc/897e37553bba8b42751c67658967889d11ecd120/library/std/src/io/mod.rs:1679:15
   6:     0x558e7428b9f3 - std::sys_common::backtrace::_print::h7a21be552fdf58da
                               at /rustc/897e37553bba8b42751c67658967889d11ecd120/library/std/src/sys_common/backtrace.rs:48:5
   7:     0x558e7428b9f3 - std::sys_common::backtrace::print::ha85c41fe4dd80b13
                               at /rustc/897e37553bba8b42751c67658967889d11ecd120/library/std/src/sys_common/backtrace.rs:35:9
   8:     0x558e7428b9f3 - std::panicking::default_hook::{{closure}}::h04cca40023d0eeca
                               at /rustc/897e37553bba8b42751c67658967889d11ecd120/library/std/src/panicking.rs:295:22
   9:     0x558e7428b6df - std::panicking::default_hook::haa3ca8c310ed5402
                               at /rustc/897e37553bba8b42751c67658967889d11ecd120/library/std/src/panicking.rs:314:9
  10:     0x558e7428c09a - std::panicking::rust_panic_with_hook::h7b190ce1a948faac
                               at /rustc/897e37553bba8b42751c67658967889d11ecd120/library/std/src/panicking.rs:698:17
  11:     0x558e7428bf51 - std::panicking::begin_panic_handler::{{closure}}::hbafbfdc3e1b97f68
                               at /rustc/897e37553bba8b42751c67658967889d11ecd120/library/std/src/panicking.rs:586:13
  12:     0x558e7428a66c - std::sys_common::backtrace::__rust_end_short_backtrace::hda93e5fef243b4c0
                               at /rustc/897e37553bba8b42751c67658967889d11ecd120/library/std/src/sys_common/backtrace.rs:138:18
  13:     0x558e7428bcb2 - rust_begin_unwind
                               at /rustc/897e37553bba8b42751c67658967889d11ecd120/library/std/src/panicking.rs:584:5
  14:     0x558e73b48153 - core::panicking::panic_fmt::h8d17ca1073d9a733
                               at /rustc/897e37553bba8b42751c67658967889d11ecd120/library/core/src/panicking.rs:142:14
  15:     0x558e73b4801d - core::panicking::panic::hf0565452d0d0936c
                               at /rustc/897e37553bba8b42751c67658967889d11ecd120/library/core/src/panicking.rs:48:5
  16:     0x558e73e10774 - wasmtime_cranelift::debug::transform::expression::ValueLabelRangesBuilder::process_label::h0330cc399cf05dc7
  17:     0x558e73e0e0df - wasmtime_cranelift::debug::transform::expression::CompiledExpression::build_with_locals::hadd8fdcea44efbcb
  18:     0x558e73e01cb1 - wasmtime_cranelift::debug::transform::simulate::generate_simulated_dwarf::h00319698559bad23
  19:     0x558e73e19d30 - wasmtime_cranelift::debug::transform::transform_dwarf::hbf122a28f47ff1e5
  20:     0x558e73e4673c - wasmtime_cranelift::debug::write_debuginfo::emit_dwarf::h49884fd3e60c8452
  21:     0x558e73e0b7a1 - <wasmtime_cranelift::compiler::Compiler as wasmtime_environ::compilation::Compiler>::append_dwarf::h259f1b6374c71f3c
  22:     0x558e73cda00e - wasmtime::module::Module::build_artifacts::h7464dac298520486
  23:     0x558e73cd2d5e - core::ops::function::FnOnce::call_once::hc3f1cfe9d8efba9e
  24:     0x558e73d28e82 - wasmtime_cache::ModuleCacheEntry::get_data_raw::h409e53792f24ba53
  25:     0x558e73cd9019 - wasmtime::module::Module::from_binary::h67399655eca4e58e
  26:     0x558e73b5a889 - wasmtime::module::Module::from_file::h41b3bec67222a9c0
  27:     0x558e73c1633a - wasmtime_cli::commands::run::RunCommand::load_module::h533df73bf9ca31e4
  28:     0x558e73c152d9 - wasmtime_cli::commands::run::RunCommand::load_main_module::h30816ab05f358e89
  29:     0x558e73c143e1 - wasmtime_cli::commands::run::RunCommand::execute::h3e5bf7454f6deb5e
  30:     0x558e73b4e667 - wasmtime::main::h3d0de3bd65cce4ac
  31:     0x558e73b4a923 - std::sys_common::backtrace::__rust_begin_short_backtrace::hf63df8345dd90192
  32:     0x558e73b49a49 - std::rt::lang_start::{{closure}}::hd2c4ffc18ae30024
  33:     0x558e7427ed9f - core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &F>::call_once::hb69be6e0857c6cfb
                               at /rustc/897e37553bba8b42751c67658967889d11ecd120/library/core/src/ops/function.rs:283:13
  34:     0x558e7427ed9f - std::panicking::try::do_call::h396dfc441ee9c786
                               at /rustc/897e37553bba8b42751c67658967889d11ecd120/library/std/src/panicking.rs:492:40
  35:     0x558e7427ed9f - std::panicking::try::h6cdda972d28b3a4f
                               at /rustc/897e37553bba8b42751c67658967889d11ecd120/library/std/src/panicking.rs:456:19
  36:     0x558e7427ed9f - std::panic::catch_unwind::h376039ec264e8ef9
                               at /rustc/897e37553bba8b42751c67658967889d11ecd120/library/std/src/panic.rs:137:14
  37:     0x558e7427ed9f - std::rt::lang_start_internal::{{closure}}::hc94720ca3d4cb727
                               at /rustc/897e37553bba8b42751c67658967889d11ecd120/library/std/src/rt.rs:148:48
  38:     0x558e7427ed9f - std::panicking::try::do_call::h2422fb95933fa2d5
                               at /rustc/897e37553bba8b42751c67658967889d11ecd120/library/std/src/panicking.rs:492:40
  39:     0x558e7427ed9f - std::panicking::try::h488286b5ec8333ff
                               at /rustc/897e37553bba8b42751c67658967889d11ecd120/library/std/src/panicking.rs:456:19
  40:     0x558e7427ed9f - std::panic::catch_unwind::h81636549836d2a25
                               at /rustc/897e37553bba8b42751c67658967889d11ecd120/library/std/src/panic.rs:137:14
  41:     0x558e7427ed9f - std::rt::lang_start_internal::h6ba1bb743c1e9df9
                               at /rustc/897e37553bba8b42751c67658967889d11ecd120/library/std/src/rt.rs:148:20
  42:     0x558e73b4e7f8 - main
  43:     0x7f982faa9d90 - <unknown>
  44:     0x7f982faa9e40 - __libc_start_main
  45:     0x558e73b48432 - <unknown>
  46:                0x0 - <unknown>

Versions and Environment

Cranelift version or commit: wasmtime 3
Operating system: Ubuntu 22.04
Architecture: amd64


Last updated: Nov 22 2024 at 17:03 UTC