GNOME Bugzilla – Bug 790539
Memleak when parsing SGR with colons
Last modified: 2017-11-18 17:51:45 UTC
From https://github.com/neovim/neovim/issues/7573: grep VmRSS /proc/$(pidof gnome-terminal-server)/status for i in {1..10000}; do echo -ne '\e[38:5:200m' done grep VmRSS /proc/$(pidof gnome-terminal-server)/status Notice the significant growth. Happens with both the colon-only (38:5:200) and mixed (38;5:200) notation, does not happen with the typical semicolon-only (38;5;200). Happens with 256-color and truecolor sequences.
Anything unrecognized with colons leaks memory (e.g. "\e[1:2m").
Should be fixed on master.
Thanks a lot! I was actually working on this right now, had the bits from matcher.cc in place, but was wondering why it wasn't good enough. I was yet to find the take vs. set issue in table.cc. Let's cherry-pick to 0-50 and maybe even some earlier ones! :)