vector<> is only annotated if the allocator it's using matches the default allocator, however client code can override the global operator new() and operator delete() which then controls how the default allocator behaves. If the allocation returned by these overridden operators doesn't come from the heap then AddressSanitizer requires that both the start and end be aligned to 8B. The start will always be aligned to at least 8B because the global operator new() doesn't know the type it's allocating for and therefore must match the natural alignment, however the end may not be aligned to 8B if the size of the allocation isn't a multiple of 8B.
This patch fixes the issue by rounding up the capacity of a vector<> on resize to a size that satisfies AddressSanitizer's requirements.
shrink_to_fit cannot increase capacity.