ADIOS2
ADIOS2 copied to clipboard
BP5 Address sanitizer and undefined behavior sanitizer issues
I'm updating the Fides CI to use ADIOS 2.9 and found a couple of memory leaks as well as an error found by undefined behavior sanitizer.
Memory leaks:
For the UB error, the only information I get is
/usr/include/c++/9/bits/stl_vector.h:1061:34: runtime error: reference binding to null pointer of type 'const struct value_type'
I did a git bisect
and found it started with this commit: 5e03434c2d5d940f51183d07fc607aa8b85801a1
@eisenhauer
Hey Caitlin. Hmm. This code got uglier when we had to support ReadRandomAccess mode and this problem maybe related to that, but offhand I don't see how these things fail to get deleted if the BP5Deserializer destructor is called. This bit of code in the destructor should handle all cases:
if (m_FreeableMBA)
delete m_FreeableMBA;
for (auto &step : MetadataBaseArray)
{
delete step;
}
We're not seeing leaks in our own CI in this, so maybe there's something special about how Fides is using ADIOS? I took a quick peek at the code, but I can't spend time on it at the moment as I'm on vacation. I'd suggest trying to make sure that Close() gets called on all the sources... I don't have any thoughts beyond that without doing some more digging.
That could be the case. I'll check on it.
Have fun on vacation!