Dominique wrote:
> In runtime/doc/todo.txt, I see this item:
>
> Conditional jump or move depends on uninitialised value(s)
> ==2819005== at 0x2E9134: jump_to_mouse (mouse.c:2015)
> ==2819005== by 0x2E69E6: do_mouse (mouse.c:702)
> ==2819005== by 0x2E95C2: nv_mouse (mouse.c:2166)
>
> If we add the valgrind option --track-origins=yes then we can
> see where the uninitialized memory comes from:
>
> ==10697== Conditional jump or move depends on uninitialised value(s)
> ==10697== at 0x2A2225: jump_to_mouse (mouse.c:2015)
> ==10697== by 0x2A0544: do_mouse (mouse.c:702)
> ==10697== by 0x2AA3A6: normal_cmd (normal.c:937)
> ==10697== by 0x225F0C: exec_normal (ex_docmd.c:0)
> ==10697== by 0x1FFF49: f_feedkeys (evalfunc.c:4352)
[...]
Thanks for looking into this. The warning would be for this line:
if (col_from_screen >= 0)
Which was set here:
// Only use ScreenCols[] after the window was redrawn. Mainly matters
// for tests, a user would not click before redrawing.
// Do not use when 'virtualedit' is active.
if (curwin->w_redr_type <= UPD_VALID_NO_UPDATE && !virtual_active())
col_from_screen = ScreenCols[off];
Apparently the condition doesn't always work. Clearing the whole block
of allocated memory is not cheap, but it won't happen often anyway.
--
I AM THANKFUL...
...for all the complaining I hear about the government
because it means we have freedom of speech.
/// Bram Moolenaar -- Br...@Moolenaar.net --
http://www.Moolenaar.net \\\
/// \\\
\\\ sponsor Vim, vote for features --
http://www.Vim.org/sponsor/ ///
\\\ help me help AIDS victims --
http://ICCF-Holland.org ///