VirtualBox

儲存庫 vbox 的更動 15677


忽略:
時間撮記:
2008-12-19 上午09:26:23 (16 年 以前)
作者:
vboxsync
訊息:

Don't touch freed memory. Added some more error checks.

檔案:
修改 1 筆資料

圖例:

未更動
新增
刪除
  • trunk/src/VBox/VMM/PATM/PATM.cpp

    r14755 r15677  
    58445844        if (    RT_FAILURE(rc)
    58455845            ||  !(CpuOld.pCurInstr->optype & OPTYPE_HARMLESS))
     5846        {
     5847            if (RT_SUCCESS(rc))
     5848                cbDirty += CpuOld.opsize;
     5849            else
     5850            if (!cbDirty)
     5851                cbDirty = 1;
    58465852            break;
     5853        }
    58475854
    58485855#ifdef DEBUG
     
    58525859        Log(("DIRTY: %s\n", szBuf));
    58535860#endif
     5861        /* Mark as clean; if we fail we'll let it always fault. */
     5862        pRec->fDirty      = false;
     5863
    58545864        /** Remove old lookup record. */
    58555865        patmr3RemoveP2GLookupRecord(pVM, &pPatch->patch, pCurPatchInstrGC);
     
    58575867        pCurPatchInstrGC += CpuOld.opsize;
    58585868        cbDirty          += CpuOld.opsize;
    5859 
    5860         /* Mark as clean; if we fail we'll let it always fault. */
    5861         pRec->fDirty      = false;
    58625869
    58635870        /* Let's see if there's another dirty instruction right after. */
     
    59535960    {
    59545961        STAM_COUNTER_INC(&pVM->patm.s.StatInstrDirtyBad);
     5962        Assert(cbDirty);
     5963
    59555964        /* Mark the whole instruction stream with breakpoints. */
    5956         memset(pPatchInstrHC, 0xCC, cbDirty);
     5965        if (cbDirty)
     5966            memset(pPatchInstrHC, 0xCC, cbDirty);
    59575967
    59585968        if (    pVM->patm.s.fOutOfMemory == false
注意: 瀏覽 TracChangeset 來幫助您使用更動檢視器

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette