|
From: Tom H. <to...@co...> - 2006-05-22 23:06:57
|
In message <447...@pe...>
Brendan Drew <bre...@pe...> wrote:
> I'm using Valgrind 3.1 to try to debug a video hook for ffmpeg. Valgrind
> complains (very confusingly) about uninitialized values being used ---
> this is pretty much impossible (at least to the best of my knowledge):
> each class instance is initialized either from defaults (global const
> variables), via a copy (I've checked the copy constructor several times
> to be absolutely certain that all the fields are being copied over. It's
> possible that I've missed something, but I seriously doubt it), or via a
> configuration object (where the values are either read in from file or
> use the same defaults that the default constructor uses). There are two
> variables that are used on the line that generates the error: confidence
> and m_TauConfidence. confidence is passed by reference and ultimately
> lives on the stack, m_TauConfidence is a member variable. Prior to the
> test, confidence is computed using pixel intensities ultimately supplied
> by FFmpeg (FFmpeg decodes the current frame, passes it to my hook, then
> passes the results on to the encoder). m_TauConfidence is written
> precisely once (and that's when the instance is constructed). Needless
> to say, I'm confused as to how these values are considered
> uninitialized, unless the data coming from the input frame is
> uninitialized. Regardless, it would be really helpful to know which of
> these values is actually uninitialized.
So put some VALGRIND_CHECK_READABLE() calls in the source to see
which one is the problem.
Tom
--
Tom Hughes (to...@co...)
http://www.compton.nu/
|