diff options
author | James McCoy <jamessan@jamessan.com> | 2021-05-06 19:28:36 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-06 19:28:36 -0400 |
commit | 21035cff9f1d279e3cb5ec866916bfa231cdbaa2 (patch) | |
tree | 22f29c01fa089b7d239ffe9b5bc86fba0285834e /test | |
parent | a3e914b64c621605f91d7284f3050f7fed57a856 (diff) | |
parent | efed75f91638bc52a2a551683c2f7a1da4a1e3ea (diff) | |
download | rneovim-21035cff9f1d279e3cb5ec866916bfa231cdbaa2.tar.gz rneovim-21035cff9f1d279e3cb5ec866916bfa231cdbaa2.tar.bz2 rneovim-21035cff9f1d279e3cb5ec866916bfa231cdbaa2.zip |
Merge pull request #14500 from jamessan/coverity-fixes
Various Coverity fixes
Diffstat (limited to 'test')
-rw-r--r-- | test/functional/ui/decorations_spec.lua | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/functional/ui/decorations_spec.lua b/test/functional/ui/decorations_spec.lua index 09638df6c5..98aafd8757 100644 --- a/test/functional/ui/decorations_spec.lua +++ b/test/functional/ui/decorations_spec.lua @@ -66,6 +66,18 @@ describe('decorations providers', function() expect_events(expected, actual, "beam trace") end + it('does not OOM when inserting, rather than appending, to the decoration provider vector', function() + -- Add a dummy decoration provider with a larger ns id than what setup_provider() creates. + -- This forces get_decor_provider() to insert into the providers vector, + -- rather than append, which used to spin in an infinite loop allocating + -- memory until nvim crashed/was killed. + setup_provider([[ + local ns2 = a.nvim_create_namespace "ns2" + a.nvim_set_decoration_provider(ns2, {}) + ]]) + helpers.assert_alive() + end) + it('leave a trace', function() insert(mulholland) |