You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Being used to vim keybindings, I accidentally pressed q to end a recording instead of Q. Doing this a second time after finishing recording the first macro resulted in the program freezing, presumably replaying the now-recursive macro.
The first time this occurred, the program remained frozen for several minutes until I killed it with kill <PID>. Attempting to reproduce the issue, I made a smaller macro, which ended up immediately overflowing the stack.
Reproduction Steps
I tried this:
hx
QqQq
I expected this to happen:
Helix prevents me from recording a recursive macro
Instead, this happened:
Helix crashes due to stack overflow
Helix log
No response
Platform
Linux (Ubuntu on WSL)
Terminal Emulator
Windows Terminal Version: 1.12.10982.0
Helix Version
22.03-121-g6de2e763
The text was updated successfully, but these errors were encountered:
I encountered the same bug and have raised a PR with a fix in #2647.
There are some additional scenarios that could also trigger the crash, for example:
"aQ"bqQ"bQ"aqQ"aq
The above sequence can be described as
start recording into register 'a'
replay register 'b'
end recording into register 'a'
start recording into register 'b'
replay register 'a'
stop recording into register 'b'
replay register 'a'
Sequences of commands like the above generated an infinite loop because one macro would replay a second macro which would attempt to replay the first macro...
Summary
Being used to vim keybindings, I accidentally pressed
q
to end a recording instead ofQ
. Doing this a second time after finishing recording the first macro resulted in the program freezing, presumably replaying the now-recursive macro.The first time this occurred, the program remained frozen for several minutes until I killed it with
kill <PID>
. Attempting to reproduce the issue, I made a smaller macro, which ended up immediately overflowing the stack.Reproduction Steps
I tried this:
hx
QqQq
I expected this to happen:
Instead, this happened:
Helix log
No response
Platform
Linux (Ubuntu on WSL)
Terminal Emulator
Windows Terminal Version: 1.12.10982.0
Helix Version
22.03-121-g6de2e763
The text was updated successfully, but these errors were encountered: