Valgrind has been reporting a leak when running test_popupwin.
I narrowed it down to Test_simple_popup(), somewhere halfway.
The valgrind report is:
==22433== 8 bytes in 1 blocks are definitely lost in loss record 17 of 371
==22433== at 0x483874F: malloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==22433== by 0x280E74: lalloc (misc2.c:924)
==22433== by 0x280D1F: alloc (misc2.c:827)
==22433== by 0x281395: vim_strsave (misc2.c:1276)
==22433== by 0x2BAA4A: buf_copy_options (option.c:5848)
==22433== by 0x1872E4: buflist_new (buffer.c:2116)
==22433== by 0x2D3AA9: popup_create (popupwin.c:1706)
==22433== by 0x2D430A: f_popup_create (popupwin.c:1923)
The buf_copy_options() line is:
buf->b_p_nf = vim_strsave(p_nf);
This is very strange, since several other buffer-local options are
allocated, and they are not reported.
I did quite a bit of digging and finally found that this line in
defaults.vim triggers it:
set nrformats-=octal
I tried setting other options there, and got confusing results, until I
figured the leak is only reported if the string is exactly 8 bytes! That
is 7 text characters plus NUL. If I change nrformats to only "hex" or
make it "hex,hex,hex" then the leak is not reported.
I assume this must be a bug in valgrind. Can't find anything about it
though.
--
WOMAN: Dennis, there's some lovely filth down here. Oh -- how d'you do?
ARTHUR: How do you do, good lady. I am Arthur, King of the Britons.
Who's castle is that?
WOMAN: King of the who?
The Quest for the Holy Grail (Monty Python)
/// Bram Moolenaar -- Br...@Moolenaar.net --
http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features --
http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language --
http://www.Zimbu.org ///
\\\ help me help AIDS victims --
http://ICCF-Holland.org ///