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

GitOrigin-RevId: 9fbfdd2bfe42a6d0a8e680c64a968e9cfc065fd3
1 file changed