[all-commits] [llvm/llvm-project] e8f724: [scudo] Don't track free/use stats for transfer ba...
Mitch Phillips via All-commits
all-commits at lists.llvm.org
Mon May 3 11:50:44 PDT 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: e8f7241e0b48d557406ece7e0c2f273eea2d7e39
https://github.com/llvm/llvm-project/commit/e8f7241e0b48d557406ece7e0c2f273eea2d7e39
Author: Mitch Phillips <31459023+hctim at users.noreply.github.com>
Date: 2021-05-03 (Mon, 03 May 2021)
Changed paths:
M compiler-rt/lib/scudo/standalone/local_cache.h
Log Message:
-----------
[scudo] Don't track free/use stats for transfer batches.
The Scudo C unit tests are currently non-hermetic. In particular, adding
or removing a transfer batch is a global state of the allocator that
persists between tests. This can cause flakiness in
ScudoWrappersCTest.MallInfo, because the creation or teardown of a batch
causes mallinfo's uordblks or fordblks to move up or down by the size of
a transfer batch on malloc/free.
It's my opinion that uordblks and fordblks should track the statistics
related to the user's malloc() and free() usage, and not the state of
the internal allocator structures. Thus, excluding the transfer batches
from stat collection does the trick and makes these tests pass.
Repro instructions of the bug:
1. ninja ./projects/compiler-rt/lib/scudo/standalone/tests/ScudoCUnitTest-x86_64-Test
2. ./projects/compiler-rt/lib/scudo/standalone/tests/ScudoCUnitTest-x86_64-Test --gtest_filter=ScudoWrappersCTest.MallInfo
Reviewed By: cryptoad
Differential Revision: https://reviews.llvm.org/D101653
More information about the All-commits
mailing list