scudo: Tweak how we align UserPtr. NFCI.
Instead of testing whether the pointer is aligned, just align it unconditionally and compare it to the original pointer. This moves the computation of UserPtr up to before we start preparing the header, so that the memory tagging code will be able to read the original header containing the bounds of the previous allocation before it gets potentially clobbered by the pointer realignment code. Differential Revision: https://reviews.llvm.org/D71292
Loading
Please sign in to comment