Differential Revision: https://reviews.llvm.org/D121850
V.push_back(std::make_pair(ClassId, P));
}
scudo::uptr Found = 0;
- auto Lambda = [V, &Found](scudo::uptr Block) {
+ auto Lambda = [&V, &Found](scudo::uptr Block) {
for (const auto &Pair : V) {
if (Pair.second == reinterpret_cast<void *>(Block))
Found++;
const scudo::uptr PageSize = scudo::getPageSizeCached();
for (scudo::uptr I = 0; I < 32U; I++)
V.push_back(Allocator->allocate(Options, (std::rand() % 16) * PageSize));
- auto Lambda = [V](scudo::uptr Block) {
+ auto Lambda = [&V](scudo::uptr Block) {
EXPECT_NE(std::find(V.begin(), V.end(), reinterpret_cast<void *>(Block)),
V.end());
};