qinhan620 / iperf

Automatically exported from code.google.com/p/iperf
0 stars 0 forks source link

Memory leak #60

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
[src/iperf_api.c:1179]: (error) Memory leak: tcp
[src/locale.c:104]: (error) syntax error
[src/locale.c:334]: (error) Invalid number of character ({) when these macros 
are defined: '__cplusplus'.

Original issue reported on code.google.com by devzone...@gmail.com on 15 Feb 2013 at 12:47

GoogleCodeExporter commented 8 years ago
The two errors in locale.c were easily fixed, but I'm surprised that your 
compiler noted them.  It does syntax checking inside #ifdefs that are not 
currently defined?  That seems unusually persnickety.  I like persnickety.

The supposed memory leak remains a mystery.

Original comment by jef.posk...@gmail.com on 16 Feb 2013 at 12:15

GoogleCodeExporter commented 8 years ago
[src/units.c:90]: (portability) scanf without field width limits can crash with 
huge input data on libc versions older than 2.13-25. Add a field width 
specifier to fix this problem:
    %i => %3i

Sample program that can crash:

#include <stdio.h>
int main()
{
    int a;
    scanf("%i", &a);
    return 0;
}

To make it crash:
perl -e 'print "5"x2100000' | ./a.out

Original comment by devzone...@gmail.com on 16 Feb 2013 at 12:29

GoogleCodeExporter commented 8 years ago
Is this analysis coming from valgrind or something?

Original comment by jdu...@es.net on 16 Feb 2013 at 12:30

GoogleCodeExporter commented 8 years ago
@jdu,

Yes cppcheck, http://sourceforge.net/apps/trac/cppcheck/

Original comment by devzone...@gmail.com on 16 Feb 2013 at 12:33

GoogleCodeExporter commented 8 years ago
[src/iperf_api.c:1179]: (error) Memory leak: tcp
[src/iperf_api.c:1680]: (debug) inconclusive leak of sp: ; alloc ; use ; if 
return ; return use ; }
[src/iperf_api.c:769]: (debug) uninitialized variables: bailout. can't 
determine if this condition can be false when previous condition is false: 
(Nwrite(test.ctrl_sck,&test.state,1,SOCK_STREAM)<0)
[src/iperf_api.c:1232]: (debug) uninitialized variables: bailout. can't 
determine if this condition can be false when previous condition is false: 
(test.stats_timer)

Original comment by devzone...@gmail.com on 16 Feb 2013 at 12:37

GoogleCodeExporter commented 8 years ago

Original comment by bltier...@es.net on 12 Mar 2013 at 10:46

GoogleCodeExporter commented 8 years ago
was not able to replicate
problem may be fixed.

Original comment by bltier...@es.net on 8 May 2013 at 9:33