bnjbvr commented on Issue #1059:
Not fixed, though: it's still panicking somewhere else. We should throw a verifier error and have a nice error message in this case.
bnjbvr labeled Issue #1059:
function u0:0() -> i32 system_v { gv0 = symbol colocated u1:0 jt0 = jump_table [ebb1, ebb3] ebb0: v0 = global_value.i64 gv0 v1 = load.i32 v0 v3 = icmp_imm uge v1, 1 brnz v3, ebb4 jump ebb3 ebb1: ebb3: v2 = iconst.i32 1 return v2 ebb4: v4 = iadd_imm.i32 v1, -1 br_table v4, ebb3, jt0 ebb2: v5 = iconst.i32 0 return v5 } thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', src/libcore/option.rs:347:21 stack backtrace: 0: backtrace::backtrace::libunwind::trace at /cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.29/src/backtrace/libunwind.rs:88 1: backtrace::backtrace::trace_unsynchronized at /cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.29/src/backtrace/mod.rs:66 2: std::sys_common::backtrace::_print at src/libstd/sys_common/backtrace.rs:47 3: std::sys_common::backtrace::print at src/libstd/sys_common/backtrace.rs:36 4: std::panicking::default_hook::{{closure}} at src/libstd/panicking.rs:200 5: std::panicking::default_hook at src/libstd/panicking.rs:214 6: std::panicking::rust_panic_with_hook at src/libstd/panicking.rs:477 7: std::panicking::continue_panic_fmt at src/libstd/panicking.rs:384 8: rust_begin_unwind at src/libstd/panicking.rs:311 9: core::panicking::panic_fmt at src/libcore/panicking.rs:85 10: core::panicking::panic at src/libcore/panicking.rs:49 11: core::option::Option<T>::unwrap 12: cranelift_codegen::simple_gvn::do_simple_gvn 13: cranelift_codegen::context::Context::simple_gvn 14: cranelift_codegen::context::Context::compile 15: cranelift_module::module::Module<B>::define_function ... truncated ...
jyn514 commented on Issue #1059:
@bnjbvr that PR was never merged.
bnjbvr commented on Issue #1059:
Sorry, I was it was closed, so I read that as merged, but no. That's a relatively easy bug to fix, though, if somebody wants to chime in!
data-pup commented on Issue #1059:
I'd love to try and take a swing at fixing this, if nobody else has started on it already. :smiley_cat:
jyn514 commented on Issue #1059:
@data-pup if you like you can just make a PR with my code: https://github.com/bytecodealliance/cranelift/commit/57830123733497558274b1514168a55d2dad2f55
data-pup commented on Issue #1059:
I hadn't realized you already had a commit that takes care of this! Thanks @jyn514. I cherry-picked that code and updated the call to the
fatal!
macro, so hopefully this can be closed soon.
abrown closed Issue #1059:
function u0:0() -> i32 system_v { gv0 = symbol colocated u1:0 jt0 = jump_table [ebb1, ebb3] ebb0: v0 = global_value.i64 gv0 v1 = load.i32 v0 v3 = icmp_imm uge v1, 1 brnz v3, ebb4 jump ebb3 ebb1: ebb3: v2 = iconst.i32 1 return v2 ebb4: v4 = iadd_imm.i32 v1, -1 br_table v4, ebb3, jt0 ebb2: v5 = iconst.i32 0 return v5 } thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', src/libcore/option.rs:347:21 stack backtrace: 0: backtrace::backtrace::libunwind::trace at /cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.29/src/backtrace/libunwind.rs:88 1: backtrace::backtrace::trace_unsynchronized at /cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.29/src/backtrace/mod.rs:66 2: std::sys_common::backtrace::_print at src/libstd/sys_common/backtrace.rs:47 3: std::sys_common::backtrace::print at src/libstd/sys_common/backtrace.rs:36 4: std::panicking::default_hook::{{closure}} at src/libstd/panicking.rs:200 5: std::panicking::default_hook at src/libstd/panicking.rs:214 6: std::panicking::rust_panic_with_hook at src/libstd/panicking.rs:477 7: std::panicking::continue_panic_fmt at src/libstd/panicking.rs:384 8: rust_begin_unwind at src/libstd/panicking.rs:311 9: core::panicking::panic_fmt at src/libcore/panicking.rs:85 10: core::panicking::panic at src/libcore/panicking.rs:49 11: core::option::Option<T>::unwrap 12: cranelift_codegen::simple_gvn::do_simple_gvn 13: cranelift_codegen::context::Context::simple_gvn 14: cranelift_codegen::context::Context::compile 15: cranelift_module::module::Module<B>::define_function ... truncated ...
Last updated: Nov 22 2024 at 16:03 UTC