On Sa, 28 Sep 2019, Bram Moolenaar wrote:
>
> 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.
What version of valgrind are you running? I wonder if we should report
this at bugs.kde.org. Is there an easy way to reproduce this?
Best,
Christian
--
Sorgen sind wie Babies: Je mehr man sie hätschelt, desto besser
gedeihen sie.
-- Helmut Qualtinger
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/vim_dev/20190929083418.GA9133%40256bit.org.