Bram Moolenaar:
> Dominique Pelle wrote:
>
>> I observe the following access to free memory with both
>> Vim-7.2.466 and Vim-7.3b BETA (2411:ca3f40b0d95e):
>
> I'll add it to the todo list. But perhaps you figure out how to fix it.
Still no fix, but I have a simpler way to reproducing it
without the need for pressing CTRL-C.
This is enough to reproduce it:
$ cat use-free-mem.vim
let temp={}
redir => temp[0]
exe "silent! ls"
let temp={}
redir => temp[0]
exe "silent! ls"
$ valgrind --leak-check=yes vim -u NONE -S use-free-mem.vim 2>/tmp/valgrind.log
Gives the following error in /tmp/valgrind.log:
==6124== Invalid read of size 1
==6124== at 0x80764E6: set_var_lval (eval.c:2854)
==6124== by 0x8073844: var_redir_stop (eval.c:1145)
==6124== by 0x80B174B: close_redir (ex_docmd.c:8758)
==6124== by 0x80B1560: ex_redir (ex_docmd.c:8654)
==6124== by 0x80A8560: do_one_cmd (ex_docmd.c:2656)
==6124== by 0x80A5E39: do_cmdline (ex_docmd.c:1122)
==6124== by 0x80A4104: do_source (ex_cmds2.c:3204)
==6124== by 0x80A392F: cmd_source (ex_cmds2.c:2809)
==6124== by 0x80A3887: ex_source (ex_cmds2.c:2782)
==6124== by 0x80A8560: do_one_cmd (ex_docmd.c:2656)
==6124== by 0x80A5E39: do_cmdline (ex_docmd.c:1122)
==6124== by 0x80A54F3: do_cmdline_cmd (ex_docmd.c:728)
==6124== Address 0x56c0825 is 5 bytes inside a block of size 21 free'd
==6124== at 0x4024B8A: free (vg_replace_malloc.c:366)
==6124== by 0x81183DC: vim_free (misc2.c:1703)
==6124== by 0x807C1A4: dict_free (eval.c:6861)
==6124== by 0x807C0B8: dict_unref (eval.c:6823)
==6124== by 0x808CC8C: clear_tv (eval.c:19154)
==6124== by 0x808DAFE: set_var (eval.c:19779)
==6124== by 0x80764BE: set_var_lval (eval.c:2849)
==6124== by 0x8075A3E: ex_let_one (eval.c:2465)
==6124== by 0x8074A64: ex_let_vars (eval.c:1920)
==6124== by 0x8074A12: ex_let (eval.c:1885)
==6124== by 0x80A8560: do_one_cmd (ex_docmd.c:2656)
==6124== by 0x80A5E39: do_cmdline (ex_docmd.c:1122)
...
-- Dominique
--
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