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 when editing iptables dump file commited in a git repo #7896

Closed
jficz opened this issue Aug 10, 2023 · 5 comments
Closed

segfault when editing iptables dump file commited in a git repo #7896

jficz opened this issue Aug 10, 2023 · 5 comments
Labels
C-bug Category: This is a bug

Comments

@jficz
Copy link

jficz commented Aug 10, 2023

Summary

This is and oddly specific bug.

When doing xxd action in an iptables config file that is commited in git, helix segfaults with no apparently usable logs. It also breaks the terminal.

Tried foot and kitty terminals, zsh and bash shells. Seems to be independent of these.

Reproduction Steps

  1. git init repo; cd repo
  2. sudo iptables-save > iptables
  3. git add iptables; git commit -m 'test'
  4. hx iptables
  5. go to a random line, make sure you're in NOR mode and pres xxxd
  6. segmentation fault (core dumped) hx iptables

Asciinema record: https://asciinema.org/a/VF4XKet1b8X8ljjrhElvqEjla

Warning: this will likely break your terminal's input, you will need to close it and start a new one. If you play the asciinema record locally, it will also most likely break your terminal.

Helix log

2023-08-10T15:04:24.993 helix_view::clipboard [DEBUG] Using wl-copy+wl-paste to interact with the system and selection (primary) clipboard
2023-08-10T15:04:24.994 helix_view::editor [DEBUG] editor status: Loaded 1 file.
2023-08-10T15:04:24.994 mio::poll [TRACE] registering event source with poller: token=Token(0), interests=READABLE | WRITABLE
2023-08-10T15:04:24.994 mio::poll [TRACE] registering event source with poller: token=Token(1), interests=READABLE | WRITABLE
2023-08-10T15:04:24.994 mio::poll [TRACE] registering event source with poller: token=Token(0), interests=READABLE
2023-08-10T15:04:24.994 mio::poll [TRACE] registering event source with poller: token=Token(1), interests=READABLE
2023-08-10T15:04:24.998 helix_tui::backend::crossterm [DEBUG] The keyboard enhancement protocol is supported in this terminal (checked in 3.23095ms)
2023-08-10T15:04:24.998 helix_view::document [DEBUG] id 1 modified - last saved: 0, current: 0
2023-08-10T15:04:25.394 helix_term::application [DEBUG] received editor event: IdleTimer
2023-08-10T15:04:35.319 helix_view::document [DEBUG] id 1 modified - last saved: 0, current: 0
2023-08-10T15:04:35.610 helix_view::document [DEBUG] id 1 modified - last saved: 0, current: 0
2023-08-10T15:04:35.938 helix_view::document [DEBUG] id 1 modified - last saved: 0, current: 0
2023-08-10T15:04:36.129 helix_view::document [DEBUG] id 1 modified - last saved: 0, current: 0

Platform

Linux - NixOS

Terminal Emulator

kitty, foot

Helix Version

helix 23.05 (7f5940b)

@jficz jficz added the C-bug Category: This is a bug label Aug 10, 2023
@jficz
Copy link
Author

jficz commented Aug 10, 2023

I don't know exactly which part of the file is the trigger. I tried the same thing with other config files (fstab, passwd, to name a few) but only the iptables format triggered the issue (so far).

@pascalkuthe
Copy link
Member

pascalkuthe commented Aug 10, 2023

This was fixed a while ago by #7227. Either upgrade to master or build with rustc <= 1.70

@lunagl
Copy link
Contributor

lunagl commented Aug 14, 2023

When are you planning on releasing this important fix? The current situation is really annoying for anyone not wanting to build the package themselves

@jficz
Copy link
Author

jficz commented Aug 14, 2023

I've been trying to build the package on NixOS but nixpkgs uses the release tarball to build the package and not the repo and I have zero experience building rust packages on NixOS.

An ETA on the release would be nice so I know if I should invest time to learn Rust build principles (which I will likely never use again) or wait for the release.

@pascalkuthe
Copy link
Member

pascalkuthe commented Aug 14, 2023

Releases happen approximately every 3 months so it will likely happen this or next month. We don't have any strict timelines, and will not commit to such. The official 23.5 release that you can download from our website was built with a rust-toolchain where this issue doesn't occur so you can just use the official release to avoid the problem (or the official nix flake).

All other sources of helix builds (package managers) are unofficial and not supported by us. If they ship a broken package that is their problem. In this case, the issue seems to be nixos so the nixpkgs should either continue building helix with the older toolchain (as they have done in the past) or apply the liked PR as a patch until then.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug
Projects
None yet
Development

No branches or pull requests

3 participants