Skip to content
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

thread 'main' panicked at 'index out of bounds: the len is 0 but the index is 0' #43

Open
sigaloid opened this issue Oct 24, 2021 · 0 comments · May be fixed by #46
Open

thread 'main' panicked at 'index out of bounds: the len is 0 but the index is 0' #43

sigaloid opened this issue Oct 24, 2021 · 0 comments · May be fixed by #46

Comments

@sigaloid
Copy link

fn main() {
    let _ = markdown::to_html("- ");
}
stack backtrace:
   0:     0x562a7fae041c - std::backtrace_rs::backtrace::libunwind::trace::hc6c3491277866fea
                               at /rustc/efd0483949496b067cd5f7569d1b28cd3d5d3c72/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5
   1:     0x562a7fae041c - std::backtrace_rs::backtrace::trace_unsynchronized::h4524f073368a5b13
                               at /rustc/efd0483949496b067cd5f7569d1b28cd3d5d3c72/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x562a7fae041c - std::sys_common::backtrace::_print_fmt::h0d0cace6159902af
                               at /rustc/efd0483949496b067cd5f7569d1b28cd3d5d3c72/library/std/src/sys_common/backtrace.rs:67:5
   3:     0x562a7fae041c - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h3e6af6f05919a7fc
                               at /rustc/efd0483949496b067cd5f7569d1b28cd3d5d3c72/library/std/src/sys_common/backtrace.rs:46:22
   4:     0x562a7fafc09c - core::fmt::write::h72801a82c94e6ff1
                               at /rustc/efd0483949496b067cd5f7569d1b28cd3d5d3c72/library/core/src/fmt/mod.rs:1163:17
   5:     0x562a7fadd985 - std::io::Write::write_fmt::ha4f5d34aaccbac84
                               at /rustc/efd0483949496b067cd5f7569d1b28cd3d5d3c72/library/std/src/io/mod.rs:1696:15
   6:     0x562a7fae1c50 - std::sys_common::backtrace::_print::heed69f5ce9a8e189
                               at /rustc/efd0483949496b067cd5f7569d1b28cd3d5d3c72/library/std/src/sys_common/backtrace.rs:49:5
   7:     0x562a7fae1c50 - std::sys_common::backtrace::print::h5f3918bd80c09252
                               at /rustc/efd0483949496b067cd5f7569d1b28cd3d5d3c72/library/std/src/sys_common/backtrace.rs:36:9
   8:     0x562a7fae1c50 - std::panicking::default_hook::{{closure}}::h5af30648530eb3d0
                               at /rustc/efd0483949496b067cd5f7569d1b28cd3d5d3c72/library/std/src/panicking.rs:210:50
   9:     0x562a7fae17fb - std::panicking::default_hook::he88d5fb1ba1b4c19
                               at /rustc/efd0483949496b067cd5f7569d1b28cd3d5d3c72/library/std/src/panicking.rs:227:9
  10:     0x562a7fae2434 - std::panicking::rust_panic_with_hook::h01febc308b2b313b
                               at /rustc/efd0483949496b067cd5f7569d1b28cd3d5d3c72/library/std/src/panicking.rs:602:17
  11:     0x562a7fae1ee0 - std::panicking::begin_panic_handler::{{closure}}::h24a6d13f5560b71f
                               at /rustc/efd0483949496b067cd5f7569d1b28cd3d5d3c72/library/std/src/panicking.rs:499:13
  12:     0x562a7fae08c4 - std::sys_common::backtrace::__rust_end_short_backtrace::h3e2917f0da9fbc5c
                               at /rustc/efd0483949496b067cd5f7569d1b28cd3d5d3c72/library/std/src/sys_common/backtrace.rs:139:18
  13:     0x562a7fae1e49 - rust_begin_unwind
                               at /rustc/efd0483949496b067cd5f7569d1b28cd3d5d3c72/library/std/src/panicking.rs:495:5
  14:     0x562a7fafb101 - core::panicking::panic_fmt::h7b8580d81fcbbacd
                               at /rustc/efd0483949496b067cd5f7569d1b28cd3d5d3c72/library/core/src/panicking.rs:107:14
  15:     0x562a7fafb0c2 - core::panicking::panic_bounds_check::h63650a5dfc9aa86f
                               at /rustc/efd0483949496b067cd5f7569d1b28cd3d5d3c72/library/core/src/panicking.rs:76:5
  16:     0x562a7f8f6dfe - <usize as core::slice::index::SliceIndex<[T]>>::index::h57953ecc531e17b4
                               at /rustc/efd0483949496b067cd5f7569d1b28cd3d5d3c72/library/core/src/slice/index.rs:184:10
  17:     0x562a7f90a207 - core::slice::index::<impl core::ops::index::Index<I> for [T]>::index::h858ea629fd93c99c
                               at /rustc/efd0483949496b067cd5f7569d1b28cd3d5d3c72/library/core/src/slice/index.rs:15:9
  18:     0x562a7f8eefe9 - <alloc::vec::Vec<T,A> as core::ops::index::Index<I>>::index::hda3152a2dd28b26d
                               at /rustc/efd0483949496b067cd5f7569d1b28cd3d5d3c72/library/alloc/src/vec/mod.rs:2496:9
  19:     0x562a7f90d278 - markdown::parser::block::unordered_list::parse_unordered_list::h4badd496130fec7b
                               at /home/matt/.cargo/registry/src/gh.neting.cc-1ecc6299db9ec823/markdown-0.3.0/src/parser/block/unordered_list.rs:84:44
  20:     0x562a7f8f5940 - markdown::parser::block::parse_block::h6aa1489b4128334c
                               at /home/matt/.cargo/registry/src/gh.neting.cc-1ecc6299db9ec823/markdown-0.3.0/src/parser/block/mod.rs:71:5
  21:     0x562a7f8f4e4f - markdown::parser::block::parse_blocks::h76c435afecc4a1da
                               at /home/matt/.cargo/registry/src/gh.neting.cc-1ecc6299db9ec823/markdown-0.3.0/src/parser/block/mod.rs:27:15
  22:     0x562a7f90b12a - markdown::parser::parse::h1c2a7ad7977b98b1
                               at /home/matt/.cargo/registry/src/gh.neting.cc-1ecc6299db9ec823/markdown-0.3.0/src/parser/mod.rs:43:5
  23:     0x562a7f8f7f12 - markdown::to_html::hbf9e013e30e75fff
                               at /home/matt/.cargo/registry/src/gh.neting.cc-1ecc6299db9ec823/markdown-0.3.0/src/lib.rs:29:18
  24:     0x562a7f8ed1c9 - markdown_fuzz::main::h6cdf86ba5589bddf
                               at /home/matt/rust/markdown-fuzz/src/main.rs:2:13
  25:     0x562a7f8ed2fb - core::ops::function::FnOnce::call_once::h520c396ff3575786
                               at /rustc/efd0483949496b067cd5f7569d1b28cd3d5d3c72/library/core/src/ops/function.rs:227:5
  26:     0x562a7f8ed28e - std::sys_common::backtrace::__rust_begin_short_backtrace::ha170754eceb27b9b
                               at /rustc/efd0483949496b067cd5f7569d1b28cd3d5d3c72/library/std/src/sys_common/backtrace.rs:123:18
  27:     0x562a7f8ed261 - std::rt::lang_start::{{closure}}::h6196b6819679e06e
                               at /rustc/efd0483949496b067cd5f7569d1b28cd3d5d3c72/library/std/src/rt.rs:146:18
  28:     0x562a7fadfcb1 - core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &F>::call_once::h6743157f0325d450
                               at /rustc/efd0483949496b067cd5f7569d1b28cd3d5d3c72/library/core/src/ops/function.rs:259:13
  29:     0x562a7fadfcb1 - std::panicking::try::do_call::hc65378359d322d46
                               at /rustc/efd0483949496b067cd5f7569d1b28cd3d5d3c72/library/std/src/panicking.rs:403:40
  30:     0x562a7fadfcb1 - std::panicking::try::h52b83ca0140efb28
                               at /rustc/efd0483949496b067cd5f7569d1b28cd3d5d3c72/library/std/src/panicking.rs:367:19
  31:     0x562a7fadfcb1 - std::panic::catch_unwind::h0ba25f4b0d3448dc
                               at /rustc/efd0483949496b067cd5f7569d1b28cd3d5d3c72/library/std/src/panic.rs:133:14
  32:     0x562a7fadfcb1 - std::rt::lang_start_internal::{{closure}}::ha65f28100c5ad390
                               at /rustc/efd0483949496b067cd5f7569d1b28cd3d5d3c72/library/std/src/rt.rs:128:48
  33:     0x562a7fadfcb1 - std::panicking::try::do_call::h5db5edfaf5b749d9
                               at /rustc/efd0483949496b067cd5f7569d1b28cd3d5d3c72/library/std/src/panicking.rs:403:40
  34:     0x562a7fadfcb1 - std::panicking::try::h62409771d6cd0419
                               at /rustc/efd0483949496b067cd5f7569d1b28cd3d5d3c72/library/std/src/panicking.rs:367:19
  35:     0x562a7fadfcb1 - std::panic::catch_unwind::h386261fb8f018fab
                               at /rustc/efd0483949496b067cd5f7569d1b28cd3d5d3c72/library/std/src/panic.rs:133:14
  36:     0x562a7fadfcb1 - std::rt::lang_start_internal::h699f3530566c1833
                               at /rustc/efd0483949496b067cd5f7569d1b28cd3d5d3c72/library/std/src/rt.rs:128:20
  37:     0x562a7f8ed230 - std::rt::lang_start::ha828cf927dff4f89
                               at /rustc/efd0483949496b067cd5f7569d1b28cd3d5d3c72/library/std/src/rt.rs:145:17
  38:     0x562a7f8ed1fc - main
  39:     0x7f56da310b25 - __libc_start_main
  40:     0x562a7f8ed09e - _start
  41:                0x0 - <unknown>
sigaloid added a commit to sigaloid/markdown.rs that referenced this issue Oct 24, 2021
@sigaloid sigaloid mentioned this issue Oct 24, 2021
@sigaloid sigaloid linked a pull request Nov 2, 2021 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant