1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-07-29 08:21:15 +03:00

chore(MCOL-6018) Fix use-after-free in PrimProc

This simple patch splits loop which invalidated iterators used, causing
use-after-free, potential prodeuction crash and actual crash under ASAN.
This commit is contained in:
Serguey Zefirov
2025-06-23 15:20:40 +03:00
committed by Leonid Fedorov
parent 7fd29de377
commit 0a84f04e8c

View File

@ -293,9 +293,12 @@ void FileBufferMgr::flushOIDs(const uint32_t* oids, uint32_t count)
{
fbList.erase(fFBPool[tmpIt->second->poolIdx].listLoc());
fEmptyPoolSlots.push_back(tmpIt->second->poolIdx);
fbSet.erase(tmpIt->second);
fCacheSize--;
}
for (byLBID_t::iterator tmpIt = itList.first; tmpIt != itList.second; tmpIt++)
{
fbSet.erase(tmpIt->second);
}
}
}
}