25#define WIN32_NO_STATUS
35#define NT_SUCCESS(Status) (((NTSTATUS)(Status)) >= 0)
36#define wcsicmp _wcsicmp
37#if defined(_MSC_VER) && defined(_M_AMD64)
63static void (
WINAPI *pProcessPendingCrossProcessEmulatorWork)(
void);
81#elif defined __x86_64__
87#elif defined __aarch64__
105#if !defined(__REACTOS__) || (DLL_EXPORT_VERSION >= 0x600)
129#define GET_PROC(func) p##func = (void *)GetProcAddress( ntdll, #func )
134 GET_PROC( RtlOpenCrossProcessEmulatorWorkConnection );
139 GET_PROC( RtlWow64GetThreadContext );
144 GET_PROC( RtlWow64GetThreadSelectorEntry );
145 GET_PROC( RtlWow64PopAllCrossProcessWorkFromWorkList );
146 GET_PROC( RtlWow64PopCrossProcessWorkFromFreeList );
147 GET_PROC( RtlWow64PushCrossProcessWorkOntoFreeList );
148 GET_PROC( RtlWow64PushCrossProcessWorkOntoWorkList );
149 GET_PROC( RtlWow64RequestCrossProcessHeavyFlush );
150 GET_PROC( ProcessPendingCrossProcessEmulatorWork );
161 if (pNtQuerySystemInformationEx)
166 sizeof(
process), machines,
sizeof(machines),
NULL );
169 trace(
"machine %04x kernel %u user %u native %u process %u wow64 %u\n",
174 if (pRtlGetNativeSystemInformation)
180 switch (
info.ProcessorArchitecture)
197#if !defined (__REACTOS__) || (DLL_EXPORT_VERSION >= 0x600)
224 machines,
sizeof(machines), &
len );
226 ok( !(
len & 3),
"wrong len %lx\n",
len );
227 len /=
sizeof(machines[0]);
228 for (
i = 0;
i <
len - 1;
i++)
231 ok( machines[
i].Machine == expect_machine,
"wrong process machine %x\n", machines[
i].Machine);
233 ok( machines[
i].Machine != expect_machine,
"wrong machine %x\n", machines[
i].Machine);
236 ok( machines[
i].Machine == expect_native,
"wrong native machine %x\n", machines[
i].Machine);
238 ok( machines[
i].Machine != expect_native,
"wrong machine %x\n", machines[
i].Machine);
240 if (machines[
i].WoW64Container)
242 "wrong wow64 %x\n", machines[
i].Machine);
244 ok( !*(
DWORD *)&machines[
i],
"missing terminating null\n" );
246 len =
i *
sizeof(machines[0]);
250 ok(
len == (
i + 1) *
sizeof(machines[0]),
"wrong len %lu\n",
len );
252 if (pRtlWow64GetProcessMachines)
257 if (expect_machine == expect_native)
258 ok(
current == 0,
"wrong current machine %x / %x\n",
current, expect_machine );
260 ok(
current == expect_machine,
"wrong current machine %x / %x\n",
current, expect_machine );
261 ok( native == expect_native,
"wrong native machine %x / %x\n", native, expect_native );
276 void *entry_point =
NULL;
277 void *win32_entry =
NULL;
292 ok(
image.Machine == expect_image,
"wrong image info %x / %x\n",
image.Machine, expect_image );
295 &win32_entry,
sizeof(win32_entry), &
len );
296 ok( !
status,
"ThreadQuerySetWin32StartAddress failed %lx\n",
status );
298 if (!entry_point)
return;
300 if (
image.Machine == expect_machine)
302 ok(
image.TransferAddress == entry_point,
"wrong entry %p / %p\n",
303 image.TransferAddress, entry_point );
304 ok( win32_entry == entry_point,
"wrong win32 entry %p / %p\n",
305 win32_entry, entry_point );
311 ok(
image.TransferAddress != entry_point,
"wrong entry %p\n",
image.TransferAddress );
312 ok(
image.TransferAddress != win32_entry,
"wrong entry %p\n",
image.TransferAddress );
313 ok( win32_entry != entry_point,
"wrong win32 entry %p\n", win32_entry );
319 static char cmd_sysnative[] =
"C:\\windows\\sysnative\\cmd.exe /c exit";
320 static char cmd_system32[] =
"C:\\windows\\system32\\cmd.exe /c exit";
321 static char cmd_syswow64[] =
"C:\\windows\\syswow64\\cmd.exe /c exit";
334 if (!pNtQuerySystemInformationEx)
return;
338 machines,
sizeof(machines), &
len );
341 win_skip(
"SystemSupportedProcessorArchitectures not supported\n" );
348 machines,
sizeof(machines), &
len );
352 machines,
sizeof(machines), &
len );
357 machines,
sizeof(machines), &
len );
361 machines,
sizeof(machines), &
len );
414 if (pRtlWow64GetCurrentMachine)
419 if (pRtlWow64IsWowGuestMachineSupported)
427 status = pRtlWow64IsWowGuestMachineSupported( machines[
i], &
ret );
432 "%04x: got %u\n", machines[
i],
ret );
434 ok( !
ret,
"%04x: got %u\n", machines[
i],
ret );
443 pRtlWow64PushCrossProcessWorkOntoFreeList(
list,
entry );
454 pRtlWow64PushCrossProcessWorkOntoWorkList(
list,
entry, &
ret );
464 return pRtlWow64PopCrossProcessWorkFromFreeList(
list );
481 return pRtlWow64PopAllCrossProcessWorkFromWorkList(
list, &
flush );
492 entry->next = prev_pos;
503 pRtlWow64RequestCrossProcessHeavyFlush(
list );
509#define expect_cross_work_entry(list,entry,id,addr,size,arg0,arg1,arg2,arg3) \
510 expect_cross_work_entry_(list,entry,id,addr,size,arg0,arg1,arg2,arg3,__LINE__)
526 ok_(__FILE__,
line)(
entry->args[0] == arg0,
"wrong args[0] %x / %x\n",
entry->args[0], arg0 );
556 ok(
size == 0x4000,
"unexpected size %Ix\n",
size );
565 if (pRtlOpenCrossProcessEmulatorWorkConnection)
567 pRtlOpenCrossProcessEmulatorWorkConnection(
process, &
mapping, &addr2 );
569 ok( addr2 !=
NULL,
"got NULL data\n" );
582 addr2 = (
void *)0xdeadbeef;
585 ok( !addr2,
"got data %p\n", addr2 );
587 else skip(
"RtlOpenCrossProcessEmulatorWorkConnection not supported\n" );
607 ok( !
entry,
"not at end of list\n" );
614 (
char *)
addr + 0x333, 17,
619 ok( !
entry,
"not at end of list\n" );
630 ok( !
entry,
"not at end of list\n" );
632 addr = (
void *)0x123;
636 "NtAllocateVirtualMemory failed %lx\n",
status );
645 ok( !
entry,
"not at end of list\n" );
659 ok( !
entry,
"not at end of list\n" );
673 ok( !
entry,
"not at end of list\n" );
686 ok( !
entry,
"not at end of list\n" );
688 addr2 = (
char *)
addr + 0x111;
700 ok( !
entry,
"not at end of list\n" );
702 addr2 = (
char *)
addr + 0x222;
706 "NtProtectVirtualMemory failed %lx\n",
status );
711 (
char *)
addr + 0x222, 34,
714 (
char *)
addr + 0x222, 34,
717 ok( !
entry,
"not at end of list\n" );
722 ok( !
entry,
"not at end of list\n" );
724 addr2 = (
char *)
addr + 0x1234;
736 ok( !
entry,
"not at end of list\n" );
749 ok( !
entry,
"not at end of list\n" );
751 addr = (
void *)0x123;
755 "NtFreeVirtualMemory failed %lx\n",
status );
764 ok( !
entry,
"not at end of list\n" );
769 ok(
mapping != 0,
"CreateFileMapping failed\n" );
776 ok( !
entry,
"list not empty\n" );
781 0xcccccccc, 0xcccccccc, 0xcccccccc, 0xcccccccc );
782 ok( !
entry,
"not at end of list\n" );
789 0xcccccccc, 0xcccccccc, 0xcccccccc, 0xcccccccc );
791 ok( !
entry,
"not at end of list\n" );
798 0xcccccccc, 0xcccccccc );
800 (
char *)
addr + 0x1000, 0x2000,
803 (
char *)
addr + 0x1ffe,
sizeof(
data),
804 0xcccccccc, 0xcccccccc, 0xcccccccc, 0xcccccccc );
808 0xcccccccc, 0xcccccccc );
810 (
char *)
addr + 0x1000, 0x2000,
812 ok( !
entry,
"not at end of list\n" );
817 ok( !
entry,
"list not empty\n" );
836 ok( !
status,
"RtlWow64GetSharedInfoProcess failed %lx\n",
status );
840 ok(
info->NativeSystemPageSize == 0x1000,
"wrong page size %lx\n",
841 info->NativeSystemPageSize );
843 "wrong flags %lx\n",
info->CpuFlags );
847 info->EmulatedMachineType );
858 trace(
"wow64info found at %lx\n",
i * 4 );
862 ok(
i <
limit,
"wow64info not found in PEB\n" );
864 if (
info->SectionHandle &&
info->CrossProcessWorkList)
867 trace(
"no WOW64INFO section handle\n" );
870#if !defined (__REACTOS__) || (DLL_EXPORT_VERSION >= 0x600)
884 ok( !
status,
"RtlWow64GetSharedInfoProcess failed %lx\n",
status );
886 ok(
buffer[0] == 0xcccccccc,
"buffer initialized %lx\n",
buffer[0] );
897 trace(
"shared info found at %lx\n",
i * 4 );
901 ok(
i <
limit,
"shared info not found in PEB\n" );
903 if (
info &&
info->SectionHandle &&
info->CrossProcessWorkList)
906 trace(
"no shared info section handle\n" );
940 ok(
res ==
sizeof(teb),
"wrong len %Ix\n",
res );
956 "wrong Tib.ExceptionList %p / %p\n",
959 ok(
res ==
sizeof(teb32),
"wrong len %Ix\n",
res );
966 &proc_info,
sizeof(proc_info),
NULL );
971 &peb_ptr,
sizeof(peb_ptr),
NULL );
974 "wrong peb %p\n", (
void *)peb_ptr );
977 ok(
res ==
sizeof(peb),
"wrong len %Ix\n",
res );
982 ok(
res ==
sizeof(peb32),
"wrong len %Ix\n",
res );
988#define CHECK_STR(name) \
989 ok( (char *)params.name.Buffer >= (char *)peb.ProcessParameters && \
990 (char *)params.name.Buffer < (char *)peb.ProcessParameters + params.Size, \
991 "wrong " #name " ptr %p / %p-%p\n", params.name.Buffer, peb.ProcessParameters, \
992 (char *)peb.ProcessParameters + params.Size )
1004 ok(
res ==
sizeof(params32),
"wrong len %Ix\n",
res );
1005#define CHECK_STR(name) \
1006 ok( ULongToPtr(params32.name.Buffer) >= ULongToPtr(peb32.ProcessParameters) && \
1007 ULongToPtr(params32.name.Buffer) < ULongToPtr(peb32.ProcessParameters + params32.Size), \
1008 "wrong " #name " ptr %lx / %lx-%lx\n", params32.name.Buffer, peb32.ProcessParameters, \
1009 peb32.ProcessParameters + params.Size ); \
1010 ok( params32.name.Length == params.name.Length, "wrong " #name "len %u / %u\n", \
1011 params32.name.Length, params.name.Length )
1026 else win_skip(
"RtlWow64GetSharedInfoProcess not supported\n" );
1029 ok(
ret,
"debugging failed\n" );
1031 ok(
res ==
sizeof(peb),
"wrong len %Ix\n",
res );
1036 ok(
res ==
sizeof(peb32),
"wrong len %Ix\n",
res );
1045#if !defined (__REACTOS__) || (DLL_EXPORT_VERSION >= 0x600)
1054 ok(
res ==
sizeof(teb),
"wrong len %Ix\n",
res );
1061 &proc_info,
sizeof(proc_info),
NULL );
1066 &peb_ptr,
sizeof(peb_ptr),
NULL );
1068 ok( !peb_ptr,
"wrong peb %p\n", (
void *)peb_ptr );
1071 ok(
res ==
sizeof(peb),
"wrong len %Ix\n",
res );
1094 ok(
res ==
sizeof(teb),
"wrong len %Ix\n",
res );
1095 ok( teb.
Tib.
Self ==
info.TebBaseAddress,
"wrong teb %p / %p\n",
1101 else ok( !
info.TebBaseAddress,
"got teb %p\n",
info.TebBaseAddress );
1104 &proc_info,
sizeof(proc_info),
NULL );
1117 if (pRtlWow64GetSharedInfoProcess)
1122 ok( !
status,
"RtlWow64GetSharedInfoProcess failed %lx\n",
status );
1140 ok( !!teb64,
"GdiBatchCount not set\n" );
1144 ok( (
char *)teb64 + 0x2000 == (
char *)
NtCurrentTeb(),
"unexpected diff %p / %p\n",
1155 "wrong StaticUnicodeString %s / %p\n",
1163 "wrong ImageBaseAddress %s / %p\n",
1170 "wrong AnsiCodePageData %I64x / %p\n",
1173 "wrong OemCodePageData %I64x / %p\n",
1176 "wrong UnicodeCaseTableData %I64x / %p\n",
1183 "WowTebOffset set to %lx\n",
NtCurrentTeb()->WowTebOffset );
1195 if (!pRtlWow64GetThreadSelectorEntry)
1197 win_skip(
"RtlWow64GetThreadSelectorEntry not supported\n" );
1207#elif defined __x86_64__
1209 context.SegFs = __readsegfs();
1210 context.SegSs = __readsegss();
1221#define GET_ENTRY(info,size,ret) \
1222 pRtlWow64GetThreadSelectorEntry( GetCurrentThread(), info, size, ret )
1226#define GET_ENTRY(info,size,ret) \
1227 NtQueryInformationThread( GetCurrentThread(), ThreadDescriptorTableEntry, info, size, ret )
1231 retlen = 0xdeadbeef;
1235 ok( retlen == 0xdeadbeef,
"len set %lu\n", retlen );
1237 retlen = 0xdeadbeef;
1240 ok( retlen == 0xdeadbeef,
"len set %lu\n", retlen );
1242 retlen = 0xdeadbeef;
1245 ok( retlen == 0xdeadbeef,
"len set %lu\n", retlen );
1250 for (
info.Selector = 0;
info.Selector < 0x100;
info.Selector++)
1252 retlen = 0xdeadbeef;
1255 (
info.Entry.HighWord.Bytes.BaseMid << 16) |
1256 (
info.Entry.HighWord.Bytes.BaseHi << 24));
1257 limit = (
info.Entry.LimitLow |
info.Entry.HighWord.Bits.LimitHi << 16);
1258 sel =
info.Selector | 3;
1263 ok( retlen ==
sizeof(
info.Entry),
"len set %lu\n", retlen );
1266 ok( !
info.Entry.HighWord.Bytes.Flags1,
"wrong flags1 %x\n",
info.Entry.HighWord.Bytes.Flags1 );
1267 ok( !
info.Entry.HighWord.Bytes.Flags2,
"wrong flags2 %x\n",
info.Entry.HighWord.Bytes.Flags2 );
1269 else if (sel ==
context.SegCs)
1272 ok( retlen ==
sizeof(
info.Entry),
"len set %lu\n", retlen );
1275 ok(
info.Entry.HighWord.Bits.Type == 0x1b,
"wrong type %x\n",
info.Entry.HighWord.Bits.Type );
1276 ok(
info.Entry.HighWord.Bits.Dpl == 3,
"wrong dpl %x\n",
info.Entry.HighWord.Bits.Dpl );
1277 ok(
info.Entry.HighWord.Bits.Pres,
"wrong pres\n" );
1278 ok( !
info.Entry.HighWord.Bits.Sys,
"wrong sys\n" );
1279 ok(
info.Entry.HighWord.Bits.Default_Big,
"wrong big\n" );
1280 ok(
info.Entry.HighWord.Bits.Granularity,
"wrong granularity\n" );
1282 else if (sel ==
context.SegSs)
1285 ok( retlen ==
sizeof(
info.Entry),
"len set %lu\n", retlen );
1288 ok(
info.Entry.HighWord.Bits.Type == 0x13,
"wrong type %x\n",
info.Entry.HighWord.Bits.Type );
1289 ok(
info.Entry.HighWord.Bits.Dpl == 3,
"wrong dpl %x\n",
info.Entry.HighWord.Bits.Dpl );
1290 ok(
info.Entry.HighWord.Bits.Pres,
"wrong pres\n" );
1291 ok( !
info.Entry.HighWord.Bits.Sys,
"wrong sys\n" );
1292 ok(
info.Entry.HighWord.Bits.Default_Big,
"wrong big\n" );
1293 ok(
info.Entry.HighWord.Bits.Granularity,
"wrong granularity\n" );
1295 else if (sel ==
context.SegFs)
1298 ok( retlen ==
sizeof(
info.Entry),
"len set %lu\n", retlen );
1307 "wrong limit %lx\n",
limit );
1308 ok(
info.Entry.HighWord.Bits.Type == 0x13,
"wrong type %x\n",
info.Entry.HighWord.Bits.Type );
1309 ok(
info.Entry.HighWord.Bits.Dpl == 3,
"wrong dpl %x\n",
info.Entry.HighWord.Bits.Dpl );
1310 ok(
info.Entry.HighWord.Bits.Pres,
"wrong pres\n" );
1311 ok( !
info.Entry.HighWord.Bits.Sys,
"wrong sys\n" );
1312 ok(
info.Entry.HighWord.Bits.Default_Big,
"wrong big\n" );
1313 ok( !
info.Entry.HighWord.Bits.Granularity,
"wrong granularity\n" );
1317 ok( retlen ==
sizeof(
info.Entry),
"len set %lu\n", retlen );
1318 trace(
"succeeded for %lx base %lx limit %lx type %x\n",
1326 "%lx: wrong status %lx\n",
info.Selector,
status );
1327 ok( retlen == 0xdeadbeef,
"len set %lu\n", retlen );
1343 if (!pNtMapViewOfSectionEx)
1345 win_skip(
"NtMapViewOfSectionEx() not supported\n" );
1353 ok(
mapping != 0,
"CreateFileMapping failed\n" );
1362 win_skip(
"MemExtendedParameterImageMachine not supported\n" );
1369 "NtMapViewOfSection returned %08lx\n",
status );
1387 "NtMapViewOfSection returned %08lx\n",
status );
1402 "NtMapViewOfSection returned %08lx\n",
status );
1427 "NtMapViewOfSection returned %08lx\n",
status );
1438 ok(
mapping != 0,
"CreateFileMapping failed\n" );
1446 "NtMapViewOfSection returned %08lx\n",
status );
1462 ok(
mapping != 0,
"CreateFileMapping failed\n" );
1517#define expect_notifications(results, count, expect, syscall) \
1518 expect_notifications_(results, count, expect, syscall, __LINE__)
1536 ok_(__FILE__,
line)( regs[
j] ==
expect->args[
j],
"%u: wrong args[%u] %I64x / %I64x\n",
1549 entry->args[0] = arg0;
1559 if (pProcessPendingCrossProcessEmulatorWork)
1561 pProcessPendingCrossProcessEmulatorWork();
1578 static const BYTE fast_forward[] = { 0x48, 0x8b, 0xc4, 0x48, 0x89, 0x58, 0x20, 0x55, 0x5d, 0xe9 };
1582 skip(
"%s not exported\n", win64_name );
1585 if (
memcmp(
ptr, fast_forward,
sizeof(fast_forward) ))
1587 skip(
"unrecognized x64 thunk for %s\n", win64_name );
1590 ptr +=
sizeof(fast_forward);
1595 skip(
"%s not exported\n", win32_name );
1626 ok(
mapping != 0,
"CreateFileMapping failed\n" );
1642 expect_cross[0].
args[2], expect_cross[0].
args[3], 0, 0 );
1644 expect_cross[1].
args[2], expect_cross[1].
args[3], 0xdeadbeef, 0 );
1647 ok( !
list->work_list.first,
"list not empty\n" );
1662 { 5, { 0x1234567890, 0x6543210000,
PAGE_READWRITE, 1, 0xdeadbeef } }
1672 expect_cross[0].
args[1], expect_cross[0].
args[2], 0, 0, 0 );
1674 expect_cross[1].
args[1], expect_cross[1].
args[2], 0xdeadbeef, 0, 0 );
1677 ok( !
list->work_list.first,
"list not empty\n" );
1695 { 5, { 0x1234567890, 0x6543210000,
MEM_RELEASE, 0, 0 } },
1696 { 5, { 0x1234567890, 0x6543210000,
MEM_RELEASE, 1, 0xdeadbeef } }
1705 expect_cross[0].
args[1], expect_cross[0].
args[2], 0, 0, 0 );
1707 expect_cross[1].
args[1], expect_cross[1].
args[2], 0xdeadbeef, 0, 0 );
1710 ok( !
list->work_list.first,
"list not empty\n" );
1729 ok( !
list->work_list.first,
"list not empty\n" );
1741 expect_cross.
args[1], 0, 0, 0, 0 );
1744 ok( !
list->work_list.first,
"list not empty\n" );
1762 ok( !
list->work_list.first,
"list not empty\n" );
1767 ok( !
list->work_list.first,
"list not empty\n" );
1787 NtCurrentTeb()->Tib.ArbitraryUserPointer = (
WCHAR *)
L"c:\\windows\\system32\\version.dll";
1805 if (
NtCurrentTeb()->ChpeV2CpuAreaInfo->InSyscallCallback)
1814 ok(
status == 0xdeadbeef,
"NtMapViewOfSection failed %lx\n",
status );
1914static void test_cross_process_work_list(
void)
1921 if (!pRtlWow64PopAllCrossProcessWorkFromWorkList)
1923 win_skip(
"cross process list not supported\n" );
1930 res = pRtlWow64PushCrossProcessWorkOntoFreeList( &
list->free_list, &
list->entries[
i] );
1931 ok(
res ==
TRUE,
"%u: RtlWow64PushCrossProcessWorkOntoFreeList failed\n",
i );
1934 ok(
list->free_list.counter ==
count,
"wrong counter %u\n",
list->free_list.counter );
1936 "wrong offset %u\n",
list->free_list.first );
1939 "%u: wrong offset %x / %x\n",
i,
list->entries[
i - 1].
next,
1940 (
UINT)((
char *)&
list->entries[
i - 2] - (
char *)&
list->free_list) );
1944 ptr = pRtlWow64PopCrossProcessWorkFromFreeList( &
list->free_list );
1946 ok( !
ptr->next,
"next not reset %x\n",
ptr->next );
1947 ok(
list->free_list.first ==
next,
"wrong offset %x / %x\n",
list->free_list.first,
next );
1948 ok(
list->free_list.counter ==
count + 1,
"wrong counter %u\n",
list->free_list.counter );
1952 ptr->addr = 0xdeadbeef;
1955 ret = (
void *)0xdeadbeef;
1956 res = pRtlWow64PushCrossProcessWorkOntoWorkList( &
list->work_list,
ptr, (
void **)&
ret );
1957 ok(
res ==
TRUE,
"RtlWow64PushCrossProcessWorkOntoWorkList failed\n" );
1958 ok( !
ret,
"got ret ptr %p\n",
ret );
1959 ok(
list->work_list.counter == 1,
"wrong counter %u\n",
list->work_list.counter );
1962 ok( !
ptr->next,
"got next %x\n",
ptr->next );
1965 ptr = pRtlWow64PopCrossProcessWorkFromFreeList( &
list->free_list );
1966 ok(
list->free_list.counter ==
count + 2,
"wrong counter %u\n",
list->free_list.counter );
1968 ptr->addr = 0x123456;
1970 res = pRtlWow64PushCrossProcessWorkOntoWorkList( &
list->work_list,
ptr, (
void **)&
ret );
1971 ok(
res ==
TRUE,
"RtlWow64PushCrossProcessWorkOntoWorkList failed\n" );
1972 ok( !
ret,
"got ret ptr %p\n",
ret );
1973 ok(
list->work_list.counter == 2,
"wrong counter %u\n",
list->work_list.counter );
1974 ok(
list->work_list.first == (
char *)
ptr - (
char *)&
list->work_list,
"wrong ptr %p / %p\n",
1979 ptr = pRtlWow64PopAllCrossProcessWorkFromWorkList( &
list->work_list, &flush );
1980 ok( !flush,
"RtlWow64PopAllCrossProcessWorkFromWorkList flush is TRUE\n" );
1981 ok(
list->work_list.counter == 3,
"wrong counter %u\n",
list->work_list.counter );
1982 ok( !
list->work_list.first,
"list not empty %x\n",
list->work_list.first );
1985 ok(
ptr->next,
"next not set\n" );
1990 ok( !
ptr->next,
"list not terminated\n" );
1992 res = pRtlWow64PushCrossProcessWorkOntoWorkList( &
list->work_list,
ptr, (
void **)&
ret );
1993 ok(
res ==
TRUE,
"RtlWow64PushCrossProcessWorkOntoWorkList failed\n" );
1994 ok( !
ret,
"got ret ptr %p\n",
ret );
1995 ok(
list->work_list.counter == 4,
"wrong counter %u\n",
list->work_list.counter );
1997 res = pRtlWow64RequestCrossProcessHeavyFlush( &
list->work_list );
1998 ok(
res ==
TRUE,
"RtlWow64RequestCrossProcessHeavyFlush failed\n" );
1999 ok(
list->work_list.counter == 5,
"wrong counter %u\n",
list->work_list.counter );
2005 ptr = pRtlWow64PopAllCrossProcessWorkFromWorkList( &
list->work_list, &flush );
2006 ok( flush ==
TRUE,
"RtlWow64PopAllCrossProcessWorkFromWorkList flush not set\n" );
2007 ok(
list->work_list.counter == 6,
"wrong counter %u\n",
list->work_list.counter );
2008 ok( !
list->work_list.first,
"list not empty %x\n",
list->work_list.first );
2011 ok( !
ptr->next,
"next not set\n" );
2014 ptr = pRtlWow64PopAllCrossProcessWorkFromWorkList( &
list->work_list, &flush );
2015 ok( flush ==
FALSE,
"RtlWow64PopAllCrossProcessWorkFromWorkList flush set\n" );
2016 ok(
list->work_list.counter == 6,
"wrong counter %u\n",
list->work_list.counter );
2017 ok( !
list->work_list.first,
"list not empty %x\n",
list->work_list.first );
2020 res = pRtlWow64RequestCrossProcessHeavyFlush( &
list->work_list );
2021 ok(
res ==
TRUE,
"RtlWow64RequestCrossProcessHeavyFlush failed\n" );
2022 ok(
list->work_list.counter == 7,
"wrong counter %u\n",
list->work_list.counter );
2025 res = pRtlWow64RequestCrossProcessHeavyFlush( &
list->work_list );
2026 ok(
res ==
TRUE,
"RtlWow64RequestCrossProcessHeavyFlush failed\n" );
2027 ok(
list->work_list.counter == 8,
"wrong counter %u\n",
list->work_list.counter );
2031 ptr = pRtlWow64PopAllCrossProcessWorkFromWorkList( &
list->work_list, &flush );
2032 ok( flush ==
TRUE,
"RtlWow64PopAllCrossProcessWorkFromWorkList flush set\n" );
2033 ok(
list->work_list.counter == 9,
"wrong counter %u\n",
list->work_list.counter );
2034 ok( !
list->work_list.first,
"list not empty %x\n",
list->work_list.first );
2039 ptr = pRtlWow64PopCrossProcessWorkFromFreeList( &
list->free_list );
2041 ok(
list->free_list.counter ==
count + 3 +
i,
"wrong counter %u\n",
list->free_list.counter );
2043 ok(
list->free_list.counter ==
count + 2 +
i,
"wrong counter %u\n",
list->free_list.counter );
2044 ok( !
list->free_list.first,
"first still set %x\n",
list->free_list.first );
2052 if (pRtlWow64GetCpuAreaInfo)
2073#define ALIGN(ptr,align) ((void *)(((ULONG_PTR)(ptr) + (align) - 1) & ~((align) - 1)))
2077 for (
j = 0;
j < 8;
j++)
2087 "%lu:%lu: wrong offset %Iu cpu %p context %p\n",
2090 "%lu:%lu: wrong ex offset %lu\n",
i,
j, (
ULONG)((
char *)
info.ContextEx - (
char *)
cpu) );
2092 "%lu:%lu: wrong flags offset %lu\n",
2093 i,
j, (
ULONG)((
char *)
info.ContextFlagsLocation - (
char *)
info.Context) );
2094 ok(
info.CpuReserved ==
cpu,
"%lu:%lu: wrong cpu %p / %p\n",
i,
j,
info.CpuReserved,
cpu );
2095 ok(
info.ContextFlag ==
tests[
i].flag,
"%lu:%lu: wrong flag %08lx\n",
i,
j,
info.ContextFlag );
2096 ok(
info.Machine ==
tests[
i].machine,
"%lu:%lu: wrong machine %x\n",
i,
j,
info.Machine );
2101 else win_skip(
"RtlWow64GetCpuAreaInfo not supported\n" );
2112 "wrong opcodes %02x %02x %02x %02x\n",
code[0],
code[1],
code[2],
code[3] );
2123 0x48, 0xc7, 0xc1, 0x34, 0x12, 0x00, 0x00,
2124 0x48, 0xb8, 0, 0, 0, 0, 0, 0, 0, 0,
2147static void test_xtajit64(
void)
2158 win_skip(
"xtaji64.dll not loaded\n" );
2161#define GET_PROC(func) p##func = pRtlFindExportedRoutineByName( module, #func )
2162 GET_PROC( BTCpu64IsProcessorFeaturePresent );
2164 GET_PROC( UpdateProcessorInformation );
2167 if (pBTCpu64IsProcessorFeaturePresent)
2169 static const ULONGLONG expect_features =
2184 for (
i = 0;
i < 64;
i++)
2186 BOOLEAN ret = pBTCpu64IsProcessorFeaturePresent(
i );
2187 if (expect_features & (1ull <<
i))
ok(
ret,
"missing feature %u\n",
i );
2188 else if (
ret)
trace(
"extra feature %u supported\n",
i );
2191 else win_skip(
"BTCpu64IsProcessorFeaturePresent missing\n" );
2193 if (pUpdateProcessorInformation)
2199 pUpdateProcessorInformation( &
info );
2202 "wrong architecture %u\n",
info.ProcessorArchitecture );
2203 ok(
info.ProcessorLevel == 21,
"wrong level %u\n",
info.ProcessorLevel );
2204 ok(
info.ProcessorRevision == 1,
"wrong revision %u\n",
info.ProcessorRevision );
2205 ok(
info.MaximumProcessors == 0xcccc,
"wrong max proc %u\n",
info.MaximumProcessors );
2206 ok(
info.ProcessorFeatureBits == 0xcccccccc,
"wrong features %lx\n",
info.ProcessorFeatureBits );
2208 else win_skip(
"UpdateProcessorInformation missing\n" );
2210 if (pBeginSimulation)
2215 ok(
thread != 0,
"thread creation failed\n" );
2217 ok( !
ret,
"wait failed %lx\n",
ret );
2222 else win_skip(
"BeginSimulation missing\n" );
2240 NtCurrentTeb()->ChpeV2CpuAreaInfo->InSyscallCallback++;
2242 NtCurrentTeb()->ChpeV2CpuAreaInfo->InSyscallCallback--;
2244 skip(
"arm64ec shared info not found\n" );
2256 0xe8, 0x00, 0x00, 0x00, 0x00,
2257 0x83, 0x04, 0x24, 0x05,
2265 0x41, 0x8b, 0x4e, 0x10,
2266 0x41, 0x8b, 0x76, 0x14,
2267 0x67, 0x8d, 0x04, 0xcd, 0, 0, 0, 0,
2270 0xb8, 0x20, 0x00, 0x00, 0x00,
2272 0x48, 0x83, 0xe4, 0xf0,
2275 0x48, 0x8b, 0x0c, 0x24,
2276 0x48, 0x8b, 0x54, 0x24, 0x08,
2277 0x4c, 0x8b, 0x44, 0x24, 0x10,
2278 0x4c, 0x8b, 0x4c, 0x24, 0x18,
2279 0x41, 0xff, 0x56, 0x08,
2280 0x48, 0x8d, 0x65, 0xf0,
2312 } LDR_DATA_TABLE_ENTRY64;
2318 LDR_DATA_TABLE_ENTRY64
entry;
2325 ok( !
status,
"NtWow64ReadVirtualMemory64 failed %lx\n",
status );
2327 ok( peb64.
LdrData,
"LdrData not initialized\n" );
2328 if (!peb64.
LdrData)
goto done;
2330 ok( !
status,
"NtWow64ReadVirtualMemory64 failed %lx\n",
status );
2336 ok( !
status,
"NtWow64ReadVirtualMemory64 failed %lx\n",
status );
2338 ok( !
status,
"NtWow64ReadVirtualMemory64 failed %lx\n",
status );
2341 ptr =
entry.InLoadOrderLinks.Flink;
2364 ok( !
status,
"NtWow64ReadVirtualMemory64 failed %lx\n",
status );
2366 ok( !
status,
"NtWow64ReadVirtualMemory64 failed %lx\n",
status );
2368 &exports,
sizeof(exports),
NULL );
2369 ok( !
status,
"NtWow64ReadVirtualMemory64 failed %lx\n",
status );
2375 ok( !
status,
"NtWow64ReadVirtualMemory64 failed %lx\n",
status );
2378 ok( !
status,
"NtWow64ReadVirtualMemory64 failed %lx\n",
status );
2381 ok( !
status,
"NtWow64ReadVirtualMemory64 failed %lx\n",
status );
2385 ok( !
status,
"NtWow64ReadVirtualMemory64 failed %lx\n",
status );
2408#define CHECK_MODULE(mod) do { if (!wcsicmp( name, L"" #mod ".dll" )) { mod ## _module = base; return; } } while(0)
2426 if (!pNtWow64ReadVirtualMemory64)
return;
2443 const char str[] =
"hello wow64";
2450 if (pNtWow64ReadVirtualMemory64)
2453 ok( !
status,
"NtWow64ReadVirtualMemory64 failed %lx\n",
status );
2457 ok( !
status,
"NtWow64WriteVirtualMemory64 failed %lx\n",
status );
2463 "NtWow64ReadVirtualMemory64 failed %lx\n",
status );
2466 "NtWow64WriteVirtualMemory64 failed %lx\n",
status );
2468 else win_skip(
"NtWow64ReadVirtualMemory64 not supported\n" );
2470 if (pNtWow64AllocateVirtualMemory64)
2477 ok( !
status,
"NtWow64AllocateVirtualMemory64 failed %lx\n",
status );
2478 ok(
ptr,
"ptr not set\n" );
2489 "NtWow64AllocateVirtualMemory64 failed %lx\n",
status );
2494 "NtWow64AllocateVirtualMemory64 failed %lx\n",
status );
2498 "NtWow64AllocateVirtualMemory64 failed %lx\n",
status );
2502 ok( !
status,
"NtWow64AllocateVirtualMemory64 failed %lx\n",
status );
2504 if (!
status && pNtWow64WriteVirtualMemory64)
2507 ok( !
status,
"NtWow64WriteVirtualMemory64 failed %lx\n",
status );
2514 ok( !
status,
"NtWow64AllocateVirtualMemory64 failed %lx\n",
status );
2518 "NtWow64WriteVirtualMemory64 failed %lx\n",
status );
2522 ptr = 0x9876543210ull;
2527 "NtWow64AllocateVirtualMemory64 failed %lx\n",
status );
2534 "NtWow64AllocateVirtualMemory64 failed %lx\n",
status );
2536 else win_skip(
"NtWow64AllocateVirtualMemory64 not supported\n" );
2538 if (pNtWow64GetNativeSystemInformation)
2546 ok(
len ==
sizeof(
sbi),
"wrong length %ld\n",
len );
2548 memset( &sbi2, 0xcc,
sizeof(sbi2) );
2551 ok(
len ==
sizeof(sbi2),
"wrong length %ld\n",
len );
2553 ok(
sbi.HighestUserAddress == (
void *)0x7ffeffff,
"wrong limit %p\n",
sbi.HighestUserAddress);
2555 ok( sbi2.HighestUserAddress == (
is_wow64 ? (
void *)0xfffeffff : (
void *)0x7ffeffff),
2556 "wrong limit %p\n",
sbi.HighestUserAddress);
2558 memset( &sbi3, 0xcc,
sizeof(sbi3) );
2561 ok(
len ==
sizeof(sbi3),
"wrong length %ld\n",
len );
2563 "info is different\n" );
2565 memset( &sbi3, 0xcc,
sizeof(sbi3) );
2568 ok(
len ==
sizeof(sbi3),
"wrong length %ld\n",
len );
2570 "info is different\n" );
2572 for (
i = 0;
i < 256;
i++)
2599 else win_skip(
"NtWow64GetNativeSystemInformation not supported\n" );
2601 if (pNtWow64IsProcessorFeaturePresent)
2605 for (
i = 0;
i < 64;
i++)
2607 "mismatch %lu wow64 returned %lx\n",
i, pNtWow64IsProcessorFeaturePresent(
i ));
2619 else win_skip(
"NtWow64IsProcessorFeaturePresent not supported\n" );
2621 if (pNtWow64QueryInformationProcess64)
2636 ok( !
status,
"NtQueryInformationProcess returned 0x%08lx\n",
status );
2639 ok( !
status,
"NtWow64QueryInformationProcess64 returned 0x%08lx\n",
status );
2649 "expected 0x%lx got 0x%I64x\n", expected_peb, pbi64.
PebBaseAddress );
2665 else win_skip(
"NtWow64QueryInformationProcess64 not supported\n" );
2682#define CHECK_FUNC(val,func) \
2683 ok( (val) == (ULONG_PTR)GetProcAddress( ntdll, func ), \
2684 "got %p for %s %p\n", (void *)(ULONG_PTR)(val), func, GetProcAddress( ntdll, func ))
2701 size = 13 *
sizeof(*init_block);
2718 size = 17 *
sizeof(*init_block);
2733 size = 15 *
sizeof(*init_block);
2750 size = 15 *
sizeof(*init_block);
2759 size = 12 *
sizeof(*init_block);
2766 CHECK_FUNC( block64[3],
"LdrInitializeThunk" );
2767 CHECK_FUNC( block64[4],
"KiUserExceptionDispatcher" );
2768 CHECK_FUNC( block64[5],
"KiUserApcDispatcher" );
2769 CHECK_FUNC( block64[6],
"KiUserCallbackDispatcher" );
2770 CHECK_FUNC( block64[7],
"RtlUserThreadStart" );
2771 CHECK_FUNC( block64[8],
"RtlpQueryProcessDebugInformationRemote" );
2775 CHECK_FUNC( block64[10],
"LdrSystemDllInitBlock" );
2776 CHECK_FUNC( block64[11],
"RtlpFreezeTimeBias" );
2777 size = 12 *
sizeof(*block64);
2791 ok( !
status,
"NtWow64ReadVirtualMemory64 failed %lx\n",
status );
2808 skip(
"xtajit.dll not loaded\n" );
2813 skip(
"xtajit.dll loaded above 4G\n" );
2817 for (
i = 0x400;
i < 0x800;
i +=
sizeof(
ULONG))
2823 if (
info->CrossProcessWorkList >> 32)
2824 skip(
"cross-process work list above 4G (%I64x)\n",
info->CrossProcessWorkList );
2830 skip(
"WOW64INFO not found\n" );
2851 static const char pipe_name[] =
"\\\\.\\pipe\\wow64iosbnamedpipe";
2854 ULONG64 read_func, flush_func;
2881 4, 1024, 1024, 1000,
NULL );
2889 memset( &iosb32, 0x55,
sizeof(iosb32) );
2891 iosb64.Information = 0xdeadbeef;
2896 ok( iosb32.
Status == 0x55555555,
"status changed to %lx\n", iosb32.
Status );
2897 ok( iosb64.Pointer ==
PtrToUlong(&iosb32),
"pointer changed to %I64x\n", iosb64.Pointer );
2898 ok( iosb64.Information == 0xdeadbeef,
"info changed to %Ix\n", (
ULONG_PTR)iosb64.Information );
2905 ok( iosb64.Pointer ==
PtrToUlong(&iosb32),
"pointer changed to %I64x\n", iosb64.Pointer );
2906 ok( iosb64.Information == 0xdeadbeef,
"info changed to %Ix\n", (
ULONG_PTR)iosb64.Information );
2911 memset( &iosb32, 0x55,
sizeof(iosb32) );
2913 iosb64.Information = 0xdeadbeef;
2922 ok( iosb64.Pointer ==
PtrToUlong(&iosb32),
"pointer changed to %I64x\n", iosb64.Pointer );
2923 ok( iosb64.Information == 0xdeadbeef,
"info changed to %Ix\n", (
ULONG_PTR)iosb64.Information );
2929 memset( &iosb32, 0x55,
sizeof(iosb32) );
2931 iosb64.Information = 0xdeadbeef;
2936 ok( iosb32.
Status == 0x55555555,
"status changed to %lx\n", iosb32.
Status );
2938 ok( iosb64.Pointer ==
STATUS_SUCCESS,
"pointer changed to %I64x\n", iosb64.Pointer );
2939 ok( iosb64.Information == 0,
"info changed to %Ix\n", (
ULONG_PTR)iosb64.Information );
2948 4, 1024, 1024, 1000,
NULL );
2959 memset( &iosb32, 0x55,
sizeof(iosb32) );
2961 iosb64.Information = 0xdeadbeef;
2966 ok( iosb32.
Status == 0x55555555,
"status changed to %lx\n", iosb32.
Status );
2968 ok( iosb64.Pointer ==
STATUS_SUCCESS,
"pointer changed to %I64x\n", iosb64.Pointer );
2969 ok( iosb64.Information ==
sizeof(
"data"),
"info changed to %Ix\n", (
ULONG_PTR)iosb64.Information );
2976 memset( &iosb32, 0x55,
sizeof(iosb32) );
2978 iosb64.Information = 0xdeadbeef;
2985 ok( iosb32.
Status == 0x55555555,
"status changed to %lx\n", iosb32.
Status );
2987 ok( iosb64.Pointer ==
STATUS_SUCCESS,
"pointer changed to %I64x\n", iosb64.Pointer );
2988 ok( iosb64.Information ==
sizeof(
"data"),
"info changed to %Ix\n", (
ULONG_PTR)iosb64.Information );
2997 memset( &iosb32, 0x55,
sizeof(iosb32) );
2999 iosb64.Information = 0xdeadbeef;
3004 ok( iosb32.
Status == 0x55555555,
"status changed to %lx\n", iosb32.
Status );
3006 ok( iosb64.Pointer ==
STATUS_SUCCESS,
"pointer changed to %I64x\n", iosb64.Pointer );
3007 ok( iosb64.Information == 0,
"info changed to %Ix\n", (
ULONG_PTR)iosb64.Information );
3019 ok( syscall !=
NULL,
"syscall %s not found\n",
name );
3020 if (syscall[0] == 0xb8)
3021 args64[0] = *(
DWORD *)(syscall + 1);
3042 ok(
func,
"Wow64SystemServiceEx not found\n" );
3055 args32[0] = 0xdeadbeef;
3061 event = (
HANDLE)0xdeadbeef;
3072 event2 = (
HANDLE)0xdeadbeef;
3082 event2 = (
HANDLE)0xdeadbeef;
3095 if (pNtWow64ReadVirtualMemory64)
3098 PEB64 peb64, peb64_2;
3106 ok( !
status,
"NtWow64ReadVirtualMemory64 failed %lx\n",
status );
3108 ok( !
status,
"NtWow64ReadVirtualMemory64 failed %lx\n",
status );
3110 ok( !
memcmp( &peb64, &peb64_2,
res ),
"data is different\n" );
3141 else win_skip(
"RtlWow64GetCpuAreaInfo not supported\n" );
3156 ok(
ptr,
"KiUserExceptionDispatcher not found\n" );
3158 if (pNtWow64ReadVirtualMemory64)
3164 ok( !
status,
"NtWow64ReadVirtualMemory64 failed %lx\n",
status );
3168 "wrong opcodes %02x %02x %02x %02x\n",
code[0],
code[1],
code[2],
code[3] );
3169 hook_ptr =
ptr + 8 + *(
int *)(
code + 4);
3171 ok( !
status,
"NtWow64ReadVirtualMemory64 failed %lx\n",
status );
3188 trace(
"restarting test as arm64ec\n" );
3195 ok(
ret == 0,
"wait failed %lx\n",
ret );
3208#if !defined (__REACTOS__) || (DLL_EXPORT_VERSION >= 0x600)
3216 test_cross_process_work_list();
NTSTATUS NTAPI NtUnmapViewOfSection(IN HANDLE ProcessHandle, IN PVOID BaseAddress)
NTSTATUS NTAPI NtMapViewOfSection(IN HANDLE SectionHandle, IN HANDLE ProcessHandle, IN OUT PVOID *BaseAddress, IN ULONG_PTR ZeroBits, IN SIZE_T CommitSize, IN OUT PLARGE_INTEGER SectionOffset OPTIONAL, IN OUT PSIZE_T ViewSize, IN SECTION_INHERIT InheritDisposition, IN ULONG AllocationType, IN ULONG Protect)
static struct _test_info results[8]
COMPILER_DEPENDENT_INT64 INT64
@ ProcessBasicInformation
@ ProcessWow64Information
#define STATUS_INVALID_HANDLE
#define STATUS_NOT_SUPPORTED
#define STATUS_NOT_IMPLEMENTED
NTSTATUS WINAPI NtSuspendProcess(HANDLE handle)
static CHAR Desktop[MAX_PATH]
#define NT_SUCCESS(StatCode)
VOID NTAPI KiUserExceptionDispatcher(PEXCEPTION_RECORD ExceptionRecord, PCONTEXT Context)
#define IMAGE_DIRECTORY_ENTRY_EXPORT
#define ReadProcessMemory(a, b, c, d, e)
#define IMAGE_FILE_MACHINE_ARMNT
#define GetProcAddress(x, y)
#define INVALID_HANDLE_VALUE
@ ThreadQuerySetWin32StartAddress
#define CreateFileA(a, b, c, d, e, f, g)
static __inline const char * debugstr_an(const char *s, int n)
static __inline const char * wine_dbgstr_longlong(ULONGLONG ll)
#define GetCurrentProcess()
#define IMAGE_FILE_MACHINE_ARM64
static const WCHAR *const ext[]
BOOL WINAPI DebugActiveProcess(IN DWORD dwProcessId)
BOOL WINAPI WriteFile(IN HANDLE hFile, IN LPCVOID lpBuffer, IN DWORD nNumberOfBytesToWrite OPTIONAL, OUT LPDWORD lpNumberOfBytesWritten, IN LPOVERLAPPED lpOverlapped OPTIONAL)
BOOL WINAPI DuplicateHandle(IN HANDLE hSourceProcessHandle, IN HANDLE hSourceHandle, IN HANDLE hTargetProcessHandle, OUT LPHANDLE lpTargetHandle, IN DWORD dwDesiredAccess, IN BOOL bInheritHandle, IN DWORD dwOptions)
DWORD WINAPI GetModuleFileNameW(HINSTANCE hModule, LPWSTR lpFilename, DWORD nSize)
HMODULE WINAPI GetModuleHandleW(LPCWSTR lpModuleName)
HMODULE WINAPI DECLSPEC_HOTPATCH GetModuleHandleA(LPCSTR lpModuleName)
BOOL NTAPI WriteProcessMemory(IN HANDLE hProcess, IN LPVOID lpBaseAddress, IN LPCVOID lpBuffer, IN SIZE_T nSize, OUT SIZE_T *lpNumberOfBytesWritten)
BOOL WINAPI FlushInstructionCache(IN HANDLE hProcess, IN LPCVOID lpBaseAddress, IN SIZE_T nSize)
BOOL WINAPI GetExitCodeProcess(IN HANDLE hProcess, IN LPDWORD lpExitCode)
BOOL WINAPI TerminateProcess(IN HANDLE hProcess, IN UINT uExitCode)
HANDLE WINAPI OpenProcess(IN DWORD dwDesiredAccess, IN BOOL bInheritHandle, IN DWORD dwProcessId)
BOOL WINAPI IsProcessorFeaturePresent(IN DWORD ProcessorFeature)
DWORD WINAPI QueueUserAPC(IN PAPCFUNC pfnAPC, IN HANDLE hThread, IN ULONG_PTR dwData)
DWORD WINAPI ResumeThread(IN HANDLE hThread)
HANDLE WINAPI DECLSPEC_HOTPATCH CreateThread(IN LPSECURITY_ATTRIBUTES lpThreadAttributes, IN DWORD dwStackSize, IN LPTHREAD_START_ROUTINE lpStartAddress, IN LPVOID lpParameter, IN DWORD dwCreationFlags, OUT LPDWORD lpThreadId)
BOOL WINAPI GetExitCodeThread(IN HANDLE hThread, OUT LPDWORD lpExitCode)
BOOL WINAPI GetThreadContext(IN HANDLE hThread, OUT LPCONTEXT lpContext)
BOOL WINAPI Wow64RevertWow64FsRedirection(IN PVOID OldValue)
BOOL WINAPI Wow64DisableWow64FsRedirection(IN PVOID *OldValue)
BOOL WINAPI DECLSPEC_HOTPATCH CreateProcessA(const char *app_name, char *cmd_line, SECURITY_ATTRIBUTES *process_attr, SECURITY_ATTRIBUTES *thread_attr, BOOL inherit, DWORD flags, void *env, const char *cur_dir, STARTUPINFOA *startup_info, PROCESS_INFORMATION *info)
void WINAPI DECLSPEC_HOTPATCH DeleteProcThreadAttributeList(struct _PROC_THREAD_ATTRIBUTE_LIST *list)
BOOL WINAPI DECLSPEC_HOTPATCH UpdateProcThreadAttribute(struct _PROC_THREAD_ATTRIBUTE_LIST *list, DWORD flags, DWORD_PTR attr, void *value, SIZE_T size, void *prev_ret, SIZE_T *size_ret)
BOOL WINAPI DECLSPEC_HOTPATCH InitializeProcThreadAttributeList(struct _PROC_THREAD_ATTRIBUTE_LIST *list, DWORD count, DWORD flags, SIZE_T *size)
static const struct _KUSER_SHARED_DATA * user_shared_data
_ACRTIMP int __cdecl wcscmp(const wchar_t *, const wchar_t *)
_ACRTIMP int __cdecl memcmp(const void *, const void *, size_t)
_ACRTIMP __int64 __cdecl llabs(__int64)
_ACRTIMP int __cdecl strcmp(const char *, const char *)
int align(int length, int align)
HANDLE NTAPI CreateFileMappingA(IN HANDLE hFile, IN LPSECURITY_ATTRIBUTES lpFileMappingAttributes, IN DWORD flProtect, IN DWORD dwMaximumSizeHigh, IN DWORD dwMaximumSizeLow, IN LPCSTR lpName)
enum _SYSTEM_INFORMATION_CLASS SYSTEM_INFORMATION_CLASS
#define STATUS_ACCESS_VIOLATION
_Must_inspect_result_ _In_ PLARGE_INTEGER _In_ PLARGE_INTEGER _In_ ULONG _In_ PFILE_OBJECT _In_ PVOID Process
GLuint GLuint GLsizei count
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
GLuint GLuint GLuint GLuint arg1
GLuint GLuint GLuint GLuint GLuint GLuint GLuint GLuint GLuint GLuint arg3
GLuint GLuint GLuint GLuint GLuint GLuint GLuint arg2
GLenum const GLfloat * params
GLenum const GLvoid * addr
GLenum GLenum GLenum GLenum mapping
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean flag
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint GLint GLint j
#define todo_wine_if(is_todo)
void __cdecl void __cdecl void __cdecl void __cdecl void __cdecl void winetest_pop_context(void)
void __cdecl void __cdecl void __cdecl void __cdecl void __cdecl winetest_push_context(const char *fmt,...) __WINE_PRINTF_ATTR(1
#define memcpy(s1, s2, n)
struct task_struct * current
#define FILE_FLAG_OVERLAPPED
#define FILE_FLAG_NO_BUFFERING
static struct test_info tests[]
#define expect2(expected1, expected2, got1, got2)
static PROCESS_INFORMATION pi
static const char machine[]
static ULONG CONTEXT_EX ** context_ex
static void * pKiUserExceptionDispatcher
static HANDLE PIO_APC_ROUTINE PVOID PIO_STATUS_BLOCK io
#define InitializeObjectAttributes(p, n, a, r, s)
static SYSTEM_BASIC_INFORMATION sbi
static void test_notifications(void)
INTERNETFEATURELIST feature
@ SystemSupportedProcessorArchitectures
@ SystemEmulationBasicInformation
@ SystemEmulationProcessorInformation
@ SystemNativeBasicInformation
#define PROCESSOR_ARCHITECTURE_AMD64
HANDLE WINAPI CreateNamedPipeA(LPCSTR lpName, DWORD dwOpenMode, DWORD dwPipeMode, DWORD nMaxInstances, DWORD nOutBufferSize, DWORD nInBufferSize, DWORD nDefaultTimeOut, LPSECURITY_ATTRIBUTES lpSecurityAttributes)
#define PAGE_EXECUTE_READ
NTSTATUS NtTerminateThread(IN HANDLE ThreadHandle OPTIONAL, IN NTSTATUS ExitStatus)
#define PROCESS_ALL_ACCESS
NTSYSAPI VOID NTAPI RtlInitUnicodeString(PUNICODE_STRING DestinationString, PCWSTR SourceString)
NTSTATUS NTAPI NtTerminateProcess(HANDLE ProcessHandle, LONG ExitStatus)
NTSTATUS NTAPI NtClose(IN HANDLE Handle)
#define PAGE_EXECUTE_WRITECOPY
#define PAGE_EXECUTE_READWRITE
#define IMAGE_FILE_MACHINE_THUMB
#define IMAGE_FILE_MACHINE_ARM
#define IMAGE_FILE_MACHINE_AMD64
NTSTATUS NTAPI NtSetEvent(IN HANDLE EventHandle, OUT PLONG PreviousState OPTIONAL)
PVOID NTAPI RtlFindExportedRoutineByName(_In_ PVOID ImageBase, _In_ PCSTR ExportName)
Finds the address of a given named exported routine in a loaded image. Note that this function does n...
NTSTATUS NTAPI NtFreeVirtualMemory(IN HANDLE ProcessHandle, IN PVOID *UBaseAddress, IN PSIZE_T URegionSize, IN ULONG FreeType)
NTSTATUS NTAPI NtWriteVirtualMemory(IN HANDLE ProcessHandle, IN PVOID BaseAddress, IN PVOID Buffer, IN SIZE_T NumberOfBytesToWrite, OUT PSIZE_T NumberOfBytesWritten OPTIONAL)
NTSTATUS NTAPI NtProtectVirtualMemory(IN HANDLE ProcessHandle, IN OUT PVOID *UnsafeBaseAddress, IN OUT SIZE_T *UnsafeNumberOfBytesToProtect, IN ULONG NewAccessProtection, OUT PULONG UnsafeOldAccessProtection)
NTSTATUS NTAPI NtAllocateVirtualMemory(IN HANDLE ProcessHandle, IN OUT PVOID *UBaseAddress, IN ULONG_PTR ZeroBits, IN OUT PSIZE_T URegionSize, IN ULONG AllocationType, IN ULONG Protect)
NTSTATUS NTAPI NtFlushInstructionCache(_In_ HANDLE ProcessHandle, _In_opt_ PVOID BaseAddress, _In_ SIZE_T FlushSize)
NTSTATUS NTAPI NtQueryInformationThread(_In_ HANDLE ThreadHandle, _In_ THREADINFOCLASS ThreadInformationClass, _Out_writes_bytes_to_opt_(ThreadInformationLength, *ReturnLength) PVOID ThreadInformation, _In_ ULONG ThreadInformationLength, _Out_opt_ PULONG ReturnLength)
NTSTATUS NTAPI NtQueryInformationProcess(_In_ HANDLE ProcessHandle, _In_ PROCESSINFOCLASS ProcessInformationClass, _Out_writes_bytes_to_opt_(ProcessInformationLength, *ReturnLength) PVOID ProcessInformation, _In_ ULONG ProcessInformationLength, _Out_opt_ PULONG ReturnLength)
#define STATUS_IMAGE_MACHINE_TYPE_MISMATCH
#define STATUS_MEMORY_NOT_ALLOCATED
#define STATUS_NOT_MAPPED_VIEW
#define STATUS_OBJECT_NAME_EXISTS
#define STATUS_INVALID_PARAMETER_4
#define STATUS_CONFLICTING_ADDRESSES
#define STATUS_INVALID_PAGE_PROTECTION
#define STATUS_INVALID_INFO_CLASS
#define STATUS_INVALID_PARAMETER_3
#define STATUS_IMAGE_NOT_AT_BASE
#define STATUS_PARTIAL_COPY
#define IMAGE_FILE_MACHINE_I386
#define IMAGE_FILE_MACHINE_R3000
__asm__(".p2align 4, 0x90\n" ".seh_proc __seh2_global_filter_func\n" "__seh2_global_filter_func:\n" "\tsub %rbp, %rax\n" "\tpush %rbp\n" "\t.seh_pushreg %rbp\n" "\tpush %rbx\n" "\t.seh_pushreg %rbx\n" "\tpush %rdi\n" "\t.seh_pushreg %rdi\n" "\tpush %rsi\n" "\t.seh_pushreg %rsi\n" "\tpush %r12\n" "\t.seh_pushreg %r12\n" "\tpush %r13\n" "\t.seh_pushreg %r13\n" "\tpush %r14\n" "\t.seh_pushreg %r14\n" "\tpush %r15\n" "\t.seh_pushreg %r15\n" "\tsub $40, %rsp\n" "\t.seh_stackalloc 40\n" "\t.seh_endprologue\n" "\tsub %rax, %rdx\n" "\tmov %rdx, %rbp\n" "\tjmp *%r8\n" "__seh2_global_filter_func_exit:\n" "\t.p2align 4\n" "\tadd $40, %rsp\n" "\tpop %r15\n" "\tpop %r14\n" "\tpop %r13\n" "\tpop %r12\n" "\tpop %rsi\n" "\tpop %rdi\n" "\tpop %rbx\n" "\tpop %rbp\n" "\tret\n" "\t.seh_endproc")
static unsigned __int64 next
#define offsetof(TYPE, MEMBER)
int winetest_get_mainargs(char ***pargv)
static struct __wine_debug_functions funcs
#define STATUS_BUFFER_TOO_SMALL
NTSTATUS NTAPI NtReadFile(HANDLE FileHandle, HANDLE Event, PIO_APC_ROUTINE ApcRoutine, PVOID ApcContext, PIO_STATUS_BLOCK IoStatusBlock, PVOID Buffer, ULONG Length, PLARGE_INTEGER ByteOffset, PULONG Key)
NTSYSAPI NTSTATUS NTAPI NtQuerySystemInformation(IN SYSTEM_INFORMATION_CLASS SystemInfoClass, OUT PVOID SystemInfoBuffer, IN ULONG SystemInfoBufferSize, OUT PULONG BytesReturned OPTIONAL)
BOOLEAN InSyscallCallback
DWORD AddressOfNameOrdinals
struct _EXCEPTION_REGISTRATION_RECORD * ExceptionList
ULONG64 UnicodeCaseTableData
LIST_ENTRY64 InLoadOrderModuleList
PRTL_USER_PROCESS_PARAMETERS ProcessParameters
PVOID UnicodeCaseTableData
UNICODE_STRING64 StaticUnicodeString
WCHAR StaticUnicodeBuffer[261]
USHORT EmulatedMachineType
ULONGLONG CrossProcessWorkList
DWORD WINAPI SleepEx(IN DWORD dwMilliseconds, IN BOOL bAlertable)
DWORD WINAPI WaitForSingleObject(IN HANDLE hHandle, IN DWORD dwMilliseconds)
VOID WINAPI DECLSPEC_HOTPATCH Sleep(IN DWORD dwMilliseconds)
HANDLE WINAPI DECLSPEC_HOTPATCH CreateEventA(IN LPSECURITY_ATTRIBUTES lpEventAttributes OPTIONAL, IN BOOL bManualReset, IN BOOL bInitialState, IN LPCSTR lpName OPTIONAL)
void init_block(deflate_state *s)
#define STATUS_INVALID_PARAMETER
#define STATUS_UNSUCCESSFUL
#define STATUS_INFO_LENGTH_MISMATCH
static rfbScreenInfoPtr server
_In_ WDFREQUEST _In_ NTSTATUS _In_ ULONG_PTR Information
LPVOID NTAPI VirtualAlloc(IN LPVOID lpAddress, IN SIZE_T dwSize, IN DWORD flAllocationType, IN DWORD flProtect)
BOOL NTAPI VirtualProtect(IN LPVOID lpAddress, IN SIZE_T dwSize, IN DWORD flNewProtect, OUT PDWORD lpflOldProtect)
LPVOID NTAPI VirtualAllocEx(IN HANDLE hProcess, IN LPVOID lpAddress, IN SIZE_T dwSize, IN DWORD flAllocationType, IN DWORD flProtect)
BOOL NTAPI VirtualProtectEx(IN HANDLE hProcess, IN LPVOID lpAddress, IN SIZE_T dwSize, IN DWORD flNewProtect, OUT PDWORD lpflOldProtect)
BOOL NTAPI VirtualFree(IN LPVOID lpAddress, IN SIZE_T dwSize, IN DWORD dwFreeType)
BOOL NTAPI VirtualFreeEx(IN HANDLE hProcess, IN LPVOID lpAddress, IN SIZE_T dwSize, IN DWORD dwFreeType)
DWORD WINAPI GetLastError(void)
HANDLE WINAPI GetCurrentThread(void)
#define PIPE_ACCESS_DUPLEX
DWORD WINAPI GetCurrentThreadId(void)
DWORD WINAPI GetCurrentProcessId(void)
#define PIPE_READMODE_MESSAGE
#define PROC_THREAD_ATTRIBUTE_MACHINE_TYPE
#define EXTENDED_STARTUPINFO_PRESENT
#define PIPE_TYPE_MESSAGE
#define WOW64_TLS_CPURESERVED
NTSYSAPI NTSTATUS WINAPI RtlWow64GetProcessMachines(HANDLE, USHORT *, USHORT *)
NTSYSAPI NTSTATUS WINAPI NtQuerySystemInformationEx(SYSTEM_INFORMATION_CLASS, void *, ULONG, void *, ULONG, ULONG *)
NTSYSAPI NTSTATUS WINAPI NtWow64AllocateVirtualMemory64(HANDLE, ULONG64 *, ULONG64, ULONG64 *, ULONG, ULONG)
@ CrossProcessPreVirtualProtect
@ CrossProcessFlushCacheHeavy
@ CrossProcessPreVirtualFree
@ CrossProcessPostVirtualFree
@ CrossProcessPreVirtualAlloc
@ CrossProcessPostVirtualAlloc
@ CrossProcessPostVirtualProtect
@ CrossProcessMemoryWrite
#define CROSS_PROCESS_LIST_ENTRY(list, pos)
NTSYSAPI NTSTATUS WINAPI NtWow64WriteVirtualMemory64(HANDLE, ULONG64, const void *, ULONG64, ULONG64 *)
NTSYSAPI NTSTATUS WINAPI NtMapViewOfSectionEx(HANDLE, HANDLE, PVOID *, const LARGE_INTEGER *, SIZE_T *, ULONG, ULONG, MEM_EXTENDED_PARAMETER *, ULONG)
NTSYSAPI USHORT WINAPI RtlWow64GetCurrentMachine(void)
NTSYSAPI NTSTATUS WINAPI RtlGetNativeSystemInformation(SYSTEM_INFORMATION_CLASS, void *, ULONG, ULONG *)
NTSYSAPI NTSTATUS WINAPI RtlWow64GetSharedInfoProcess(HANDLE, BOOLEAN *, WOW64INFO *)
#define WOW64_CPUFLAGS_SOFTWARE
@ ProcessImageInformation
#define CROSS_PROCESS_LIST_FLUSH
NTSYSAPI NTSTATUS WINAPI NtWow64ReadVirtualMemory64(HANDLE, ULONG64, void *, ULONG64, ULONG64 *)
#define WOW64_CPUFLAGS_MSFT64
NTSYSAPI NTSTATUS WINAPI NtWow64GetNativeSystemInformation(SYSTEM_INFORMATION_CLASS, void *, ULONG, ULONG *)
NTSYSAPI NTSTATUS WINAPI NtWow64IsProcessorFeaturePresent(UINT)
NTSYSAPI NTSTATUS WINAPI RtlWow64IsWowGuestMachineSupported(USHORT, BOOLEAN *)
NTSYSAPI NTSTATUS WINAPI NtWow64QueryInformationProcess64(HANDLE, PROCESSINFOCLASS, void *, ULONG, ULONG *)
#define CONTEXT_I386_SEGMENTS
#define CONTEXT_I386_CONTROL
#define PROCESSOR_ARCHITECTURE_ARM64
@ MemExtendedParameterImageMachine
DWORD WINAPI WaitForInputIdle(_In_ HANDLE, _In_ DWORD)
static CROSS_PROCESS_WORK_ENTRY * pop_from_free_list(CROSS_PROCESS_WORK_HDR *list)
static BYTE old_code[sizeof(hook_code)]
static NTSTATUS invoke_syscall(const char *name, ULONG args32[])
static ULONG64 ntdll_module
static ULONG64 wow64base_module
static void test_init_block(void)
static BOOL create_process_machine(char *cmdline, DWORD flags, USHORT machine, PROCESS_INFORMATION *pi)
static NTSTATUS call_func64(ULONG64 func64, int nb_args, ULONG64 *args)
static void test_modules(void)
static BOOL is_machine_32bit(USHORT machine)
static void test_syscalls(void)
static void test_arm64ec(void)
static void test_memory_notifications(void)
static void test_iosb(void)
static DWORD WINAPI iosb_delayed_write_thread(void *arg)
static WORD WORD *static BOOLEAN WOW64INFO *static WOW64_CONTEXT *static BOOLEAN *static HANDLE
static void test_exception_dispatcher(void)
static void test_query_architectures(void)
static ULONG64 wow64cpu_module
static void check_module(ULONG64 base, const WCHAR *name)
static ULONG64 xtajit_module
#define GET_ENTRY(info, size, ret)
static CROSS_PROCESS_WORK_ENTRY * expect_cross_work_entry_(CROSS_PROCESS_WORK_LIST *list, CROSS_PROCESS_WORK_ENTRY *entry, UINT id, void *addr, SIZE_T size, UINT arg0, UINT arg1, UINT arg2, UINT arg3, int line)
static ULONG64 get_proc_address64(ULONG64 module, const char *name)
static const BYTE call_func64_code[]
static void test_cross_process_notifications(HANDLE process, ULONG_PTR section, ULONG_PTR ptr)
static void CALLBACK dummy_apc(ULONG_PTR arg)
static void test_process_architecture(HANDLE process, USHORT expect_machine, USHORT expect_native)
static USHORT current_machine
static void request_cross_process_flush(CROSS_PROCESS_WORK_HDR *list)
static void push_onto_free_list(CROSS_PROCESS_WORK_HDR *list, CROSS_PROCESS_WORK_ENTRY *entry)
static void test_peb_teb(void)
static void ULONG *static void void ULONG *static void ULONG *static HANDLE void **static void *WINAPI * pRtlFindExportedRoutineByName(HMODULE, const char *)
static ULONG64 wow64_module
static USHORT native_machine
static void test_wow64_shared_info(HANDLE process)
static void add_work_item(CROSS_PROCESS_WORK_LIST *list, UINT id, ULONG64 addr, ULONG64 size, UINT arg0, UINT arg1, UINT arg2, UINT arg3)
#define CHECK_FUNC(val, func)
static void test_nt_wow64(void)
#define CHECK_MODULE(mod)
#define expect_cross_work_entry(list, entry, id, addr, size, arg0, arg1, arg2, arg3)
static void enum_modules64(void(*func)(ULONG64, const WCHAR *))
static void expect_notifications_(ULONG64 *results, UINT count, const struct expected_notification *expect, BOOL syscall, int line)
static void * hook_notification_function(HMODULE module, const char *win32_name, const char *win64_name)
static ULONG64 wow64con_module
static void test_cpu_area(void)
static ULONG64 main_module
static const DWORD log_params_code[]
static void test_image_mappings(void)
#define expect_notifications(results, count, expect, syscall)
static ULONG64 wow64win_module
static void push_onto_work_list(CROSS_PROCESS_WORK_HDR *list, CROSS_PROCESS_WORK_ENTRY *entry)
static void reset_results(ULONG64 *results)
static void process_work_items(void)
static CROSS_PROCESS_WORK_ENTRY * pop_from_work_list(CROSS_PROCESS_WORK_HDR *list)
static void test_amd64_shared_info(HANDLE process)
static void ULONG *static void ULONG64 *static const void ULONG64 *static BOOL is_win64
static void test_selectors(void)
static void test_process_machine(HANDLE process, HANDLE thread, USHORT expect_machine, USHORT expect_image)
#define PF_SSE4_2_INSTRUCTIONS_AVAILABLE
#define PF_MMX_INSTRUCTIONS_AVAILABLE
#define PF_XMMI64_INSTRUCTIONS_AVAILABLE
#define PF_ARM_V8_INSTRUCTIONS_AVAILABLE
#define PF_XMMI_INSTRUCTIONS_AVAILABLE
#define PF_SSSE3_INSTRUCTIONS_AVAILABLE
#define PF_COMPARE_EXCHANGE_DOUBLE
#define PF_FASTFAIL_AVAILABLE
#define PF_SSE3_INSTRUCTIONS_AVAILABLE
#define PF_RDTSC_INSTRUCTION_AVAILABLE
#define PF_COMPARE_EXCHANGE128
#define PF_SSE4_1_INSTRUCTIONS_AVAILABLE
#define PF_RDTSCP_INSTRUCTION_AVAILABLE
#define DUPLICATE_SAME_ACCESS