mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-04 19:58:08 +00:00
wow64: Don't add MEM_RESERVE for invalid flags combinations.
This commit is contained in:
parent
d76f5b4ab9
commit
f41ac64a73
|
@ -407,6 +407,20 @@ static void test_cross_process_notifications( HANDLE process, void *ptr )
|
|||
}
|
||||
ok( !entry, "not at end of list\n" );
|
||||
|
||||
addr = NULL;
|
||||
size = 0x321;
|
||||
status = NtAllocateVirtualMemory( process, &addr, 0, &size, 0, PAGE_EXECUTE_READ );
|
||||
ok( status == STATUS_INVALID_PARAMETER, "NtAllocateVirtualMemory failed %lx\n", status );
|
||||
entry = pop_from_work_list( &list->work_list );
|
||||
if (current_machine != IMAGE_FILE_MACHINE_ARM64)
|
||||
{
|
||||
entry = expect_cross_work_entry( list, entry, CrossProcessPreVirtualAlloc, addr, 0x321,
|
||||
0, PAGE_EXECUTE_READ, 0, 0xcccccccc );
|
||||
entry = expect_cross_work_entry( list, entry, CrossProcessPostVirtualAlloc, addr, 0x321,
|
||||
0, PAGE_EXECUTE_READ, status, 0xcccccccc );
|
||||
}
|
||||
ok( !entry, "not at end of list\n" );
|
||||
|
||||
addr = NULL;
|
||||
size = 0x4321;
|
||||
status = NtAllocateVirtualMemory( process, &addr, 0, &size, MEM_RESERVE, PAGE_EXECUTE_READWRITE );
|
||||
|
|
|
@ -153,7 +153,7 @@ NTSTATUS WINAPI wow64_NtAllocateVirtualMemory( UINT *args )
|
|||
BOOL is_current = RtlIsCurrentProcess( process );
|
||||
NTSTATUS status;
|
||||
|
||||
if (!addr) type |= MEM_RESERVE;
|
||||
if (!addr && (type & MEM_COMMIT)) type |= MEM_RESERVE;
|
||||
|
||||
if (!is_current)
|
||||
send_cross_process_notification( process, CrossProcessPreVirtualAlloc,
|
||||
|
|
Loading…
Reference in a new issue