[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 08:08:47 PST 2019


cryptoad added inline comments.


================
Comment at: compiler-rt/lib/scudo/standalone/tests/combined_test.cpp:124
     EXPECT_EQ(NewP, P);
     for (scudo::uptr I = 0; I < scudo::Min(DataSize, NewSize); I++)
       EXPECT_EQ((reinterpret_cast<char *>(NewP))[I], Marker);
----------------
pcc wrote:
> pcc wrote:
> > We already have `scudo::Min(DataSize, NewSize)` here. The problem is that it increases from `DataSize - 32` to `DataSize` during the test. Maybe we should replace this with `DataSize - 32`?
> I see that you edited your message while I was writing my reply. Your new suggestion would also work for me, let me know which one you prefer.
Yeah, I apologize my initial response was also wrong.
Whichever you feel is better I am perfectly fine with either.


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