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

segfault on valid nix file #7578

Closed
happysalada opened this issue Jul 9, 2023 · 1 comment · Fixed by #7621
Closed

segfault on valid nix file #7578

happysalada opened this issue Jul 9, 2023 · 1 comment · Fixed by #7621
Labels
A-language-support Area: Support for programming/text languages C-bug Category: This is a bug

Comments

@happysalada
Copy link
Contributor

Summary

opening the following nix file https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/libraries/science/math/faiss/default.nix
will segfault helix.

Reproduction Steps

trying to open the file locally from the root of the project segfaults helix
https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/libraries/science/math/faiss/default.nix

Helix log

weirdly enough there is nothing in the logs for the time around when the segfault happens.

Platform

macos (happens also on linux too)

Terminal Emulator

alacritty

Helix Version

helix master at the time of this post 507dd50

@happysalada happysalada added the C-bug Category: This is a bug label Jul 9, 2023
@the-mikedavis the-mikedavis added the A-language-support Area: Support for programming/text languages label Jul 9, 2023
@mmlb
Copy link
Contributor

mmlb commented Jul 13, 2023

I can reproduce and have the following backtrace from gdb:

#0  0x00005555561ed133 in ts_decode_utf8 ()
#1  0x00005555561ed427 in ts_lexer.get_lookahead ()
#2  0x00005555561edc88 in ts_lexer.get_column ()
#3  0x00007ffff4005cf8 in tree_sitter_just_external_scanner_scan ()
   from /nix/store/jkg64m6zillzabn33qzpx2kg9vb9v8fi-helix-runtime/grammars/just.so
#4  0x0000555556202268 in ts_parser.lex ()
#5  0x0000555556207f83 in ts_parser_parse ()
#6  0x00005555558a84fb in helix_core::syntax::LanguageLayer::parse::hf8c5bcc222932e9b ()
#7  0x00005555558c3778 in std::thread::local::LocalKey<T>::with::h134b23fa82ae1a03 ()
#8  0x00005555558a8114 in helix_core::syntax::Syntax::update::h162e68688b29bf84 ()
#9  0x00005555558a73e3 in helix_core::syntax::Syntax::new::h2774a37f3cffa17e ()
#10 0x0000555555ea0b5f in helix_view::document::Document::set_language::h2d44fff911da7978 ()
#11 0x0000555555e9eb45 in helix_view::document::Document::open::h3acc06d5b1eb1a34 ()
#12 0x0000555555ee08af in helix_view::editor::Editor::open::h9181d116e15c9c78 ()
#13 0x0000555555af55b7 in helix_term::application::Application::new::h7c8fcd53cd75d028 ()
#14 0x0000555555f7cf2d in <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll::he81944f425499e1e ()
#15 0x0000555555f3cca9 in tokio::runtime::park::CachedParkThread::block_on::hb35aded6d22acfa0 ()
#16 0x0000555555f35062 in tokio::runtime::scheduler::multi_thread::MultiThread::block_on::ha75988c67e5e1ee1 ()
#17 0x0000555555f72466 in tokio::runtime::runtime::Runtime::block_on::h760cdbd418f996b2 ()
#18 0x0000555555f8a2fa in hx::main::h25965c4a61aed85a ()
#19 0x0000555555f4b763 in std::sys_common::backtrace::__rust_begin_short_backtrace::h08a2d6e2c49e4de9 ()
#20 0x0000555555f7efd1 in std::rt::lang_start::{{closure}}::he7ee52cccb6730d6 ()
#21 0x00005555561287fa in std::rt::lang_start_internal::h6ba1bb743c1e9df9 ()
#22 0x0000555555f8a3f8 in main ()

not sure if its helpful

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-language-support Area: Support for programming/text languages C-bug Category: This is a bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants