Changeset 73097 in vbox for trunk/src/VBox/Runtime/r0drv/nt
- Timestamp:
- Jul 12, 2018 9:06:33 PM (7 years ago)
- svn:sync-xref-src-repo-rev:
- 123672
- Location:
- trunk/src/VBox/Runtime/r0drv/nt
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/r0drv/nt/dbgkrnlinfo-r0drv-nt.cpp
r70292 r73097 357 357 */ 358 358 uint32_t cModules = pModInfo ? 110 /*32KB*/ : 27 /*8KB*/; 359 ULONG cbInfo = RT_ OFFSETOF(RTL_PROCESS_MODULES, Modules[cModules]);359 ULONG cbInfo = RT_UOFFSETOF_DYN(RTL_PROCESS_MODULES, Modules[cModules]); 360 360 PRTL_PROCESS_MODULES pInfo = (PRTL_PROCESS_MODULES)RTMemAllocZ(cbInfo); 361 361 if (!pInfo) 362 362 { 363 363 cModules = cModules / 4; 364 cbInfo = RT_ OFFSETOF(RTL_PROCESS_MODULES, Modules[cModules]);364 cbInfo = RT_UOFFSETOF_DYN(RTL_PROCESS_MODULES, Modules[cModules]); 365 365 pInfo = (PRTL_PROCESS_MODULES)RTMemAllocZ(cbInfo); 366 366 if (!pInfo) -
trunk/src/VBox/Runtime/r0drv/nt/initterm-r0drv-nt.cpp
r72639 r73097 385 385 { 386 386 #if defined(RT_ARCH_X86) 387 PKPCR pPcr = (PKPCR)__readfsdword(RT_ OFFSETOF(KPCR,SelfPcr));387 PKPCR pPcr = (PKPCR)__readfsdword(RT_UOFFSETOF(KPCR,SelfPcr)); 388 388 pbPrcb = (uint8_t *)pPcr->Prcb; 389 389 #elif defined(RT_ARCH_AMD64) 390 PKPCR pPcr = (PKPCR)__readgsqword(RT_ OFFSETOF(KPCR,Self));390 PKPCR pPcr = (PKPCR)__readgsqword(RT_UOFFSETOF(KPCR,Self)); 391 391 pbPrcb = (uint8_t *)pPcr->CurrentPrcb; 392 392 #else -
trunk/src/VBox/Runtime/r0drv/nt/memobj-r0drv-nt.cpp
r70212 r73097 551 551 if (cMdls >= UINT32_MAX) 552 552 return VERR_OUT_OF_RANGE; 553 PRTR0MEMOBJNT pMemNt = (PRTR0MEMOBJNT)rtR0MemObjNew(RT_ OFFSETOF(RTR0MEMOBJNT, apMdls[cMdls]),553 PRTR0MEMOBJNT pMemNt = (PRTR0MEMOBJNT)rtR0MemObjNew(RT_UOFFSETOF_DYN(RTR0MEMOBJNT, apMdls[cMdls]), 554 554 RTR0MEMOBJTYPE_LOCK, pv, cb); 555 555 if (!pMemNt) -
trunk/src/VBox/Runtime/r0drv/nt/nt3fakes-r0drv-nt.cpp
r70387 r73097 469 469 { 470 470 uZero = *(uint32_t const *)pbCode; 471 offNewHdr = *(uint32_t const *)&pbCode[RT_ OFFSETOF(IMAGE_DOS_HEADER, e_lfanew)];471 offNewHdr = *(uint32_t const *)&pbCode[RT_UOFFSETOF(IMAGE_DOS_HEADER, e_lfanew)]; 472 472 } 473 473 __except(EXCEPTION_EXECUTE_HANDLER) -
trunk/src/VBox/Runtime/r0drv/nt/ntBldSymDb.cpp
r72614 r73097 350 350 if (s_cbNeeded == 0) 351 351 { 352 s_cbNeeded = RT_ OFFSETOF(MYSET, aStructs[RT_ELEMENTS(g_aStructs)]);352 s_cbNeeded = RT_UOFFSETOF(MYSET, aStructs[RT_ELEMENTS(g_aStructs)]); 353 353 for (uint32_t i = 0; i < RT_ELEMENTS(g_aStructs); i++) 354 354 s_cbNeeded += sizeof(MYMEMBER) * g_aStructs[i].cMembers; … … 522 522 MyDbgPrintf(" %s: cChildren=%u (%#x)\n", pszStructNm, cChildren); 523 523 TI_FINDCHILDREN_PARAMS *pChildren; 524 pChildren = (TI_FINDCHILDREN_PARAMS *)alloca(RT_ OFFSETOF(TI_FINDCHILDREN_PARAMS, ChildId[cChildren]));524 pChildren = (TI_FINDCHILDREN_PARAMS *)alloca(RT_UOFFSETOF_DYN(TI_FINDCHILDREN_PARAMS, ChildId[cChildren])); 525 525 pChildren->Start = 0; 526 526 pChildren->Count = cChildren; -
trunk/src/VBox/Runtime/r0drv/nt/thread-r0drv-nt.cpp
r72639 r73097 137 137 138 138 #ifdef RT_ARCH_X86 139 PKPCR pPcr = (PKPCR)__readfsdword(RT_ OFFSETOF(KPCR,SelfPcr));139 PKPCR pPcr = (PKPCR)__readfsdword(RT_UOFFSETOF(KPCR,SelfPcr)); 140 140 uint8_t *pbPrcb = (uint8_t *)pPcr->Prcb; 141 141 142 142 #elif defined(RT_ARCH_AMD64) 143 143 /* HACK ALERT! The offset is from windbg/vista64. */ 144 PKPCR pPcr = (PKPCR)__readgsqword(RT_ OFFSETOF(KPCR,Self));144 PKPCR pPcr = (PKPCR)__readgsqword(RT_UOFFSETOF(KPCR,Self)); 145 145 uint8_t *pbPrcb = (uint8_t *)pPcr->CurrentPrcb; 146 146 -
trunk/src/VBox/Runtime/r0drv/nt/timer-r0drv-nt.cpp
r70341 r73097 493 493 } 494 494 495 PRTTIMER pTimer = (PRTTIMER)RTMemAllocZ(RT_ OFFSETOF(RTTIMER, aSubTimers[cSubTimers]));495 PRTTIMER pTimer = (PRTTIMER)RTMemAllocZ(RT_UOFFSETOF_DYN(RTTIMER, aSubTimers[cSubTimers])); 496 496 if (!pTimer) 497 497 return VERR_NO_MEMORY;
Note:
See TracChangeset
for help on using the changeset viewer.