[all-commits] [llvm/llvm-project] 3f97c6: [scudo][standalone] Fuchsia related fixes

Kostya Kortchinsky via All-commits all-commits at lists.llvm.org
Thu Apr 15 13:27:31 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 3f97c66b00400f5e7f0cd260107f53c11b1cc33b
      https://github.com/llvm/llvm-project/commit/3f97c66b00400f5e7f0cd260107f53c11b1cc33b
  Author: Kostya Kortchinsky <kostyak at google.com>
  Date:   2021-04-15 (Thu, 15 Apr 2021)

  Changed paths:
    M compiler-rt/lib/scudo/standalone/fuchsia.cpp
    M compiler-rt/lib/scudo/standalone/primary64.h
    M compiler-rt/lib/scudo/standalone/release.h
    M compiler-rt/lib/scudo/standalone/secondary.h

  Log Message:
  -----------
  [scudo][standalone] Fuchsia related fixes

While attempting to roll the latest Scudo in Fuchsia, some issues
arose. While trying to debug them, it appeared that `DCHECK`s were
also never exercised in Fuchsia. This CL fixes the following
problems:
- the size of a block in the TransferBatch class must be a multiple
  of the compact pointer scale. In some cases, it wasn't true, which
  lead to obscure crashes. Now, we round up `sizeof(TransferBatch)`.
  This only materialized in Fuchsia due to the specific parameters
  of the `DefaultConfig`;
- 2 `DCHECK` statements in Fuchsia were incorrect;
- `map()` & co. require a size multiple of a page (as enforced in
  Fuchsia `DCHECK`s), which wasn't the case for `PackedCounters`.
- In the Secondary, a parameter was marked as `UNUSED` while it is
  actually used.

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




More information about the All-commits mailing list