Dominuque Pelle wrote:

> I built vim-7.2.181 with GTK1 GUI on Linux x86...
>   ./configure  --with-features=huge --enable-gui=gtk
> ... and I see the following errors with valgrind memory
> checker when navigating in the menubar or when resizing
> the window:
> 
> ==15894== Conditional jump or move depends on uninitialised value(s)
> ==15894==    at 0x8131BB3: utfc_ptr2len (mbyte.c:1705)
> ==15894==    by 0x81D5B0C: gui_mch_draw_string (gui_gtk_x11.c:6103)
> ==15894==    by 0x81CC7B9: gui_outstr_nowrap (gui.c:2251)
> ==15894==    by 0x81CCE63: gui_screenchar (gui.c:1872)
> ==15894==    by 0x81CD249: gui_redraw_block (gui.c:2500)
> ==15894==    by 0x81CEB63: gui_redraw (gui.c:2393)
> ==15894==    by 0x81D9028: expose_event (gui_gtk_x11.c:652)
> 
> ==16861== Conditional jump or move depends on uninitialised value(s)
> ==16861==    at 0x8131B4F: utfc_ptr2len (mbyte.c:1686)
> ==16861==    by 0x815B7FD: mch_call_shell (os_unix.c:4314)
> ==16861==    by 0x812AA07: call_shell (misc2.c:3058)
> ==16861==    by 0x807F784: ex_diffpatch (diff.c:976)
> ==16861==    by 0x80C9F86: do_one_cmd (ex_docmd.c:2620)
> ==16861==    by 0x80C8292: do_cmdline (ex_docmd.c:1096)
> ==16861==    by 0x81408BF: nv_colon (normal.c:5224)
> ==16861==    by 0x81429A7: normal_cmd (normal.c:1188)
> ==16861==    by 0x8101946: main_loop (main.c:1180)
> ==16861==    by 0x8104CEA: main (main.c:939)
> 
> Attached patch fixes it.

What do you have 'enc' set to?  GTK only works well with utf-8.  Perhaps
the string should have been converted to utf-8 before we get to the
functions you change?

-- 
It might look like I'm doing nothing, but at the cellular level
I'm really quite busy.

 /// 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
-~----------~----~----~----~------~----~------~--~---

Raspunde prin e-mail lui