1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 11:42:57 +01:00

ElectricFence found this bug where we were reading past the vector boundary.

llvm-svn: 7585
This commit is contained in:
Misha Brukman 2003-08-04 23:48:40 +00:00
parent 0e8197ad06
commit 1ada2fd28c

View File

@ -243,7 +243,7 @@ void InstrRUsage::addUsageDelta(const InstrRUsageDelta &delta) {
// for that resource in each cycle.
std::vector<resourceId_t>& rvec = this->resourcesByCycle[c];
int r;
for (r = (int) rvec.size(); r >= 0; r--)
for (r = rvec.size() - 1; r >= 0; r--)
if (rvec[r] == delta.resourceId)
{// found last entry for the resource
rvec.erase(rvec.begin() + r);