Changeset 78234 in vbox for trunk/src/VBox
- Timestamp:
- Apr 20, 2019 11:49:01 PM (6 years ago)
- Location:
- trunk/src/VBox/Main/src-client
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-client/GuestCtrlPrivate.cpp
r77586 r78234 1266 1266 * 1267 1267 * @return VBox status code. 1268 * @retval VERR_GSTCTL_GUEST_ERROR may be returned, call GuestResult() to get 1269 * the actual result. 1270 * 1268 1271 * @param pWaitEvt Pointer to event to wait for. 1269 1272 * @param msTimeout Timeout (in ms) for waiting. … … 1478 1481 * 1479 1482 * @returns VBox status code. 1483 * @retval VERR_GSTCTL_GUEST_ERROR may be returned, call GuestResult() to get 1484 * the actual result. 1485 * 1480 1486 * @param msTimeout Timeout (in ms) to wait. 1481 1487 * Specifiy 0 to wait indefinitely. -
trunk/src/VBox/Main/src-client/GuestFileImpl.cpp
r77587 r78234 1076 1076 } 1077 1077 1078 /** 1079 * Undocumented, use with great care. 1080 * 1081 * @note Similar code in GuestProcess::i_waitForStatusChange() and 1082 * GuestSession::i_waitForStatusChange(). 1083 */ 1078 1084 int GuestFile::i_waitForStatusChange(GuestWaitEvent *pEvent, uint32_t uTimeoutMS, 1079 1085 FileStatus_T *pFileStatus, int *prcGuest) … … 1116 1122 *prcGuest = (int)lGuestRc; 1117 1123 } 1124 /* waitForEvent may also return VERR_GSTCTL_GUEST_ERROR like we do above, so make prcGuest is set. */ 1125 /** @todo r=bird: Andy, you seem to have forgotten this scenario. Showed up occasionally when 1126 * using the wrong password with a copyto command in a debug build on windows, error info 1127 * contained "Unknown Status -858993460 (0xcccccccc)". As you know windows fills the stack frames 1128 * with 0xcccccccc in debug builds to highlight use of uninitialized data, so that's what happened 1129 * here. It's actually good you didn't initialize lGuest, as it would be heck to find otherwise. 1130 * 1131 * I'm still not very impressed with the error managment or the usuefullness of the documentation 1132 * in this code, though the latter is getting better! */ 1133 else if (vrc == VERR_GSTCTL_GUEST_ERROR && prcGuest) 1134 *prcGuest = pEvent->GuestResult(); 1135 Assert(vrc != VERR_GSTCTL_GUEST_ERROR || !prcGuest || *prcGuest != (int)0xcccccccc); 1118 1136 1119 1137 return vrc; -
trunk/src/VBox/Main/src-client/GuestImpl.cpp
r77436 r78234 173 173 { 174 174 # ifdef DEBUG 175 /** @todo r=bird: hit a use-after-free situation here while debugging the 176 * 0xcccccccc status code issue in copyto. My bet is that this happens 177 * because of an uninit race, where GuestSession::close(), or someone, does 178 * not ensure that the parent object (Guest) is okay to use (in the AutoCaller 179 * sense), only their own object. */ 175 180 ULONG cRefs = itSessions->second->AddRef(); 176 181 LogFlowThisFunc(("sessionID=%RU32, cRefs=%RU32\n", itSessions->first, cRefs > 1 ? cRefs - 1 : 0)); -
trunk/src/VBox/Main/src-client/GuestProcessImpl.cpp
r77587 r78234 1609 1609 } 1610 1610 1611 /** 1612 * Undocumented, you guess what it does. 1613 * 1614 * @note Similar code in GuestFile::i_waitForStatusChange() and 1615 * GuestSession::i_waitForStatusChange(). 1616 */ 1611 1617 int GuestProcess::i_waitForStatusChange(GuestWaitEvent *pEvent, uint32_t uTimeoutMS, 1612 1618 ProcessStatus_T *pProcessStatus, int *prcGuest) … … 1649 1655 *prcGuest = (int)lGuestRc; 1650 1656 } 1657 /* waitForEvent may also return VERR_GSTCTL_GUEST_ERROR like we do above, so make prcGuest is set. */ 1658 else if (vrc == VERR_GSTCTL_GUEST_ERROR && prcGuest) 1659 *prcGuest = pEvent->GuestResult(); 1660 Assert(vrc != VERR_GSTCTL_GUEST_ERROR || !prcGuest || *prcGuest != (int)0xcccccccc); 1651 1661 1652 1662 LogFlowFuncLeaveRC(vrc); -
trunk/src/VBox/Main/src-client/GuestSessionImpl.cpp
r78112 r78234 2884 2884 } 2885 2885 2886 /** 2887 * Undocumented, you guess what it does. 2888 * 2889 * @note Similar code in GuestFile::i_waitForStatusChange() and 2890 * GuestProcess::i_waitForStatusChange(). 2891 */ 2886 2892 int GuestSession::i_waitForStatusChange(GuestWaitEvent *pEvent, uint32_t fWaitFlags, uint32_t uTimeoutMS, 2887 2893 GuestSessionStatus_T *pSessionStatus, int *prcGuest) … … 2922 2928 RT_SUCCESS((int)lGuestRc) ? VINF_SUCCESS : (int)lGuestRc)); 2923 2929 } 2930 /* waitForEvent may also return VERR_GSTCTL_GUEST_ERROR like we do above, so make prcGuest is set. */ 2931 else if (vrc == VERR_GSTCTL_GUEST_ERROR && prcGuest) 2932 *prcGuest = pEvent->GuestResult(); 2933 Assert(vrc != VERR_GSTCTL_GUEST_ERROR || !prcGuest || *prcGuest != (int)0xcccccccc); 2924 2934 2925 2935 LogFlowFuncLeaveRC(vrc);
Note:
See TracChangeset
for help on using the changeset viewer.