GithubHelp home page GithubHelp logo

https requests leaking memory about curl HOT 5 CLOSED

curl avatar curl commented on April 28, 2024
https requests leaking memory

from curl.

Comments (5)

dfandrich avatar dfandrich commented on April 28, 2024

On Fri, Feb 27, 2015 at 04:40:59PM -0800, Stephen Mathieson wrote:

it looks like even the simplest https requests are leaking memory.

valgrind reports the following example leaves "43,397 bytes in 947 blocks"
available:

The code doesn't call curl_global_cleanup() which could make a big
difference. The autobuilds show many environments are not leaking memory, so
it's likely something in your environment. If you can still reproduce it,
please include more information on the platform and libraries you're using
including version numbers.

Dan

from curl.

stephenmathieson avatar stephenmathieson commented on April 28, 2024

added curl_global_cleanup() which had no effect: https://gist.github.com/stephenmathieson/12647b3caad72be5c911

here's some info on my env:

$ uname --all 
Linux precise64 3.2.0-23-generic #36-Ubuntu SMP Tue Apr 10 20:39:51 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux
$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/4.6/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro 4.6.3-1ubuntu5' --with-bugurl=file:///usr/share/doc/gcc-4.6/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.6 --enable-shared --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.6 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --enable-plugin --enable-objc-gc --disable-werror --with-arch-32=i686 --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5) 
$ curl-config --cc
gcc
$ curl-config --libs
-L/usr/lib/x86_64-linux-gnu -lcurl -Wl,-Bsymbolic-functions -Wl,-z,relro
$ curl-config --version
libcurl 7.22.0

let me know if anything else may help

from curl.

bagder avatar bagder commented on April 28, 2024

Can you please try a recent version and see if it remains? Are you using a recent gnutls version?

from curl.

bagder avatar bagder commented on April 28, 2024

No feedback, closing. If this can be repeated on a recent version then we re-open!

from curl.

aless673 avatar aless673 commented on April 28, 2024

Hi, valgrind gives me an error with package libcurl4-gnutls-dev

http://pastie.org/10700986

No error with libcurl4-openssl-dev (same code) :

http://pastie.org/10700987

Curl request is done as this example : http://curl.haxx.se/libcurl/c/getinmemory.html

I investigated and found that the leak occured when https url is used. Only with gnutls.

from curl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.