Changeset 97874 in vbox for trunk/src/VBox
- Timestamp:
- Dec 27, 2022 10:07:39 PM (2 years ago)
- svn:sync-xref-src-repo-rev:
- 154964
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/testcase/tstLdr-4.cpp ¶
r96407 r97874 238 238 239 239 /* Allocate bits. */ 240 aLoads[i].pvBits = RTMem ExecAlloc(cb);240 aLoads[i].pvBits = RTMemPageAlloc(cb); 241 241 if (!aLoads[i].pvBits) 242 242 { 243 243 RTTestIFailed("Out of memory '%s'/%d cbImage=%d. aborting test.", pszFilename, i, cbImage); 244 break; 245 } 246 rc = RTMemProtect(aLoads[i].pvBits, cb, RTMEM_PROT_READ | RTMEM_PROT_WRITE | RTMEM_PROT_EXEC); 247 if (RT_FAILURE(rc)) 248 { 249 RTTestIFailed("RTMemProtect/RWX '%s'/%d cbImage=%d, %Rrc. aborting test.", pszFilename, i, cbImage, rc); 244 250 break; 245 251 } … … 311 317 { 312 318 if (aLoads[i].pvBits) 313 RTMemExecFree(aLoads[i].pvBits, aLoads[i].cbBits); 319 { 320 RTMemProtect(aLoads[i].pvBits, aLoads[i].cbBits, RTMEM_PROT_READ | RTMEM_PROT_WRITE); 321 RTMemPageFree(aLoads[i].pvBits, aLoads[i].cbBits); 322 } 314 323 if (aLoads[i].hLdrMod) 315 324 {
Note:
See TracChangeset
for help on using the changeset viewer.