Comments (7)
Openssl wikipage has solution for this
https://wiki.openssl.org/index.php/Library_Initialization#Cleanup
from libpe.
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.
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.
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.
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.
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.
Awesome! Thank you!! 🥇 👍
from libpe.
Related Issues (14)
- Extend libpe's API to support all the properties of PEV HOT 2
- what is `#pragma pack` when should I use this in my C library? HOT 2
- Demo code returns `null` for imphash HOT 2
- Add pesec.c to libpe HOT 3
- Feature request: calculate Authenticode hash
- Handling of Exports slightly off HOT 4
- Release HOT 1
- error while loading shared libraries: libpe.so.1: cannot open shared object file: No such file or directory HOT 5
- Is one-off in pe_utils_str_widechar2ascii() a security issue? HOT 9
- Exploitable bug on pe_exports function from exports.c
- Missing documentation HOT 1
- Remove unnecessary null pointer checks HOT 3
- A small question HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from libpe.