Merge "Run MTE tests on zero-sized allocations." am: 93406da189
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1706267 Change-Id: Iad5541d6126cf79bdbc257172078017b8684d935
This commit is contained in:
commit
4bd1c5c8ac
1 changed files with 6 additions and 1 deletions
|
@ -475,7 +475,7 @@ TEST_P(GwpAsanCrasherTest, gwp_asan_uaf) {
|
|||
|
||||
struct SizeParamCrasherTest : CrasherTest, testing::WithParamInterface<size_t> {};
|
||||
|
||||
INSTANTIATE_TEST_SUITE_P(Sizes, SizeParamCrasherTest, testing::Values(16, 131072));
|
||||
INSTANTIATE_TEST_SUITE_P(Sizes, SizeParamCrasherTest, testing::Values(0, 16, 131072));
|
||||
|
||||
TEST_P(SizeParamCrasherTest, mte_uaf) {
|
||||
#if defined(__aarch64__)
|
||||
|
@ -483,6 +483,11 @@ TEST_P(SizeParamCrasherTest, mte_uaf) {
|
|||
GTEST_SKIP() << "Requires MTE";
|
||||
}
|
||||
|
||||
// Any UAF on a zero-sized allocation will be out-of-bounds so it won't be reported.
|
||||
if (GetParam() == 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
int intercept_result;
|
||||
unique_fd output_fd;
|
||||
StartProcess([&]() {
|
||||
|
|
Loading…
Reference in a new issue