cURL
Haxx ad
libcurl

curl's project page on SourceForge.net

Sponsors:
Haxx

cURL > Mailing List > Monthly Index > Single Mail

curl-tracker Archives

[ curl-Bugs-3440542 ] ftp - memleak - reusing an easy handle with multi interface

From: SourceForge.net <noreply_at_sourceforge.net>
Date: Mon, 21 Nov 2011 11:06:37 -0800

Bugs item #3440542, was opened at 2011-11-20 15:12
Message generated for change (Comment added) made by gseng
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=100976&aid=3440542&group_id=976

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: libcurl
Group: bad behaviour
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Gokhan Sengun (gseng)
Assigned to: Daniel Stenberg (bagder)
Summary: ftp - memleak - reusing an easy handle with multi interface

Initial Comment:
I am trying to reuse an easy handle with multi interface.

Below loop is run more than once and it creates a memleak.

- Connect to FTP server and get listing of it
- Close the connection with NOBODY, and FORBID_REUSE options

Example source file and stack trace of memleak is attached.

It could be the case that I am misusing something in here. If so please tell.

Thanks..

----------------------------------------------------------------------

>Comment By: Gokhan Sengun (gseng)
Date: 2011-11-21 11:06

Message:
As the maintainer, if you do not really care, I think I should not care
either :-)

I just wanted to ask because if something is "fixed" without direct
intention, it has always been an indication of suspicious code to me. I
just wanted to ask if you could know as the bug-fixer of most of the bugs
from 7.22.0 to 7.23.1

----------------------------------------------------------------------

Comment By: Daniel Stenberg (bagder)
Date: 2011-11-21 10:49

Message:
If you really want to figure out the commit that fixed it, you should be
able to bisect that fairly quickly. I personally don't really care.

I consider this bug report closed!

----------------------------------------------------------------------

Comment By: Gokhan Sengun (gseng)
Date: 2011-11-21 09:48

Message:
Sorry, forgot to add the lib version.

Issue is reproduced with curl-7.22.0

Pulling the latest git version, I do not have the leak neither.

Do you have any clue how this is fixed between curl-7.22.0 to curl-7.23.1

----------------------------------------------------------------------

Comment By: Daniel Stenberg (bagder)
Date: 2011-11-21 05:49

Message:
Using what libcurl version?

I just built your test code with my git version on Linux, but it is
virtually the same as 7.23.1 when it comes to FTP, and this is my valgrind
output:

==21269==
==21269== HEAP SUMMARY:
==21269== in use at exit: 45,452 bytes in 2,907 blocks
==21269== total heap usage: 4,241 allocs, 1,334 frees, 169,744 bytes
allocated
==21269==
==21269== LEAK SUMMARY:
==21269== definitely lost: 0 bytes in 0 blocks
==21269== indirectly lost: 0 bytes in 0 blocks
==21269== possibly lost: 0 bytes in 0 blocks
==21269== still reachable: 45,452 bytes in 2,907 blocks
==21269== suppressed: 0 bytes in 0 blocks
==21269== Reachable blocks (those to which a pointer was found) are not
shown.
==21269== To see them, rerun with: --leak-check=full --show-reachable=yes
==21269==
==21269== For counts of detected and suppressed errors, rerun with: -v
==21269== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 63 from 8)

----------------------------------------------------------------------

Comment By: Gokhan Sengun (gseng)
Date: 2011-11-20 15:23

Message:
Forgot to mention that the given example is an simplified case of what I am
actually doing.

I am transferring files between the two steps given. So the actual loop
is:

- Connect to FTP server and get listing of it
- Download/Upload files
....
- Close the connection with NOBODY, and FORBID_REUSE options

----------------------------------------------------------------------

You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=100976&aid=3440542&group_id=976
Received on 2011-11-21

These mail archives are generated by hypermail.

donate! Page updated November 12, 2010.
web site info

File upload with ASP.NET