HomePhabricator

[NFC][scudo] Re-enable check in the test

Authored by vitalybuka on May 28 2021, 1:57 AM.

Description

[NFC][scudo] Re-enable check in the test

It should pass with patched QEMU.

Details

Committed
vitalybukaMay 28 2021, 1:57 AM
Parents
rG4458e8c4b42f: Revert "[scudo] Check if MADV_DONTNEED zeroes memory"
Branches
Unknown
Tags
Unknown

Event Timeline

This test is failing on our v7 bot: https://lab.llvm.org/buildbot/#/builders/59/builds/1938

/home/tcwg-buildslave/worker/clang-cmake-armv7-full/stage2/projects/compiler-rt/lib/scudo/standalone/tests/./ScudoUnitTest-armhf-Test --gtest_filter=ScudoCommonTest.ResidentMemorySize
--
Note: Google Test filter = ScudoCommonTest.ResidentMemorySize
[==========] Running 1 test from 1 test suite.
[----------] Global test environment set-up.
[----------] 1 test from ScudoCommonTest
[ RUN      ] ScudoCommonTest.ResidentMemorySize
/home/tcwg-buildslave/worker/clang-cmake-armv7-full/llvm/compiler-rt/lib/scudo/standalone/tests/common_test.cpp:46: Failure
Expected: (getResidentMemorySize() - OnStart) < (Threshold), actual: 4293672960 vs 134217728
[  FAILED  ] ScudoCommonTest.ResidentMemorySize (5498 ms)
[----------] 1 test from ScudoCommonTest (5498 ms total)
[----------] Global test environment tear-down
[==========] 1 test from 1 test suite ran. (5499 ms total)
[  PASSED  ] 0 tests.
[  FAILED  ] 1 test, listed below:
[  FAILED  ] ScudoCommonTest.ResidentMemorySize
 1 FAILED TEST
********************

Any info on what the qemu change was? Our bots are on real (but aging) hardware so might carry a similar issue.

Changes are here, but they are very specific to QEMU-user behavour
https://github.com/vitalybuka/qemu/compare/sanitizer_bot~4...vitalybuka:sanitizer_bot
However I just realized that the test may cause integer overflow.
It should be fixed with b40908e639b6075c77d7b2a990a2a273a39f4102