VirtualBox

Changeset 39916 in vbox


Ignore:
Timestamp:
Jan 31, 2012 2:03:13 PM (13 years ago)
Author:
vboxsync
Message:

VMR3GetState: Prevent assertion caused by race between VMR3Destroy/vmR3AtDtor and the statistics view auto refresh.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMR3/VM.cpp

    r39402 r39916  
    30483048VMMR3DECL(VMSTATE) VMR3GetState(PVM pVM)
    30493049{
    3050     VM_ASSERT_VALID_EXT_RETURN(pVM, VMSTATE_TERMINATED);
    3051     return pVM->enmVMState;
     3050    AssertMsgReturn(RT_VALID_ALIGNED_PTR(pVM, PAGE_SIZE), ("%p\n", pVM), VMSTATE_TERMINATED);
     3051    VMSTATE enmVMState = pVM->enmVMState;
     3052    return enmVMState >= VMSTATE_CREATING && enmVMState <= VMSTATE_TERMINATED ? enmVMState : VMSTATE_TERMINATED;
    30523053}
    30533054
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