pulldown-cmark icon indicating copy to clipboard operation
pulldown-cmark copied to clipboard

`cargo bench --all-features` panic

Open Martin1887 opened this issue 2 years ago • 0 comments

This panic only happens when using simd, it happens in different lines of firstpass.rs each time and it does not happen all times:

Benchmarking pathological_codeblocks1/9: Warming up for 3.0000 sthread 'main' panicked at 'byte index 4515 is out of bounds of ````````````````````````````````````````````````````````````````````````````````````````````````````` ````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````[...]', src/firstpass.rs:580:42
stack backtrace:
   0: rust_begin_unwind
             at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/panicking.rs:579:5
   1: core::panicking::panic_fmt
             at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/core/src/panicking.rs:64:14
   2: core::str::slice_error_fail_rt
   3: core::str::slice_error_fail
             at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/core/src/str/mod.rs:86:9
   4: pulldown_cmark::firstpass::simd::process_mask
   5: pulldown_cmark::firstpass::simd::simd_iterate_special_bytes
   6: pulldown_cmark::firstpass::FirstPass::run
   7: pulldown_cmark::firstpass::run_first_pass
   8: pulldown_cmark::parse::Parser::new_ext
   9: lib::to_html::render_html
  10: criterion::bencher::Bencher<M>::iter
  11: <criterion::routine::Function<M,F,T> as criterion::routine::Routine<M,T>>::warm_up
  12: criterion::routine::Routine::sample
  13: criterion::analysis::common
  14: lib::to_html::pathological_codeblocks1
  15: lib::main
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

Benchmarking pathological_codeblocks1/8: Warming up for 3.0000 sthread 'main' panicked at 'byte index 3613 is out of bounds of ````````````````````````````````````````````````````````````````````````````````````````````````````` ````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````[...]', src/parse.rs:1450:46
stack backtrace:
   0: rust_begin_unwind
             at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/panicking.rs:579:5
   1: core::panicking::panic_fmt
             at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/core/src/panicking.rs:64:14
   2: core::str::slice_error_fail_rt
   3: core::str::slice_error_fail
             at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/core/src/str/mod.rs:86:9
   4: pulldown_cmark::parse::item_to_event
   5: <pulldown_cmark::parse::Parser as core::iter::traits::iterator::Iterator>::next
   6: pulldown_cmark::html::HtmlWriter<I,W>::run
   7: pulldown_cmark::html::push_html
   8: lib::to_html::render_html
   9: criterion::bencher::Bencher<M>::iter
  10: <criterion::routine::Function<M,F,T> as criterion::routine::Routine<M,T>>::warm_up
  11: criterion::routine::Routine::sample
  12: criterion::analysis::common
  13: lib::to_html::pathological_codeblocks1
  14: lib::main
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

Benchmarking pathological_codeblocks1/8: Warming up for 3.0000 sthread 'main' panicked at 'byte index 3611 is out of bounds of ````````````````````````````````````````````````````````````````````````````````````````````````````` ````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````[...]', src/firstpass.rs:730:42
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Martin1887 avatar May 27 '23 09:05 Martin1887