[all-commits] [llvm/llvm-project] 526027: [scudo] Change secondary StatsAllocated update

Christopher Ferris via All-commits all-commits at lists.llvm.org
Tue May 9 15:41:21 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 526027df2d62432db3cfce3a61356369ed13cf5e
      https://github.com/llvm/llvm-project/commit/526027df2d62432db3cfce3a61356369ed13cf5e
  Author: Christopher Ferris <cferris at google.com>
  Date:   2023-05-09 (Tue, 09 May 2023)

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

  Log Message:
  -----------
  [scudo] Change secondary StatsAllocated update

In the secondary allocation routine, the StatsAllocated stat is
increased by BlockSize. However, in the deallocate routine, the
stat subtract uses CommitSize. CommitSize can be bigger than BlockSize
so this can lead to a negative calculated stat. Since the stats
are not guaranteed to be completely accurate, just add CommitSize
during allocation.

Reviewed By: Chia-hungDuan

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




More information about the All-commits mailing list