Giter Club home page Giter Club logo

Comments (7)

boddumanohar avatar boddumanohar commented on July 23, 2024

Openssl wikipage has solution for this

https://wiki.openssl.org/index.php/Library_Initialization#Cleanup

from libpe.

jweyrich avatar jweyrich commented on July 23, 2024

Thanks! Would you send a PR to fix the head related leaks?

As for the crypto, I moved the crypto/ssl initialization and cleanup to pe_load_file_ex and pe_unload (pe.c) respectively. Running valgrind here doesn't reveal any related leaks, if I'm reading correctly.

from libpe.

boddumanohar avatar boddumanohar commented on July 23, 2024

I just checked with the lastest revision of our demo file with the latest commit libpe/master (99175e92). Valgrind still shows me the above errors.

I would love to send a PR to fix the head related leaks. Could you please assign this issue to me.

from libpe.

jweyrich avatar jweyrich commented on July 23, 2024

I believe those leaks aren't related to the SSL cleanup though. At least I don't see any reference that points to it.

Btw, in the last 2 commits I did rename some types from hashes.h. I updated the demo as well -
https://gist.github.com/jweyrich/d631cc923ac5da78bfa2b266c889ed29/revisions#diff-f052edcff552b316ac7cd5f09b9c8000

During the week(end) I plan to do some renames related to resources too.

from libpe.

boddumanohar avatar boddumanohar commented on July 23, 2024

Yeah they all are gone now. :D
So now we have 2 memory leaks in discoveryNodesPeres and another inpe_imphash.
I am working on fixing these.

from libpe.

boddumanohar avatar boddumanohar commented on July 23, 2024

After the pull #19 the Valgrind's Memcheck output for our demo code shows:

==2351==
==2351== HEAP SUMMARY:
==2351==     in use at exit: 0 bytes in 0 blocks
==2351==   total heap usage: 9,191 allocs, 9,191 frees, 1,885,492 bytes allocated
==2351==
==2351== All heap blocks were freed -- no leaks are possible
==2351==
==2351== For counts of detected and suppressed errors, rerun with: -v
==2351== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)

So now, after this, the entire demo code is free from memory leaks.

from libpe.

jweyrich avatar jweyrich commented on July 23, 2024

Awesome! Thank you!! 🥇 👍

from libpe.

Related Issues (14)

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.