[all-commits] [llvm/llvm-project] e456df: [scudo][standalone] Fix Primary's ReleaseToOS test

Kostya Kortchinsky via All-commits all-commits at lists.llvm.org
Tue Sep 29 08:27:11 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: e456df77c2a5a2bf905f6848a09faf69b49c5752
      https://github.com/llvm/llvm-project/commit/e456df77c2a5a2bf905f6848a09faf69b49c5752
  Author: Kostya Kortchinsky <kostyak at google.com>
  Date:   2020-09-29 (Tue, 29 Sep 2020)

  Changed paths:
    M compiler-rt/lib/scudo/standalone/tests/primary_test.cpp

  Log Message:
  -----------
  [scudo][standalone] Fix Primary's ReleaseToOS test

Said test was flaking on Fuchsia for non-obvious reasons, and only
for ASan variants (the release was returning 0).

It turned out that the templating was off, `true` being promoted to
a `s32` and used as the minimum interval argument. This meant that in
some circumstances, the normal release would occur, and the forced
release would have nothing to release, hence the 0 byte released.

The symbols are giving it away (note the 1):
```
scudo::SizeClassAllocator64<scudo::FixedSizeClassMap<scudo::DefaultSizeClassConfig>,24ul,1,2147483647,false>::releaseToOS(void)
```

This also probably means that there was no MTE version of that test!

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




More information about the All-commits mailing list