|
From: tim <tim...@gm...> - 2005-09-11 09:41:35
|
hi all,
i've got a question concerning the error message:
Conditional jump or move depends on uninitialised value(s)
it occurs on structures like this:
while (s2 = *s1)
{
s1 = something(s2);
}
since the code is working, i'm pretty clueless, why i get this error.
is it somehow possible to suppress this error message?
thanks in advance ... tim
|
|
From: Tom H. <to...@co...> - 2005-09-11 10:17:49
|
In message <loo...@po...>
tim <tim...@gm...> wrote:
> i've got a question concerning the error message:
> Conditional jump or move depends on uninitialised value(s)
>
> it occurs on structures like this:
>
> while (s2 = *s1)
> {
> s1 = something(s2);
> }
>
> since the code is working, i'm pretty clueless, why i get this error.
> is it somehow possible to suppress this error message?
Well you don't want to suppress it, at least not until you understand
the cause properly.
The fairly obvious explanation is that at some point wither s2 or *s1
is not defined and hence the implicit equality test against zero in that
while results in an undefined result.
Time to start sticking in VALGRIND_CHECK_DEFINED calls to see which
of those variables it the problem I would say.
Tom
--
Tom Hughes (to...@co...)
http://www.compton.nu/
|
|
From: Dennis L. <pla...@in...> - 2005-09-11 11:29:44
|
At 11:35 11.09.2005, tim wrote:
>hi all,
>
>i've got a question concerning the error message:
>Conditional jump or move depends on uninitialised value(s)
>
>it occurs on structures like this:
>
>while (s2 = *s1)
>{
> s1 = something(s2);
>}
>
>since the code is working, i'm pretty clueless, why i get this error.
>is it somehow possible to suppress this error message?
Just because the code *seems* to be working does not mean its correct. You
can either check by valgrind client requests, or by simply outputting the
values if they are really defined. To help us helping you on this error,
you need to provide us with a little more context on your code, a small
testcase would be fine.
greets
Dennis
Carpe quod tibi datum est
|
|
From: Brian C. <cr...@fi...> - 2005-09-11 21:02:59
|
It's likely that on the first iteration of this while loop, the value of
*s1 isn't set to something valid. Maybe you need to initialize it
before going into the loop. (or don't use the assignment as the loop
conditional -- it can lead to some interesting readability issues anyway.
-- Brian
Dennis Lubert wrote:
> At 11:35 11.09.2005, tim wrote:
>
>> hi all,
>>
>> i've got a question concerning the error message:
>> Conditional jump or move depends on uninitialised value(s)
>>
>> it occurs on structures like this:
>>
>> while (s2 = *s1)
>> {
>> s1 = something(s2);
>> }
>>
>> since the code is working, i'm pretty clueless, why i get this error.
>> is it somehow possible to suppress this error message?
>
>
> Just because the code *seems* to be working does not mean its correct.
> You can either check by valgrind client requests, or by simply
> outputting the values if they are really defined. To help us helping
> you on this error, you need to provide us with a little more context
> on your code, a small testcase would be fine.
>
> greets
>
> Dennis
>
>
> Carpe quod tibi datum est
>
>
> -------------------------------------------------------
> SF.Net email is Sponsored by the Better Software Conference & EXPO
> September 19-22, 2005 * San Francisco, CA * Development Lifecycle
> Practices
> Agile & Plan-Driven Development * Managing Projects & Teams * Testing
> & QA
> Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
> _______________________________________________
> Valgrind-users mailing list
> Val...@li...
> https://lists.sourceforge.net/lists/listinfo/valgrind-users
>
>
>
|