Skip to content

Conversation

@zeertzjq
Copy link
Member

@zeertzjq zeertzjq commented Dec 1, 2025

Problem: Memory leak with :breakadd expr.
Solution: Free debug_oldval and debug_newval before assigning to them.

It seems that :breakadd expr doesn't work as documented at all. This PR
only fixes the memory leak. The tests are for the existing behavior.

Problem:  Memory leak with :breakadd expr.
Solution: Free debug_oldval and debug_newval before assigning to them.

It seems that :breakadd expr doesn't work as documented at all. This PR
only fixes the memory leak. The tests are for the existing behavior.
@chrisbra
Copy link
Member

chrisbra commented Dec 1, 2025

Thanks, the memory leak is my fault I guess. I remember some wonky behavior when implementing the expr part of it. Seems like it is not much used really.

@chrisbra chrisbra closed this in a474de6 Dec 1, 2025
@zeertzjq zeertzjq deleted the debugger-leak branch December 1, 2025 22:49
zeertzjq added a commit to zeertzjq/neovim that referenced this pull request Dec 1, 2025
Problem:  Memory leak with :breakadd expr
Solution: Free debug_oldval and debug_newval before assigning to them.
          Verify the existing (though confusing) :breakadd expr behavior
          (zeertzjq).

It seems that :breakadd expr doesn't work as documented at all. This PR
only fixes the memory leak. The tests are for the existing behavior.

closes: vim/vim#18844

vim/vim@a474de6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants