-
Dridi Boukelmoune authored
Instead of guaranteeing the pointer alignment of ws->r at the expense of sometimes reserving more than requested, we can instead drop the pointer alignment requirement since that does not refer to the beginning of the allocation. Instead, it is in WS_Release() that we guarantee that the ws->f remains aligned for the next allocation. And WS_Release() already did that so we might as well avoid the potential overcommit from WS_ReserveSize(). This is going to be helpful for a workspace emulator, to make sure that the alignment overhead wouldn't allow off-by-little overflows to sneak past the address sanitizer. This very change was initially made for a workspace sanitizer. It is also a good occasion to make the relevant checks around the ws->r pointer in WS_Assert(). This change is visible in r03131.vtc that now exhibits this behavior. Refs #3320
94337ba5