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
A heap-allocated llvm::SmallVector<T, 0> may leak memory if, when it grows its capacity, it is handed a pointer that is identical to getFirstEl().
When N = 0, getFirstEl() points to memory outside of itself (i.e. immediately after itself). When the vector is heap-allocated, getFirstEl() may end up pointing at unallocated memory that malloc() then allocates and returns. Then, in the destructor, isSmall() returns true, as if there was no heap allocated, so the memory is not freed.