Subject: bug#9948: valgrind warning: Conditional jump or move depends on uninitialised value(s) in redisplay_window

From: Dan Nicolaescu <[email-masked]>
Date: Fri, 04 Nov 2011 09:05:51 -0400

Eli Zaretskii <[email-masked]> writes:

>> From: Dan Nicolaescu <[email-masked]>
>> Cc: [email-masked]
>> Date: Thu, 03 Nov 2011 19:30:55 -0400
>> 
>> Eli Zaretskii <[email-masked]> writes:
>> 
>> >> From: Dan Nicolaescu <[email-masked]>
>> >> Date: Thu, 03 Nov 2011 17:55:03 -0400
>> >> 
>> >>       aggressive =
>> >>       scrolling_up
>> >>       ? BVAR (current_buffer, scroll_up_aggressively)
>> >>       : BVAR (current_buffer, scroll_down_aggressively);
>> >>        ^^^^^^^^^^^^^^^^^^
>> >>       This one
>> >
>> > How can this be uninitialized?  This is a buffer-local value of a
>> > variable that is initialized to nil on buffer.c.
>> 
>> The line might be incorrect, are all the variables in that expression
>> initialized correctly?
>
> I think so, yes.  The only other variables are:
>
>   . current_buffer -- a global variable that always has some value
>
>   . scrolling_up -- computed in the line above this snippet.  It
>     depends on margin_pos, which is initialized at the beginning of
>     the parent block.
>
> The BVAR macro doesn't reference any variables except its first
> argument.
>
> So I'm really puzzled about this one.  Is there any way to ask
> valgrind for a more detailed report?

It looks like there's a --track-origins=yes that might help.
Now just need to reproduce the same issue (which occurred after quite a
bit of random editing/playing around, so it might not be easy...).