Loading ...
Sorry, an error occurred while loading the content.
 

Re: [patch] fixed memory leak when writing undo file with ACL

Expand Messages
  • Bram Moolenaar
    ... Thanks! -- hundred-and-one symptoms of being an internet addict: 9. All your daydreaming is preoccupied with getting a faster connection to the net:
    Message 1 of 2 , Jun 1 4:46 AM
      Dominique Pelle wrote:

      > The following command shows a memory leak when writing
      > the undo file with ACL in Vim-7.3.531 (Linux x86).
      >
      > $ valgrind --leak-check=yes ./vim -u NONE \
      > -c 'set undofile undodir=/tmp|e /tmp/foo|w!|w!|q!'
      >
      > Each write to file leaks one block. Above example writes
      > twice so it leaks 2 blocks:
      >
      > ==2765== 272 (56 direct, 216 indirect) bytes in 2 blocks are
      > definitely lost in loss record 129 of 162
      > ==2765== at 0x402BE68: malloc (in
      > /usr/lib/valgrind/vgpreload_memcheck-x86-linux.so)
      > ==2765== by 0x493720A: ??? (in /lib/i386-linux-gnu/libacl.so.1.1.0)
      > ==2765== by 0x814D202: mch_get_acl (os_unix.c:2747)
      > ==2765== by 0x81C51E2: u_write_undo (undo.c:1536)
      > ==2765== by 0x80CD931: buf_write (fileio.c:5084)
      > ==2765== by 0x8099D1B: do_write (ex_cmds.c:2692)
      > ==2765== by 0x80997D7: ex_write (ex_cmds.c:2501)
      > ==2765== by 0x80AADD1: do_one_cmd (ex_docmd.c:2668)
      > ==2765== by 0x80A8699: do_cmdline (ex_docmd.c:1122)
      > ==2765== by 0x80A7D6D: do_cmdline_cmd (ex_docmd.c:727)
      > ==2765== by 0x81F5C93: exe_commands (main.c:2842)
      > ==2765== by 0x81F332A: main (main.c:909)
      >
      > Attached patch fixes it.

      Thanks!

      --
      hundred-and-one symptoms of being an internet addict:
      9. All your daydreaming is preoccupied with getting a faster connection to the
      net: 28.8...ISDN...cable modem...T1...T3.

      /// Bram Moolenaar -- Bram@... -- 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 ///

      --
      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
    Your message has been successfully submitted and would be delivered to recipients shortly.