Dominique Pelle wrote:
> Attached patch fixes a bug with Vim-7.2.30 when built with GUI GTK > with -DEXITFREE (configure --with-features=huge --enable-gui=gtk). > It's a low priority bug since Vim is normally not built with > -DEXITFREE. Only GTK GUI is affected (GTK2, athena, Motif are OK). > > >From what I see, GTK takes care of calling XCloseDisplay() through > atexit() so mch_free_mem() in os_unix.c should not call > XCloseDisplay() before exit() is being called. Here is the > error (among other errors) reported by valgrind memory checker: > > ==12828== Invalid read of size 4 > ==12828== at 0x4431EE7: XCloseDisplay (in /usr/lib/libX11.so.6.2.0) > ==12828== by 0x418F31E: (within /usr/lib/libgdk-1.2.so.0.9.1) > ==12828== by 0x42F7083: exit (in /lib/tls/i686/cmov/libc-2.7.so) > ==12828== by 0x8169EF0: mch_exit (os_unix.c:3060) > ==12828== by 0x8104D20: getout (main.c:1340) > ==12828== by 0x80CA8EE: ex_quit_all (ex_docmd.c:6281) > ==12828== by 0x80C4994: do_one_cmd (ex_docmd.c:2621) > ==12828== by 0x80C2215: do_cmdline (ex_docmd.c:1095) > ==12828== by 0x8148D60: nv_colon (normal.c:5217) > ==12828== by 0x8142301: normal_cmd (normal.c:1184) > ==12828== by 0x8104A53: main_loop (main.c:1179) > ==12828== by 0x810459B: main (main.c:938) > ==12828== Address 0x45943b4 is 148 bytes inside a block of size 1,340 free'd > ==12828== at 0x402268C: free (vg_replace_malloc.c:323) > ==12828== by 0x4444F3E: _XFreeDisplayStructure (in > /usr/lib/libX11.so.6.2.0) > ==12828== by 0x4431FC5: XCloseDisplay (in /usr/lib/libX11.so.6.2.0) > ==12828== by 0x8169D73: mch_free_mem (os_unix.c:2945) > ==12828== by 0x813289B: free_all_mem (misc2.c:1122) > ==12828== by 0x8169EE5: mch_exit (os_unix.c:3057) > ==12828== by 0x8104D20: getout (main.c:1340) > ==12828== by 0x80CA8EE: ex_quit_all (ex_docmd.c:6281) > ==12828== by 0x80C4994: do_one_cmd (ex_docmd.c:2621) > ==12828== by 0x80C2215: do_cmdline (ex_docmd.c:1095) > ==12828== by 0x8148D60: nv_colon (normal.c:5217) > ==12828== by 0x8142301: normal_cmd (normal.c:1184) > ==12828== by 0x8104A53: main_loop (main.c:1179) > ==12828== by 0x810459B: main (main.c:938) > > Attached patch fixes it. Thanks! -- hundred-and-one symptoms of being an internet addict: 203. You're an active member of more than 20 newsgroups. /// Bram Moolenaar -- [EMAIL PROTECTED] -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ download, build and distribute -- http://www.A-A-P.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org /// --~--~---------~--~----~------------~-------~--~----~ You received this message from the "vim_dev" maillist. For more information, visit http://www.vim.org/maillist.php -~----------~----~----~----~------~----~------~--~---
