Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to properly set up mem leak detection? #374

Open
DDvO opened this issue Nov 24, 2020 · 1 comment
Open

How to properly set up mem leak detection? #374

DDvO opened this issue Nov 24, 2020 · 1 comment

Comments

@DDvO
Copy link

DDvO commented Nov 24, 2020

I did not find a configuration option (in the doc or configure script) on building with memory leak detection and using it. Would be good to add a hint on this at least to the Unix section of the build documentation.

Adding -fsanitize=leak to the CFLAGS was promising,
but when using pkcs11.so as crypto engine with the current OpenSSL master I get

Invalid engine "pkcs11"
C0470945E67F0000:error::DSO support routines:could not load the shared library:crypto/dso/dso_dlfcn.c:118:filename(/usr/local/lib64/engines-3/pkcs11.so): /lib/x86_64-linux-gnu/liblsan.so.0: cannot allocate memory in static TLS block
C0470945E67F0000:error::DSO support routines:could not load the shared library:crypto/dso/dso_lib.c:162:

@mtrojnar
Copy link
Member

mtrojnar commented Aug 9, 2022

I don't think our code uses Thread-local storage (TLS) directly, but some libraries may use it.
Have you tried using a different compiler (e.g., clang instead of gcc or gcc instead of clang)?

There should not be anything special about memory leak detection in our code. Generic techniques should be applicable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants