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

Valgrind memory loss reported for call to pthread_setspecific #209

Open
mennodeij opened this issue Feb 17, 2022 · 0 comments
Open

Valgrind memory loss reported for call to pthread_setspecific #209

mennodeij opened this issue Feb 17, 2022 · 0 comments

Comments

@mennodeij
Copy link

Good morning,

In a program that uses VTK (see https://gitlab.kitware.com/vtk/vtk) loguru is used as third party logging for VTK. When I run a program that uses VTK and loguru through valgrind, I see the following:

==2056936== 8 bytes in 1 blocks are definitely lost in loss record 5 of 20,285
==2056936==    at 0x64E50A5: malloc (vg_replace_malloc.c:380)
==2056936==    by 0x1512E80D: strdup (in /usr/lib64/libc-2.28.so)
==2056936==    by 0x329F8C77: vtkloguru::set_thread_name(char const*) (loguru.cpp:923)

It looks like the string passed to pthread_setspecific to set the thread name is duplicated with STRDUP, but never freed. Currently this is on line 1033 in loguru.cpp.

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

1 participant