alacritty: 3-byte crash
alacritty crashes when I issue the following command:
echo 6KWe | base64 -d
Found by cat
ting the /dev/urandom
again. (Might be related to #499 .)
Backtrace:
thread 'main' panicked at 'index 25 out of range for slice of length 24', /checkout/src/libcore/slice/mod.rs:672
stack backtrace:
stack backtrace:
0: 0x55f7c9786e23 - std::sys::imp::backtrace::tracing::imp::unwind_backtrace::hab274209b3900f9c
at /checkout/src/libstd/sys/unix/backtrace/tracing/gcc_s.rs:49
1: 0x55f7c9783034 - std::sys_common::backtrace::_print::h8f655fc4b25b9b70
at /checkout/src/libstd/sys_common/backtrace.rs:71
2: 0x55f7c978cc37 - std::panicking::default_hook::{{closure}}::hd0f0fde26cdd4a91
at /checkout/src/libstd/sys_common/backtrace.rs:60
at /checkout/src/libstd/panicking.rs:355
3: 0x55f7c978c7fc - std::panicking::default_hook::h123df66825ae8c79
at /checkout/src/libstd/panicking.rs:371
4: 0x55f7c978d10b - std::panicking::rust_panic_with_hook::h3635757261b59272
at /checkout/src/libstd/panicking.rs:549
5: 0x55f7c978cfe4 - std::panicking::begin_panic::he3b450c9ca51fd2b
at /checkout/src/libstd/panicking.rs:511
6: 0x55f7c978cf19 - std::panicking::begin_panic_fmt::hf44dbae7fe247adf
at /checkout/src/libstd/panicking.rs:495
7: 0x55f7c978cea7 - rust_begin_unwind
at /checkout/src/libstd/panicking.rs:471
8: 0x55f7c97b7ded - core::panicking::panic_fmt::hde6a1a29c4abc8e6
at /checkout/src/libcore/panicking.rs:69
9: 0x55f7c97b7ee9 - core::slice::slice_index_len_fail::h8d6a353e66085a31
at /checkout/src/libcore/slice/mod.rs:672
10: 0x55f7c9737e47 - <core::ops::Range<usize> as core::slice::SliceIndex<[T]>>::index::ha12f7058d2f2ddad
at /checkout/src/libcore/slice/mod.rs:803
11: 0x55f7c972aace - core::slice::<impl core::ops::Index<I> for [T]>::index::h19b918c17299cb0b
at /checkout/src/libcore/slice/mod.rs:654
12: 0x55f7c973b4d2 - font::ft::FreeTypeRasterizer::get_rendered_glyph::ha10889efce849e32
at /home/amozes/workspace/github/alacritty/font/src/ft/mod.rs:217
13: 0x55f7c973b029 - font::ft::FreeTypeRasterizer::get_rendered_glyph::ha10889efce849e32
at /home/amozes/workspace/github/alacritty/font/src/ft/mod.rs:194
14: 0x55f7c973992d - <font::ft::FreeTypeRasterizer as font::Rasterize>::get_glyph::h865be892ed938886
at /home/amozes/workspace/github/alacritty/font/src/ft/mod.rs:85
15: 0x55f7c92e8ed6 - alacritty::renderer::GlyphCache::get::{{closure}}::h25eb2135d53f0bf2
at /home/amozes/workspace/github/alacritty/src/renderer/mod.rs:270
16: 0x55f7c92a286a - <std::collections::hash::map::Entry<'a, K, V>>::or_insert_with::h64977a0049ce1560
at /checkout/src/libstd/collections/hash/map.rs:1936
17: 0x55f7c92e8dd6 - alacritty::renderer::GlyphCache::get::h533abf2b25792cdc
at /home/amozes/workspace/github/alacritty/src/renderer/mod.rs:267
18: 0x55f7c92ec19c - alacritty::renderer::RenderApi::render_cells::h709352b1c43cc71b
at /home/amozes/workspace/github/alacritty/src/renderer/mod.rs:785
19: 0x55f7c92e4b1e - alacritty::display::Display::draw::{{closure}}::hf31aab8dbf3ee1a0
at /home/amozes/workspace/github/alacritty/src/display.rs:299
20: 0x55f7c92ea775 - alacritty::renderer::QuadRenderer::with_api::h6adcf7ff439417bb
at /home/amozes/workspace/github/alacritty/src/renderer/mod.rs:610
21: 0x55f7c92e4734 - alacritty::display::Display::draw::h86ecf4d9d58d2ac0
at /home/amozes/workspace/github/alacritty/src/display.rs:297
22: 0x55f7c915bcdd - alacritty::run::h1531f576730b74a1
at /home/amozes/workspace/github/alacritty/src/main.rs:172
23: 0x55f7c915a57c - alacritty::main::hb27efce3c2542868
at /home/amozes/workspace/github/alacritty/src/main.rs:64
24: 0x55f7c979405a - __rust_maybe_catch_panic
at /checkout/src/libpanic_unwind/lib.rs:98
25: 0x55f7c978d8aa - std::rt::lang_start::ha5350a26f8f175ab
at /checkout/src/libstd/panicking.rs:433
at /checkout/src/libstd/panic.rs:361
at /checkout/src/libstd/rt.rs:57
26: 0x55f7c915c322 - main
27: 0x7fbd4fc78290 - __libc_start_main
28: 0x55f7c90b47a9 - _start
29: 0x0 - <unknown>
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 27 (9 by maintainers)
Commits related to this issue
- Fixes font raster for mono, gray bitmaps As it turns out, FreeType does not always provide glyph data in LCD mode as we requested. We now correctly handle several common modes returned from FreeType ... — committed to alacritty/alacritty by jwilm 7 years ago
- Fixes font raster for mono, gray bitmaps (#590) As it turns out, FreeType does not always provide glyph data in LCD mode as we requested. We now correctly handle several common modes returned from ... — committed to alacritty/alacritty by jwilm 7 years ago
- Fixes font raster for mono, gray bitmaps (#590) As it turns out, FreeType does not always provide glyph data in LCD mode as we requested. We now correctly handle several common modes returned from ... — committed to chrisduerr/alacritty by jwilm 7 years ago
Hey @m-wynn,
Thanks so much for the research you’ve done and for the test programs! Knowing that this was not a problem with the Rust bindings significantly narrowed down the problem space.
Using the test program/font you’ve provided, I’ve been able to put together a solution in #590. Would you mind taking it for a spin?