After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 790539 - Memleak when parsing SGR with colons
Memleak when parsing SGR with colons
Status: RESOLVED FIXED
Product: vte
Classification: Core
Component: general
git master
Other Linux
: Normal major
: ---
Assigned To: VTE Maintainers
VTE Maintainers
Depends on:
Blocks:
 
 
Reported: 2017-11-18 16:51 UTC by Egmont Koblinger
Modified: 2017-11-18 17:51 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Egmont Koblinger 2017-11-18 16:51:09 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.
Comment 1 Egmont Koblinger 2017-11-18 17:18:30 UTC
Anything unrecognized with colons leaks memory (e.g. "\e[1:2m").
Comment 2 Christian Persch 2017-11-18 17:41:24 UTC
Should be fixed on master.
Comment 3 Egmont Koblinger 2017-11-18 17:51:45 UTC
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! :)