|
From: Dennis L. <pla...@in...> - 2005-08-11 15:12:43
|
Can you tell us where exactly valgrind reports you an error ? If I
compile and run sour piece of code, I get of course this error:
==4041== Syscall param exit_group(exit_code) contains uninitialised
byte(s)
==4041== at 0x1B9AFC44: _Exit (in /lib/tls/libc.so.6)
==4041== by 0x1B93BE89: __libc_start_main (in /lib/tls/libc.so.6)
==4041== by 0x8048320: ??? (start.S:119)
because the return value isnt set/initialized. If I add a "return 2;" at
the end of main I don't get any error, or do you refer to the suppressed
errors ? What exact version of valgrind3 are you using ? (svn revision
of valgrind & vex) ?
greets
Dennis
Am Donnerstag, den 11.08.2005, 15:44 +0100 schrieb Matthew J Fletcher:
> Hi
>
> valgrind 3.0.0 (as did 2.4) reports the following,..
>
> 'Conditional jump or move depends on uninitialised value(s)'
>
> for the following sample code, the line 'if ( *(Deflate + 8 ) == ';' )'
> is the line for which the warning is given.
>
> int main(void)
> {
> char *Deflate = strstr( "gzip,deflate", "deflate" );
> if ( !Deflate )
> return 0;
>
> if ( *(Deflate + 8 ) == ';' )
> return 1;
> }
>
> why ?, '\0' does not equal uninitialised does it ?
>
> just out of interest purify and boundschecker on win32 dont have a problem
> with this.
>
> regards
> ---
> Matthew J Fletcher
|