Skip to content

Haskell/SQL comment parsing failure #89

@masaeedu

Description

@masaeedu

Hello there. I have delta configured as my git pager, but occasionally I see error messages indicating the executable panics and crashes:

➜  automonad.hs git:(master) git show
thread 'main' panicked at 'byte index 2 is out of bounds of ``', src/libcore/str/mod.rs:2051:9
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace.

I don't really know how to go about debugging this, although I did run it with RUST_BACKTRACE=full and collected the following output:

➜  automonad.hs git:(master) git show
thread 'main' panicked at 'byte index 2 is out of bounds of ``', src/libcore/str/mod.rs:2051:9
stack backtrace:
   0:     0x55d8a60c1784 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::he6f982049149276c
   1:     0x55d8a60e55ad - core::fmt::write::h0a4f9eb1997ae8a7
   2:     0x55d8a60bfe35 - std::io::Write::write_fmt::h0ef9dc02b782df17
   3:     0x55d8a60c2cde - std::panicking::default_hook::{{closure}}::h20d0965c2f49660f
   4:     0x55d8a60c29f0 - std::panicking::default_hook::h35815be434d41dd3
   5:     0x55d8a60c337b - std::panicking::rust_panic_with_hook::hb153f0c7d5f10b68
   6:     0x55d8a60c2f1e - std::panicking::continue_panic_fmt::hc6930181fc8baf87
   7:     0x55d8a60c2e06 - rust_begin_unwind
   8:     0x55d8a60e51ae - core::panicking::panic_fmt::h86f58df9a8c5a71a
   9:     0x55d8a60edbb7 - core::str::slice_error_fail::h7d12d290e1b1892c
  10:     0x55d8a5f95752 - core::str::traits::<impl core::slice::SliceIndex<str> for core::ops::range::RangeFrom<usize>>::index::{{closure}}::he8834dc4d8b68910
  11:     0x55d8a5f999db - delta::parse::get_file_path_from_file_meta_line::h50d8fc928cbb6dd3
  12:     0x55d8a5f7b234 - delta::delta::delta::h8aaa8e731fed5c22
  13:     0x55d8a5f88638 - delta::main::hfc852ff77c949988
  14:     0x55d8a5f894f1 - std::rt::lang_start::{{closure}}::h2a13986616b17724
  15:     0x55d8a60c2da3 - std::panicking::try::do_call::hf407ca0e1a546429
  16:     0x55d8a60d21da - __rust_maybe_catch_panic
  17:     0x55d8a60c8b79 - std::rt::lang_start_internal::h71b7dac5eb32cc57
  18:     0x55d8a5f894d2 - main
  19:     0x7f07b52a0b8e - __libc_start_main
  20:     0x55d8a5f7122a - _start
  21:                0x0 - <unknown>

The code does make heavy use of unicode symbols, I don't know if that might have anything to do with it?

I should mention that I only see this message after I exit the pager. There doesn't seem to be any noticeable issue when it comes to how the program is executing (maybe I'm not looking carefully enough), but I thought I'd let you know.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions