You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Direct leak of 7 byte(s) in 1 object(s) allocated from:
#0 0x7fac28b16180 in strdup (/usr/lib64/libasan.so.3+0x5a180)#1 0x7fac254aff71 in XrdOfs::XrdOfs() /workspace/xrootd/src/XrdOfs/XrdOfs.cc:139#2 0x8c8466 in XrdFstOfs_Dummy_Test::TestBody() /workspace/eos/unit_tests/fst/XrdFstOfsTests.cc:65
...
#14 0x7fac23faf3d4 in __libc_start_main (/usr/lib64/libc.so.6+0x223d4)
Traced it down to the XrdOfs::XrdOfs() constructor, which performs memory allocation in myRole = strdup(...), but that memory never gets deallocated in the deconstructor.
Since it was causing our Asan unit tests to fail, we added a suppression for this particular case, but would be nicer to have it fixed. :)
Edit: set language format for code blocks
The text was updated successfully, but these errors were encountered:
We consider this a false positive. Many plugin allocate storage for the life of the plugin. As there is no way of exiting xrootd other than killing it, the storage is obviously freed when the process dies. While we can go and fix all of these one-time allocations that's a lot of work to simply satisfy memory leak detectors when, in practice, there really is no leak. Yes, I'm sure several people will disagree but we're taking the path of least resistance here.
Spotted while running the EOS unit tests compiled with Address Sanitizer.
The following dummy test case will produce memory leaks:
With the following message:
Traced it down to the
XrdOfs::XrdOfs()
constructor, which performs memory allocation inmyRole = strdup(...)
, but that memory never gets deallocated in the deconstructor.Since it was causing our Asan unit tests to fail, we added a suppression for this particular case, but would be nicer to have it fixed. :)
Edit: set language format for code blocks
The text was updated successfully, but these errors were encountered: