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

unsafe precondition(s) violated: slice::from_raw_parts requires the pointer to be aligned and non-null, and the total size of the slice not to exceed isize::MAX #7736

Open
matthiaskrgr opened this issue Feb 15, 2024 · 1 comment

Comments

@matthiaskrgr
Copy link
Contributor

matthiaskrgr commented Feb 15, 2024

For bug reports, the following information can help speed up the process. Please
describe the bug that you have found and what you would expect to happen
instead.

System

OS: Linux/BSD/macOS/Windows
Version: alacritty --version output
Linux/BSD: X11/Wayland, DE or Compositor and WM
Linux p14s 6.6.10-1-MANJARO #1 SMP PREEMPT_DYNAMIC Fri Jan 5 17:38:36 UTC 2024 x86_64 GNU/Linux
i3

Logs

Crashes: STDERR, STDOUT
Font/Terminal size: alacritty -vv
Keyboard and bindings: alacritty --print-events

I built alacritty using rustc 1.78.0-nightly (ee9c7c940 2024-02-14)
@ f1853a0
RUST_BACKTRACE=full cargo run

    Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.22s
     Running `target/debug/alacritty`
thread 'main' panicked at library/core/src/panicking.rs:155:5:
unsafe precondition(s) violated: slice::from_raw_parts requires the pointer to be aligned and non-null, and the total size of the slice not to exceed `isize::MAX`
stack backtrace:
   0:     0x562e45f0d906 - std::backtrace_rs::backtrace::libunwind::trace::h5168cb64cb843b87
                               at /rustc/ee9c7c940c07d8b67c9a6b2ec930db70dcd23a46/library/std/src/../../backtrace/src/backtrace/libunwind.rs:104:5
   1:     0x562e45f0d906 - std::backtrace_rs::backtrace::trace_unsynchronized::hbbff473666b784c6
                               at /rustc/ee9c7c940c07d8b67c9a6b2ec930db70dcd23a46/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x562e45f0d906 - std::sys_common::backtrace::_print_fmt::h6c61b632e6cc7949
                               at /rustc/ee9c7c940c07d8b67c9a6b2ec930db70dcd23a46/library/std/src/sys_common/backtrace.rs:68:5
   3:     0x562e45f0d906 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h974a6b559c2b8d41
                               at /rustc/ee9c7c940c07d8b67c9a6b2ec930db70dcd23a46/library/std/src/sys_common/backtrace.rs:44:22
   4:     0x562e45f3c0cc - core::fmt::rt::Argument::fmt::hf6a5273aff56768c
                               at /rustc/ee9c7c940c07d8b67c9a6b2ec930db70dcd23a46/library/core/src/fmt/rt.rs:142:9
   5:     0x562e45f3c0cc - core::fmt::write::h1caffe3a78971207
                               at /rustc/ee9c7c940c07d8b67c9a6b2ec930db70dcd23a46/library/core/src/fmt/mod.rs:1120:17
   6:     0x562e45f08ddf - std::io::Write::write_fmt::h2caf2bb3485e27a5
                               at /rustc/ee9c7c940c07d8b67c9a6b2ec930db70dcd23a46/library/std/src/io/mod.rs:1854:15
   7:     0x562e45f0d6b4 - std::sys_common::backtrace::_print::h0414d95b24b9ea44
                               at /rustc/ee9c7c940c07d8b67c9a6b2ec930db70dcd23a46/library/std/src/sys_common/backtrace.rs:47:5
   8:     0x562e45f0d6b4 - std::sys_common::backtrace::print::hfdf60e3b3d06625d
                               at /rustc/ee9c7c940c07d8b67c9a6b2ec930db70dcd23a46/library/std/src/sys_common/backtrace.rs:34:9
   9:     0x562e45f0ee9b - std::panicking::default_hook::{{closure}}::h3c1109072cde0ade
  10:     0x562e45f0ebe9 - std::panicking::default_hook::hfe3c076d4f24ecbe
                               at /rustc/ee9c7c940c07d8b67c9a6b2ec930db70dcd23a46/library/std/src/panicking.rs:292:9
  11:     0x562e45f0f3ad - std::panicking::rust_panic_with_hook::hc147efcd5d482f2c
                               at /rustc/ee9c7c940c07d8b67c9a6b2ec930db70dcd23a46/library/std/src/panicking.rs:781:13
  12:     0x562e45f0f249 - std::panicking::begin_panic_handler::{{closure}}::h6174f0cd2a065d90
                               at /rustc/ee9c7c940c07d8b67c9a6b2ec930db70dcd23a46/library/std/src/panicking.rs:651:13
  13:     0x562e45f0dde6 - std::sys_common::backtrace::__rust_end_short_backtrace::h770b1c8f4d2029d4
                               at /rustc/ee9c7c940c07d8b67c9a6b2ec930db70dcd23a46/library/std/src/sys_common/backtrace.rs:171:18
  14:     0x562e45f0efb4 - rust_begin_unwind
                               at /rustc/ee9c7c940c07d8b67c9a6b2ec930db70dcd23a46/library/std/src/panicking.rs:647:5
  15:     0x562e45f3937a - core::panicking::panic_nounwind_fmt::runtime::hacf978be322da297
                               at /rustc/ee9c7c940c07d8b67c9a6b2ec930db70dcd23a46/library/core/src/panicking.rs:110:18
  16:     0x562e45f3937a - core::panicking::panic_nounwind_fmt::h39abf66f752589ec
                               at /rustc/ee9c7c940c07d8b67c9a6b2ec930db70dcd23a46/library/core/src/panicking.rs:122:9
  17:     0x562e45f39429 - core::panicking::panic_nounwind::hac8537e6a12f3fda
                               at /rustc/ee9c7c940c07d8b67c9a6b2ec930db70dcd23a46/library/core/src/panicking.rs:155:5
  18:     0x562e45f43a0a - core::slice::raw::from_raw_parts::precondition_check::h78c17dfda614262f
                               at /rustc/ee9c7c940c07d8b67c9a6b2ec930db70dcd23a46/library/core/src/intrinsics.rs:2647:21
  19:     0x562e45eaa11f - core::slice::raw::from_raw_parts::hb0ea375c1bb6ad60
                               at /rustc/ee9c7c940c07d8b67c9a6b2ec930db70dcd23a46/library/core/src/slice/raw.rs:98:9
  20:     0x562e45bbb1e9 - freetype::bitmap::Bitmap::buffer::h7a9a7679bada3035
                               at /home/matthias/.cargo/registry/src/index.crates.io-6f17d22bba15001f/freetype-rs-0.26.0/src/bitmap.rs:67:13
  21:     0x562e45bb4be8 - crossfont::ft::FreeTypeRasterizer::normalize_buffer::hb5b57a60df8b1169
                               at /home/matthias/.cargo/registry/src/index.crates.io-6f17d22bba15001f/crossfont-0.7.0/src/ft/mod.rs:483:19
  22:     0x562e45bb2ccc - <crossfont::ft::FreeTypeRasterizer as crossfont::Rasterize>::get_glyph::hb15350c7ba11f150
                               at /home/matthias/.cargo/registry/src/index.crates.io-6f17d22bba15001f/crossfont-0.7.0/src/ft/mod.rs:251:13
  23:     0x562e4527c5e9 - alacritty::renderer::text::glyph_cache::GlyphCache::get::{{closure}}::hac1689a1ea5dde43
                               at /home/matthias/vcs/github/alacritty/alacritty/src/renderer/text/glyph_cache.rs:217:29
  24:     0x562e4538f5a1 - core::option::Option<T>::map_or_else::he4a35490a56cbaee
                               at /rustc/ee9c7c940c07d8b67c9a6b2ec930db70dcd23a46/library/core/src/option.rs:1178:21
  25:     0x562e4527b998 - alacritty::renderer::text::glyph_cache::GlyphCache::get::h8bcc7360e420299e
                               at /home/matthias/vcs/github/alacritty/alacritty/src/renderer/text/glyph_cache.rs:206:26
  26:     0x562e4527b0fc - alacritty::renderer::text::glyph_cache::GlyphCache::load_glyphs_for_font::h4545ec5a1d217400
                               at /home/matthias/vcs/github/alacritty/alacritty/src/renderer/text/glyph_cache.rs:112:13
  27:     0x562e4527ce46 - alacritty::renderer::text::glyph_cache::GlyphCache::load_common_glyphs::hd4d2174cc0e6d1b3
                               at /home/matthias/vcs/github/alacritty/alacritty/src/renderer/text/glyph_cache.rs:313:9
  28:     0x562e4527ce18 - alacritty::renderer::text::glyph_cache::GlyphCache::reset_glyph_cache::ha0db456264867b56
                               at /home/matthias/vcs/github/alacritty/alacritty/src/renderer/text/glyph_cache.rs:271:9
  29:     0x562e4510f62e - alacritty::display::Display::new::{{closure}}::h030eb2b9d19db5ee
                               at /home/matthias/vcs/github/alacritty/alacritty/src/display/mod.rs:436:13
  30:     0x562e452dc30c - alacritty::renderer::text::TextRenderer::with_loader::h308432261973b5b9
                               at /home/matthias/vcs/github/alacritty/alacritty/src/renderer/text/mod.rs:93:9
  31:     0x562e4527e240 - alacritty::renderer::Renderer::with_loader::hd326dfa4359a9c81
                               at /home/matthias/vcs/github/alacritty/alacritty/src/renderer/mod.rs:243:54
  32:     0x562e453405d0 - alacritty::display::Display::new::h13bb8a385d8dc7e4
                               at /home/matthias/vcs/github/alacritty/alacritty/src/display/mod.rs:435:9
  33:     0x562e451a36ba - alacritty::window_context::WindowContext::initial::h4b9f20b3056f88d9
                               at /home/matthias/vcs/github/alacritty/alacritty/src/window_context.rs:115:23
  34:     0x562e450e5ccc - alacritty::event::Processor::create_initial_window::h889d7fb6b2fa3193
                               at /home/matthias/vcs/github/alacritty/alacritty/src/event.rs:1540:13
  35:     0x562e453d0b57 - alacritty::event::Processor::run::{{closure}}::h735a165146d1230c
                               at /home/matthias/vcs/github/alacritty/alacritty/src/event.rs:1613:39
  36:     0x562e453c9cad - core::ops::function::impls::<impl core::ops::function::FnMut<A> for &mut F>::call_mut::hb01cf87c08741305
                               at /rustc/ee9c7c940c07d8b67c9a6b2ec930db70dcd23a46/library/core/src/ops/function.rs:294:13
  37:     0x562e4521e7c9 - winit::platform_impl::platform::x11::EventLoop<T>::single_iteration::h4812909a8d497bf9
                               at /home/matthias/.cargo/registry/src/index.crates.io-6f17d22bba15001f/winit-0.29.9/src/platform_impl/linux/x11/mod.rs:559:13
  38:     0x562e4521d506 - winit::platform_impl::platform::x11::EventLoop<T>::pump_events::h1680d8978be12565
                               at /home/matthias/.cargo/registry/src/index.crates.io-6f17d22bba15001f/winit-0.29.9/src/platform_impl/linux/x11/mod.rs:447:13
  39:     0x562e4521e115 - winit::platform_impl::platform::x11::EventLoop<T>::run_on_demand::h1177f6ae2dc4717f
                               at /home/matthias/.cargo/registry/src/index.crates.io-6f17d22bba15001f/winit-0.29.9/src/platform_impl/linux/x11/mod.rs:414:19
  40:     0x562e452bb31e - winit::platform_impl::platform::EventLoop<T>::run_on_demand::h0d3f24d1191d38f5
                               at /home/matthias/.cargo/registry/src/index.crates.io-6f17d22bba15001f/winit-0.29.9/src/platform_impl/linux/mod.rs:821:56
  41:     0x562e452bba56 - winit::platform_impl::platform::EventLoop<T>::run::h26ecc14cd83b3fff
                               at /home/matthias/.cargo/registry/src/index.crates.io-6f17d22bba15001f/winit-0.29.9/src/platform_impl/linux/mod.rs:814:9
  42:     0x562e451e0fa9 - winit::event_loop::EventLoop<T>::run::h48b6ce8150e1662d
                               at /home/matthias/.cargo/registry/src/index.crates.io-6f17d22bba15001f/winit-0.29.9/src/event_loop.rs:249:9
  43:     0x562e450e68e4 - alacritty::event::Processor::run::hf4667156f2fef4b6
                               at /home/matthias/vcs/github/alacritty/alacritty/src/event.rs:1592:22
  44:     0x562e451e27c7 - alacritty::alacritty::h313dea4f35dd0f96
                               at /home/matthias/vcs/github/alacritty/alacritty/src/main.rs:193:18
  45:     0x562e451e151b - alacritty::main::hca4cb4d8f103ea05
                               at /home/matthias/vcs/github/alacritty/alacritty/src/main.rs:83:17
  46:     0x562e4535f90b - core::ops::function::FnOnce::call_once::he04c0c33bbfbe6dd
                               at /rustc/ee9c7c940c07d8b67c9a6b2ec930db70dcd23a46/library/core/src/ops/function.rs:250:5
  47:     0x562e452cd62e - std::sys_common::backtrace::__rust_begin_short_backtrace::he7581b8cfb169a9e
                               at /rustc/ee9c7c940c07d8b67c9a6b2ec930db70dcd23a46/library/std/src/sys_common/backtrace.rs:155:18
  48:     0x562e451abb11 - std::rt::lang_start::{{closure}}::hd5f68fc71e0ce537
                               at /rustc/ee9c7c940c07d8b67c9a6b2ec930db70dcd23a46/library/std/src/rt.rs:166:18
  49:     0x562e45f01873 - core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &F>::call_once::hc36b43a1288b6012
                               at /rustc/ee9c7c940c07d8b67c9a6b2ec930db70dcd23a46/library/core/src/ops/function.rs:284:13
  50:     0x562e45f01873 - std::panicking::try::do_call::h844b4d6ecfb553d3
                               at /rustc/ee9c7c940c07d8b67c9a6b2ec930db70dcd23a46/library/std/src/panicking.rs:554:40
  51:     0x562e45f01873 - std::panicking::try::h7048ad249f068214
                               at /rustc/ee9c7c940c07d8b67c9a6b2ec930db70dcd23a46/library/std/src/panicking.rs:518:19
  52:     0x562e45f01873 - std::panic::catch_unwind::h83f04f61e603d0ee
                               at /rustc/ee9c7c940c07d8b67c9a6b2ec930db70dcd23a46/library/std/src/panic.rs:142:14
  53:     0x562e45f01873 - std::rt::lang_start_internal::{{closure}}::hc479341553d7de64
                               at /rustc/ee9c7c940c07d8b67c9a6b2ec930db70dcd23a46/library/std/src/rt.rs:148:48
  54:     0x562e45f01873 - std::panicking::try::do_call::hb01f1aef714830aa
                               at /rustc/ee9c7c940c07d8b67c9a6b2ec930db70dcd23a46/library/std/src/panicking.rs:554:40
  55:     0x562e45f01873 - std::panicking::try::h1254adfe9d387fa8
                               at /rustc/ee9c7c940c07d8b67c9a6b2ec930db70dcd23a46/library/std/src/panicking.rs:518:19
  56:     0x562e45f01873 - std::panic::catch_unwind::h6b1f4a6ae177441d
                               at /rustc/ee9c7c940c07d8b67c9a6b2ec930db70dcd23a46/library/std/src/panic.rs:142:14
  57:     0x562e45f01873 - std::rt::lang_start_internal::h6becd1b56f6ab46b
                               at /rustc/ee9c7c940c07d8b67c9a6b2ec930db70dcd23a46/library/std/src/rt.rs:148:20
  58:     0x562e451abaea - std::rt::lang_start::h81a351cce8fa6051
                               at /rustc/ee9c7c940c07d8b67c9a6b2ec930db70dcd23a46/library/std/src/rt.rs:165:17
  59:     0x562e451e2e7e - main
  60:     0x7f57122a0cd0 - <unknown>
  61:     0x7f57122a0d8a - __libc_start_main
  62:     0x562e45040d75 - _start
  63:                0x0 - <unknown>
thread caused non-unwinding panic. aborting.
[1]    2165332 IOT instruction  RUST_BACKTRACE=full cargo --color=always run
@kchibisov
Copy link
Member

As you can see this is in freetype-rs, so bring to them?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants