Changeset 61793 in vbox for trunk/src/VBox/VMM
- Timestamp:
- Jun 21, 2016 2:06:00 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/testcase/tstVMMR0CallHost-1.cpp
r61789 r61793 24 24 #include <iprt/alloca.h> 25 25 #include <iprt/initterm.h> 26 #include <iprt/rand.h> 26 27 #include <iprt/string.h> 27 28 #include <iprt/stream.h> … … 100 101 101 102 103 DECLCALLBACK(DECL_NO_INLINE(RT_NOTHING, int)) stackRandom(PVMMR0JMPBUF pJmpBuf, PFNVMMR0SETJMP pfn, PVM pVM, PVMCPU pVCpu) 104 { 105 #if 0 106 uint32_t cbRand = RTRandU32Ex(1, 64); 107 #else 108 uint32_t cbRand = 1; 109 #endif 110 uint8_t volatile *pabFuzz = (uint8_t volatile *)alloca(cbRand); 111 memset((void *)pabFuzz, 0xfa, cbRand); 112 int rc = vmmR0CallRing3SetJmp(pJmpBuf, pfn, pVM, pVCpu); 113 memset((void *)pabFuzz, 0xaf, cbRand); 114 return rc; 115 } 116 117 102 118 void tst(int iFrom, int iTo, int iInc) 103 119 { … … 117 133 for (int i = iFrom, iItr = 0; i != iTo; i += iInc, iItr++) 118 134 { 119 int rc = vmmR0CallRing3SetJmp(&g_Jmp, (PFNVMMR0SETJMP)tst2, (PVM)(uintptr_t)i, 0);135 int rc = stackRandom(&g_Jmp, (PFNVMMR0SETJMP)tst2, (PVM)(uintptr_t)i, 0); 120 136 RTTESTI_CHECK_MSG_RETV(rc == 0 || rc == 42, ("i=%d rc=%d setjmp; cbFoo=%#x cbFooUsed=%#x\n", i, rc, g_cbFoo, g_cbFooUsed)); 121 137
Note:
See TracChangeset
for help on using the changeset viewer.