[all-commits] [llvm/llvm-project] 9fbfdd: scudo: Tweak how we align UserPtr. NFCI.

pcc via All-commits all-commits at lists.llvm.org
Tue Dec 10 12:10:12 PST 2019


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 9fbfdd2bfe42a6d0a8e680c64a968e9cfc065fd3
      https://github.com/llvm/llvm-project/commit/9fbfdd2bfe42a6d0a8e680c64a968e9cfc065fd3
  Author: Peter Collingbourne <peter at pcc.me.uk>
  Date:   2019-12-10 (Tue, 10 Dec 2019)

  Changed paths:
    M compiler-rt/lib/scudo/standalone/combined.h

  Log Message:
  -----------
  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




More information about the All-commits mailing list