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

Matt Morehouse via All-commits all-commits at lists.llvm.org
Mon Feb 7 13:10:48 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 4fb7c120fed504519d167c93ed9d920aeae46fb0
      https://github.com/llvm/llvm-project/commit/4fb7c120fed504519d167c93ed9d920aeae46fb0
  Author: Matt Morehouse <mascasa at google.com>
  Date:   2022-02-07 (Mon, 07 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