[all-commits] [llvm/llvm-project] c990d5: [HWASan] Use hwasan_memalign for aligned new.

Vitaly Buka via All-commits all-commits at lists.llvm.org
Wed Feb 23 14:22:15 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: c990d56d4228052fff079619770db9967157dfd4
      https://github.com/llvm/llvm-project/commit/c990d56d4228052fff079619770db9967157dfd4
  Author: Vitaly Buka <vitalybuka at google.com>
  Date:   2022-02-23 (Wed, 23 Feb 2022)

  Changed paths:
    M compiler-rt/lib/hwasan/hwasan_new_delete.cpp
    M compiler-rt/test/hwasan/TestCases/new-test.cpp

  Log Message:
  -----------
  [HWASan] Use hwasan_memalign for aligned new.

Aligned new does not require size to be a multiple of alignment, so
memalign is the correct choice instead of aligned_alloc.

Fixes false reports for unaligned sizes.

Reviewed By: eugenis

Differential Revision: https://reviews.llvm.org/D119161




More information about the All-commits mailing list