[PATCH] D70761: scudo: Reverse order of testing sizes for realloc.

Kostya Kortchinsky via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 27 07:49:59 PST 2019


cryptoad added a comment.

Hey,
I guess my test is just wrong.
Initially I wanted to cover the situation described at https://reviews.llvm.org/D67293, eg: reallocating slightly larger chunk keeps the same block to save on some dealloc/alloc combos.
But you are right in the sense of that there is no guarantee that the extra bytes are identical.
I still want the sizes to be increasing to cover that scenario, but I think what I should have done is update `DataSize` to be `scudo::Min(DataSize, NewSize)` so that we keep the minimal size all the way throughout the test.
Does that make sense to you?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D70761/new/

https://reviews.llvm.org/D70761





More information about the llvm-commits mailing list