VirtualBox

Changeset 104788 in vbox for trunk/src


Ignore:
Timestamp:
May 27, 2024 10:20:07 AM (8 months ago)
Author:
vboxsync
Message:

VMM/tmTimerQueuesSanityChecks: Corrected free count check. bugref:10688

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMAll/TMAll.cpp

    r101088 r104788  
    713713# ifdef IN_RING3
    714714                /* Go thru all the timers and check that the active ones all are in the active lists. */
    715                 uint32_t idxTimer = pQueue->cTimersAlloc;
    716                 uint32_t cFree    = 0;
     715                int const rcAllocLock = PDMCritSectRwTryEnterShared(pVM, &pQueue->AllocLock);
     716                uint32_t  idxTimer    = pQueue->cTimersAlloc;
     717                uint32_t  cFree       = 0;
    717718                while (idxTimer-- > 0)
    718719                {
     
    779780                    }
    780781                }
    781                 Assert(cFree == pQueue->cTimersFree);
     782                if (RT_SUCCESS(rcAllocLock))
     783                {
     784                    Assert(cFree == pQueue->cTimersFree);
     785                    PDMCritSectRwLeaveShared(pVM, &pQueue->AllocLock);
     786                }
     787                else
     788                    Assert(cFree >= pQueue->cTimersFree); /* Can be lower as the tmr3TimerCreate may run concurrent. */
     789
    782790# endif /* IN_RING3 */
    783791
Note: See TracChangeset for help on using the changeset viewer.

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