1 Mar 2009 02:22
Re: [patch] fixed access to free memory when using some autocommands
Bram Moolenaar <Bram <at> moolenaar.net>
2009-03-01 01:22:39 GMT
2009-03-01 01:22:39 GMT
Dominique Pelle wrote: > >> Testing autocommands, I see that Vim-7.2.107 (and older) > >> is using memory already freed when doing silly autocommands > >> such as: > >> > >> $ touch foobar > >> $ valgrind ./vim -u NONE -c 'au! BufReadPre * cd /tmp' \ > >> -c 'e foobar' 2> vg.log > >> > >> In vg.log, I then see the following error: > >> > >> ==15058== Syscall param open(filename) points to unaddressable byte(s) > >> ==15058== at 0x40007D2: (within /lib/ld-2.8.90.so) > >> ==15058== by 0x805365E: open_buffer (buffer.c:130) > >> ==15058== by 0x8098548: do_ecmd (ex_cmds.c:3655) > >> ==15058== by 0x80AE8E9: do_exedit (ex_docmd.c:7557) > >> ==15058== by 0x80AE560: ex_edit (ex_docmd.c:7452) > >> ==15058== by 0x80A6FE7: do_one_cmd (ex_docmd.c:2622) > >> ==15058== by 0x80A4867: do_cmdline (ex_docmd.c:1096) > >> ==15058== by 0x80A3F00: do_cmdline_cmd (ex_docmd.c:702) > >> ==15058== by 0x80E8A07: exe_commands (main.c:2693) > >> ==15058== by 0x80E63A7: main (main.c:874) > >> ==15058== Address 0x54312d4 is 4 bytes inside a block of size 11 free'd > >> ==15058== at 0x4024E5A: free (vg_replace_malloc.c:323) > >> ==15058== by 0x8114D5D: vim_free (misc2.c:1631) > >> ==15058== by 0x80C97DF: shorten_fnames (fileio.c:5715) > >> ==15058== by 0x80AF1A9: ex_cd (ex_docmd.c:7942) > >> ==15058== by 0x80A6FE7: do_one_cmd (ex_docmd.c:2622)(Continue reading)
RSS Feed