Fix memory use after free error in vector
This commit is contained in:
parent
d0411b7d52
commit
34ce9afeae
|
@ -161,6 +161,8 @@ void NativeRegisterDataSet::ResetCall(const NativeCodeInstruction& ins, int fast
|
|||
else
|
||||
mRegs[i].Reset();
|
||||
}
|
||||
else if (var->mAliased && ins.mLinkerObject->mProc->mStoresIndirect)
|
||||
mRegs[i].Reset();
|
||||
}
|
||||
else if (var->mAliased)
|
||||
mRegs[i].Reset();
|
||||
|
@ -54527,7 +54529,7 @@ void NativeCodeProcedure::Compile(InterCodeProcedure* proc)
|
|||
|
||||
mInterProc->mLinkerObject->mNativeProc = this;
|
||||
|
||||
CheckFunc = !strcmp(mIdent->mString, "growvoid");
|
||||
CheckFunc = !strcmp(mIdent->mString, "main");
|
||||
|
||||
int nblocks = proc->mBlocks.Size();
|
||||
tblocks = new NativeCodeBasicBlock * [nblocks];
|
||||
|
|
|
@ -8454,7 +8454,12 @@ Expression* Parser::ParseNewOperator(void)
|
|||
else if (pexp->mDecType->mType == DT_TYPE_REFERENCE && pexp->mDecType->mBase->IsConstSame(dec))
|
||||
mdec = dec->mCopyConstructor;
|
||||
else if (pexp->mDecType->mType == DT_TYPE_RVALUEREF && pexp->mDecType->mBase->IsSame(dec))
|
||||
mdec = dec->mMoveConstructor;
|
||||
{
|
||||
if (dec->mMoveConstructor)
|
||||
mdec = dec->mMoveConstructor;
|
||||
else
|
||||
mdec = dec->mCopyConstructor;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
Loading…
Reference in New Issue