Patch attached. This is my first contribution to wine, and I have checked through the wiki for what I should do, and have attempted to fulfill all criteria.
Commit message from patch:
Before, Wine would (very incorrectly) use the argument to specify how many *low-order* address bits should be 0, when in fact, in Windows it's used to specify how many *high-order* address bits should be zero!
The functionality is taken from the documentation for NtAllocateVirtualMemory: The number of high-order address bits that must be zero in the base address of the section view. Used only when the operating system determines where to allocate the region, as when BaseAddress is NULL. Note that when ZeroBits is larger than 32, it becomes a bitmask.
and NtMapViewOfSection: Specifies the number of high-order address bits that must be zero in the base address of the section view. The value of this parameter must be less than 21 and is used only if BaseAddress is NULL—in other words, when the caller allows the system to determine where to allocate the view.
and from documentation for LuaJIT's allocator: /* Number of top bits of the lower 32 bits of an address that must be zero. ** Apparently 0 gives us full 64 bit addresses and 1 gives us the lower 2GB. */ #define NTAVM_ZEROBITS 1
Thus the interpretation done here is: If zero_bits is 0, use the full address space. If zero_bits is over 20, err (12-bit pointers are the smallest allowed). Otherwise only the lower (32-zero_bits) bits should be used.
A lot of internal Wine functionality unfortunately depends on the old Wine behavior, but thankfully, all of the uses seem to be redundant, as no function requested an alignment higher than the minimum! It may however be that I have not fully understood the code, as it is not always clear what alignment is requested.
In addition, to implement this odd Windows API, Wine somehow has to mmap an address below the maximum, which is not possible efficiently on POSIX systems compared to the Windows API. Linux has the MAP_32BIT flag, but it restricts the address space to just 1 GiB, which is not enough. For that reason, the implementation of this API in Wine uses pseudorandom heuristics ripped from the LuaJIT project (which also seems to be the only project to use this Windows API) to achieve this. It is not optimal, but it works. A proper implementation would require extensions to the mmap API.
Hi,
While running your changed tests on Windows, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=47714
Your paranoid android.
=== wxppro (32 bit report) ===
kernel32: virtual.c:455: Test failed: NtAllocateVirtualMemory returned status c00000f1 and pointer 00000000 virtual.c:462: Test failed: NtAllocateVirtualMemory returned status c0000017 and pointer 00000000 virtual.c:469: Test failed: NtAllocateVirtualMemory returned c0000017
=== w2003std (32 bit report) ===
kernel32: virtual.c:455: Test failed: NtAllocateVirtualMemory returned status c00000f1 and pointer 00000000 virtual.c:462: Test failed: NtAllocateVirtualMemory returned status c0000017 and pointer 00000000 virtual.c:469: Test failed: NtAllocateVirtualMemory returned c0000017
=== wvistau64 (32 bit report) ===
kernel32: virtual.c:462: Test failed: NtAllocateVirtualMemory returned status c0000017 and pointer 00000000 virtual.c:469: Test failed: NtAllocateVirtualMemory returned c0000017 virtual.c:2797: Test failed: NtSetInformationProcess failed with status c0000022 virtual.c:2835: Test failed: expected policy flags 0, got 3 virtual.c:2836: Test failed: expected policy permanent FALSE, got 1 virtual.c:2891: Test failed: expected no STATUS_ACCESS_VIOLATION exception, got 1 exceptions virtual.c:2905: Test failed: expected no STATUS_ACCESS_VIOLATION exception, got 1 exceptions virtual.c:2934: Test failed: expected no STATUS_ACCESS_VIOLATION exception, got 1 exceptions virtual.c:2949: Test failed: expected no STATUS_ACCESS_VIOLATION exception, got 1 exceptions virtual.c:2997: Test failed: expected no STATUS_ACCESS_VIOLATION exception, got 1 exceptions virtual.c:3012: Test failed: expected no STATUS_ACCESS_VIOLATION exception, got 1 exceptions virtual.c:3030: Test failed: expected no STATUS_ACCESS_VIOLATION exception, got 1 exceptions virtual.c:3048: Test failed: expected no STATUS_ACCESS_VIOLATION exception, got 1 exceptions virtual.c:3129: Test failed: expected no STATUS_ACCESS_VIOLATION exception, got 1 exceptions virtual.c:3153: Test failed: expected no STATUS_ACCESS_VIOLATION exception, got 1 exceptions virtual.c:3193: Test failed: expected no STATUS_ACCESS_VIOLATION exception, got 1 exceptions virtual.c:3218: Test failed: expected no STATUS_ACCESS_VIOLATION exception, got 1 exceptions virtual.c:3255: Test failed: NtSetInformationProcess failed with status c0000022 virtual.c:2797: Test failed: NtSetInformationProcess failed with status c0000022 virtual.c:2835: Test failed: expected policy flags 1, got 3 virtual.c:2836: Test failed: expected policy permanent FALSE, got 1 virtual.c:2934: Test failed: expected no STATUS_ACCESS_VIOLATION exception, got 1 exceptions virtual.c:2949: Test failed: expected no STATUS_ACCESS_VIOLATION exception, got 1 exceptions virtual.c:2997: Test failed: expected no STATUS_ACCESS_VIOLATION exception, got 1 exceptions virtual.c:3012: Test failed: expected no STATUS_ACCESS_VIOLATION exception, got 1 exceptions virtual.c:3193: Test failed: expected no STATUS_ACCESS_VIOLATION exception, got 1 exceptions virtual.c:3218: Test failed: expected no STATUS_ACCESS_VIOLATION exception, got 1 exceptions virtual.c:3255: Test failed: NtSetInformationProcess failed with status c0000022 virtual.c:2797: Test failed: NtSetInformationProcess failed with status c0000022 virtual.c:2836: Test failed: expected policy permanent FALSE, got 1 virtual.c:3255: Test failed: NtSetInformationProcess failed with status c0000022
=== wvistau64_zh_CN (32 bit report) ===
kernel32: virtual.c:455: Test failed: NtAllocateVirtualMemory returned status 00000000 and pointer 011B0000 virtual.c:462: Test failed: NtAllocateVirtualMemory returned status c0000017 and pointer 00000000 virtual.c:469: Test failed: NtAllocateVirtualMemory returned c0000017 virtual.c:2797: Test failed: NtSetInformationProcess failed with status c0000022 virtual.c:2835: Test failed: expected policy flags 0, got 3 virtual.c:2836: Test failed: expected policy permanent FALSE, got 1 virtual.c:2891: Test failed: expected no STATUS_ACCESS_VIOLATION exception, got 1 exceptions virtual.c:2905: Test failed: expected no STATUS_ACCESS_VIOLATION exception, got 1 exceptions virtual.c:2934: Test failed: expected no STATUS_ACCESS_VIOLATION exception, got 1 exceptions virtual.c:2949: Test failed: expected no STATUS_ACCESS_VIOLATION exception, got 1 exceptions virtual.c:2997: Test failed: expected no STATUS_ACCESS_VIOLATION exception, got 1 exceptions virtual.c:3012: Test failed: expected no STATUS_ACCESS_VIOLATION exception, got 1 exceptions virtual.c:3030: Test failed: expected no STATUS_ACCESS_VIOLATION exception, got 1 exceptions virtual.c:3048: Test failed: expected no STATUS_ACCESS_VIOLATION exception, got 1 exceptions virtual.c:3129: Test failed: expected no STATUS_ACCESS_VIOLATION exception, got 1 exceptions virtual.c:3153: Test failed: expected no STATUS_ACCESS_VIOLATION exception, got 1 exceptions virtual.c:3193: Test failed: expected no STATUS_ACCESS_VIOLATION exception, got 1 exceptions virtual.c:3218: Test failed: expected no STATUS_ACCESS_VIOLATION exception, got 1 exceptions virtual.c:3255: Test failed: NtSetInformationProcess failed with status c0000022 virtual.c:2797: Test failed: NtSetInformationProcess failed with status c0000022 virtual.c:2835: Test failed: expected policy flags 1, got 3 virtual.c:2836: Test failed: expected policy permanent FALSE, got 1 virtual.c:2934: Test failed: expected no STATUS_ACCESS_VIOLATION exception, got 1 exceptions virtual.c:2949: Test failed: expected no STATUS_ACCESS_VIOLATION exception, got 1 exceptions virtual.c:2997: Test failed: expected no STATUS_ACCESS_VIOLATION exception, got 1 exceptions virtual.c:3012: Test failed: expected no STATUS_ACCESS_VIOLATION exception, got 1 exceptions virtual.c:3193: Test failed: expected no STATUS_ACCESS_VIOLATION exception, got 1 exceptions virtual.c:3218: Test failed: expected no STATUS_ACCESS_VIOLATION exception, got 1 exceptions virtual.c:3255: Test failed: NtSetInformationProcess failed with status c0000022 virtual.c:2797: Test failed: NtSetInformationProcess failed with status c0000022 virtual.c:2836: Test failed: expected policy permanent FALSE, got 1 virtual.c:3255: Test failed: NtSetInformationProcess failed with status c0000022
=== wvistau64_fr (32 bit report) ===
kernel32: virtual.c:455: Test failed: NtAllocateVirtualMemory returned status 00000000 and pointer 01010000 virtual.c:462: Test failed: NtAllocateVirtualMemory returned status c0000017 and pointer 00000000 virtual.c:469: Test failed: NtAllocateVirtualMemory returned c0000017 virtual.c:2797: Test failed: NtSetInformationProcess failed with status c0000022 virtual.c:2835: Test failed: expected policy flags 0, got 3 virtual.c:2836: Test failed: expected policy permanent FALSE, got 1 virtual.c:2891: Test failed: expected no STATUS_ACCESS_VIOLATION exception, got 1 exceptions virtual.c:2905: Test failed: expected no STATUS_ACCESS_VIOLATION exception, got 1 exceptions virtual.c:2934: Test failed: expected no STATUS_ACCESS_VIOLATION exception, got 1 exceptions virtual.c:2949: Test failed: expected no STATUS_ACCESS_VIOLATION exception, got 1 exceptions virtual.c:2997: Test failed: expected no STATUS_ACCESS_VIOLATION exception, got 1 exceptions virtual.c:3012: Test failed: expected no STATUS_ACCESS_VIOLATION exception, got 1 exceptions virtual.c:3030: Test failed: expected no STATUS_ACCESS_VIOLATION exception, got 1 exceptions virtual.c:3048: Test failed: expected no STATUS_ACCESS_VIOLATION exception, got 1 exceptions virtual.c:3129: Test failed: expected no STATUS_ACCESS_VIOLATION exception, got 1 exceptions virtual.c:3153: Test failed: expected no STATUS_ACCESS_VIOLATION exception, got 1 exceptions virtual.c:3193: Test failed: expected no STATUS_ACCESS_VIOLATION exception, got 1 exceptions virtual.c:3218: Test failed: expected no STATUS_ACCESS_VIOLATION exception, got 1 exceptions virtual.c:3255: Test failed: NtSetInformationProcess failed with status c0000022 virtual.c:2797: Test failed: NtSetInformationProcess failed with status c0000022 virtual.c:2835: Test failed: expected policy flags 1, got 3 virtual.c:2836: Test failed: expected policy permanent FALSE, got 1 virtual.c:2934: Test failed: expected no STATUS_ACCESS_VIOLATION exception, got 1 exceptions virtual.c:2949: Test failed: expected no STATUS_ACCESS_VIOLATION exception, got 1 exceptions virtual.c:2997: Test failed: expected no STATUS_ACCESS_VIOLATION exception, got 1 exceptions virtual.c:3012: Test failed: expected no STATUS_ACCESS_VIOLATION exception, got 1 exceptions virtual.c:3193: Test failed: expected no STATUS_ACCESS_VIOLATION exception, got 1 exceptions virtual.c:3218: Test failed: expected no STATUS_ACCESS_VIOLATION exception, got 1 exceptions virtual.c:3255: Test failed: NtSetInformationProcess failed with status c0000022 virtual.c:2797: Test failed: NtSetInformationProcess failed with status c0000022 virtual.c:2836: Test failed: expected policy permanent FALSE, got 1 virtual.c:3255: Test failed: NtSetInformationProcess failed with status c0000022
=== wvistau64_he (32 bit report) ===
kernel32: virtual.c:462: Test failed: NtAllocateVirtualMemory returned status c0000017 and pointer 00000000 virtual.c:469: Test failed: NtAllocateVirtualMemory returned c0000017 virtual.c:2797: Test failed: NtSetInformationProcess failed with status c0000022 virtual.c:2835: Test failed: expected policy flags 0, got 3 virtual.c:2836: Test failed: expected policy permanent FALSE, got 1 virtual.c:2891: Test failed: expected no STATUS_ACCESS_VIOLATION exception, got 1 exceptions virtual.c:2905: Test failed: expected no STATUS_ACCESS_VIOLATION exception, got 1 exceptions virtual.c:2934: Test failed: expected no STATUS_ACCESS_VIOLATION exception, got 1 exceptions virtual.c:2949: Test failed: expected no STATUS_ACCESS_VIOLATION exception, got 1 exceptions virtual.c:2997: Test failed: expected no STATUS_ACCESS_VIOLATION exception, got 1 exceptions virtual.c:3012: Test failed: expected no STATUS_ACCESS_VIOLATION exception, got 1 exceptions virtual.c:3030: Test failed: expected no STATUS_ACCESS_VIOLATION exception, got 1 exceptions virtual.c:3048: Test failed: expected no STATUS_ACCESS_VIOLATION exception, got 1 exceptions virtual.c:3129: Test failed: expected no STATUS_ACCESS_VIOLATION exception, got 1 exceptions virtual.c:3153: Test failed: expected no STATUS_ACCESS_VIOLATION exception, got 1 exceptions virtual.c:3193: Test failed: expected no STATUS_ACCESS_VIOLATION exception, got 1 exceptions virtual.c:3218: Test failed: expected no STATUS_ACCESS_VIOLATION exception, got 1 exceptions virtual.c:3255: Test failed: NtSetInformationProcess failed with status c0000022 virtual.c:2797: Test failed: NtSetInformationProcess failed with status c0000022 virtual.c:2835: Test failed: expected policy flags 1, got 3 virtual.c:2836: Test failed: expected policy permanent FALSE, got 1 virtual.c:2934: Test failed: expected no STATUS_ACCESS_VIOLATION exception, got 1 exceptions virtual.c:2949: Test failed: expected no STATUS_ACCESS_VIOLATION exception, got 1 exceptions virtual.c:2997: Test failed: expected no STATUS_ACCESS_VIOLATION exception, got 1 exceptions virtual.c:3012: Test failed: expected no STATUS_ACCESS_VIOLATION exception, got 1 exceptions virtual.c:3193: Test failed: expected no STATUS_ACCESS_VIOLATION exception, got 1 exceptions virtual.c:3218: Test failed: expected no STATUS_ACCESS_VIOLATION exception, got 1 exceptions virtual.c:3255: Test failed: NtSetInformationProcess failed with status c0000022 virtual.c:2797: Test failed: NtSetInformationProcess failed with status c0000022 virtual.c:2836: Test failed: expected policy permanent FALSE, got 1 virtual.c:3255: Test failed: NtSetInformationProcess failed with status c0000022
=== w2008s64 (32 bit report) ===
kernel32: virtual.c:462: Test failed: NtAllocateVirtualMemory returned status c0000017 and pointer 00000000 virtual.c:469: Test failed: NtAllocateVirtualMemory returned c0000017 virtual.c:2797: Test failed: NtSetInformationProcess failed with status c0000022 virtual.c:2835: Test failed: expected policy flags 0, got 3 virtual.c:2836: Test failed: expected policy permanent FALSE, got 1 virtual.c:2891: Test failed: expected no STATUS_ACCESS_VIOLATION exception, got 1 exceptions virtual.c:2905: Test failed: expected no STATUS_ACCESS_VIOLATION exception, got 1 exceptions virtual.c:2934: Test failed: expected no STATUS_ACCESS_VIOLATION exception, got 1 exceptions virtual.c:2949: Test failed: expected no STATUS_ACCESS_VIOLATION exception, got 1 exceptions virtual.c:2997: Test failed: expected no STATUS_ACCESS_VIOLATION exception, got 1 exceptions virtual.c:3012: Test failed: expected no STATUS_ACCESS_VIOLATION exception, got 1 exceptions virtual.c:3030: Test failed: expected no STATUS_ACCESS_VIOLATION exception, got 1 exceptions virtual.c:3048: Test failed: expected no STATUS_ACCESS_VIOLATION exception, got 1 exceptions virtual.c:3129: Test failed: expected no STATUS_ACCESS_VIOLATION exception, got 1 exceptions virtual.c:3153: Test failed: expected no STATUS_ACCESS_VIOLATION exception, got 1 exceptions virtual.c:3193: Test failed: expected no STATUS_ACCESS_VIOLATION exception, got 1 exceptions virtual.c:3218: Test failed: expected no STATUS_ACCESS_VIOLATION exception, got 1 exceptions virtual.c:3255: Test failed: NtSetInformationProcess failed with status c0000022 virtual.c:2797: Test failed: NtSetInformationProcess failed with status c0000022 virtual.c:2835: Test failed: expected policy flags 1, got 3 virtual.c:2836: Test failed: expected policy permanent FALSE, got 1 virtual.c:2934: Test failed: expected no STATUS_ACCESS_VIOLATION exception, got 1 exceptions virtual.c:2949: Test failed: expected no STATUS_ACCESS_VIOLATION exception, got 1 exceptions virtual.c:2997: Test failed: expected no STATUS_ACCESS_VIOLATION exception, got 1 exceptions virtual.c:3012: Test failed: expected no STATUS_ACCESS_VIOLATION exception, got 1 exceptions virtual.c:3193: Test failed: expected no STATUS_ACCESS_VIOLATION exception, got 1 exceptions virtual.c:3218: Test failed: expected no STATUS_ACCESS_VIOLATION exception, got 1 exceptions virtual.c:3255: Test failed: NtSetInformationProcess failed with status c0000022 virtual.c:2797: Test failed: NtSetInformationProcess failed with status c0000022 virtual.c:2836: Test failed: expected policy permanent FALSE, got 1 virtual.c:3255: Test failed: NtSetInformationProcess failed with status c0000022
=== w7u (32 bit report) ===
kernel32: virtual.c:455: Test failed: NtAllocateVirtualMemory returned status c00000f1 and pointer 00000000 virtual.c:462: Test failed: NtAllocateVirtualMemory returned status c0000017 and pointer 00000000 virtual.c:469: Test failed: NtAllocateVirtualMemory returned c0000017 virtual.c:2797: Test failed: NtSetInformationProcess failed with status c0000022 virtual.c:2835: Test failed: expected policy flags 0, got 3 virtual.c:2836: Test failed: expected policy permanent FALSE, got 1 virtual.c:3255: Test failed: NtSetInformationProcess failed with status c0000022 virtual.c:2797: Test failed: NtSetInformationProcess failed with status c0000022 virtual.c:2835: Test failed: expected policy flags 1, got 3 virtual.c:2836: Test failed: expected policy permanent FALSE, got 1 virtual.c:3255: Test failed: NtSetInformationProcess failed with status c0000022 virtual.c:2797: Test failed: NtSetInformationProcess failed with status c0000022 virtual.c:2836: Test failed: expected policy permanent FALSE, got 1 virtual.c:3255: Test failed: NtSetInformationProcess failed with status c0000022
=== w7pro64 (32 bit report) ===
kernel32: virtual.c:455: Test failed: NtAllocateVirtualMemory returned status 00000000 and pointer 02100000 virtual.c:462: Test failed: NtAllocateVirtualMemory returned status c0000017 and pointer 00000000 virtual.c:469: Test failed: NtAllocateVirtualMemory returned c0000017 virtual.c:2797: Test failed: NtSetInformationProcess failed with status c0000022 virtual.c:2835: Test failed: expected policy flags 0, got 3 virtual.c:2836: Test failed: expected policy permanent FALSE, got 1 virtual.c:2891: Test failed: expected no STATUS_ACCESS_VIOLATION exception, got 1 exceptions virtual.c:2905: Test failed: expected no STATUS_ACCESS_VIOLATION exception, got 1 exceptions virtual.c:2934: Test failed: expected no STATUS_ACCESS_VIOLATION exception, got 1 exceptions virtual.c:2949: Test failed: expected no STATUS_ACCESS_VIOLATION exception, got 1 exceptions virtual.c:2997: Test failed: expected no STATUS_ACCESS_VIOLATION exception, got 1 exceptions virtual.c:3012: Test failed: expected no STATUS_ACCESS_VIOLATION exception, got 1 exceptions virtual.c:3030: Test failed: expected no STATUS_ACCESS_VIOLATION exception, got 1 exceptions virtual.c:3048: Test failed: expected no STATUS_ACCESS_VIOLATION exception, got 1 exceptions virtual.c:3129: Test failed: expected no STATUS_ACCESS_VIOLATION exception, got 1 exceptions virtual.c:3153: Test failed: expected no STATUS_ACCESS_VIOLATION exception, got 1 exceptions virtual.c:3193: Test failed: expected no STATUS_ACCESS_VIOLATION exception, got 1 exceptions virtual.c:3218: Test failed: expected no STATUS_ACCESS_VIOLATION exception, got 1 exceptions virtual.c:3255: Test failed: NtSetInformationProcess failed with status c0000022 virtual.c:2797: Test failed: NtSetInformationProcess failed with status c0000022 virtual.c:2835: Test failed: expected policy flags 1, got 3 virtual.c:2836: Test failed: expected policy permanent FALSE, got 1 virtual.c:2934: Test failed: expected no STATUS_ACCESS_VIOLATION exception, got 1 exceptions virtual.c:2949: Test failed: expected no STATUS_ACCESS_VIOLATION exception, got 1 exceptions virtual.c:2997: Test failed: expected no STATUS_ACCESS_VIOLATION exception, got 1 exceptions virtual.c:3012: Test failed: expected no STATUS_ACCESS_VIOLATION exception, got 1 exceptions virtual.c:3193: Test failed: expected no STATUS_ACCESS_VIOLATION exception, got 1 exceptions virtual.c:3218: Test failed: expected no STATUS_ACCESS_VIOLATION exception, got 1 exceptions virtual.c:3255: Test failed: NtSetInformationProcess failed with status c0000022 virtual.c:2797: Test failed: NtSetInformationProcess failed with status c0000022 virtual.c:2836: Test failed: expected policy permanent FALSE, got 1 virtual.c:3255: Test failed: NtSetInformationProcess failed with status c0000022
=== w8 (32 bit report) ===
kernel32: virtual.c:455: Test failed: NtAllocateVirtualMemory returned status 00000000 and pointer 01700000 virtual.c:462: Test failed: NtAllocateVirtualMemory returned status c0000017 and pointer 00000000 virtual.c:469: Test failed: NtAllocateVirtualMemory returned c0000017 virtual.c:2797: Test failed: NtSetInformationProcess failed with status c0000022 virtual.c:2835: Test failed: expected policy flags 0, got 3 virtual.c:2836: Test failed: expected policy permanent FALSE, got 1 virtual.c:2891: Test failed: expected no STATUS_ACCESS_VIOLATION exception, got 1 exceptions virtual.c:2905: Test failed: expected no STATUS_ACCESS_VIOLATION exception, got 1 exceptions virtual.c:2934: Test failed: expected no STATUS_ACCESS_VIOLATION exception, got 1 exceptions virtual.c:2949: Test failed: expected no STATUS_ACCESS_VIOLATION exception, got 1 exceptions virtual.c:2997: Test failed: expected no STATUS_ACCESS_VIOLATION exception, got 1 exceptions virtual.c:3012: Test failed: expected no STATUS_ACCESS_VIOLATION exception, got 1 exceptions virtual.c:3030: Test failed: expected no STATUS_ACCESS_VIOLATION exception, got 1 exceptions virtual.c:3048: Test failed: expected no STATUS_ACCESS_VIOLATION exception, got 1 exceptions virtual.c:3129: Test failed: expected no STATUS_ACCESS_VIOLATION exception, got 1 exceptions virtual.c:3153: Test failed: expected no STATUS_ACCESS_VIOLATION exception, got 1 exceptions virtual.c:3193: Test failed: expected no STATUS_ACCESS_VIOLATION exception, got 1 exceptions virtual.c:3218: Test failed: expected no STATUS_ACCESS_VIOLATION exception, got 1 exceptions virtual.c:3255: Test failed: NtSetInformationProcess failed with status c0000022 virtual.c:2797: Test failed: NtSetInformationProcess failed with status c0000022 virtual.c:2835: Test failed: expected policy flags 1, got 3 virtual.c:2836: Test failed: expected policy permanent FALSE, got 1 virtual.c:2934: Test failed: expected no STATUS_ACCESS_VIOLATION exception, got 1 exceptions virtual.c:2949: Test failed: expected no STATUS_ACCESS_VIOLATION exception, got 1 exceptions virtual.c:2997: Test failed: expected no STATUS_ACCESS_VIOLATION exception, got 1 exceptions virtual.c:3012: Test failed: expected no STATUS_ACCESS_VIOLATION exception, got 1 exceptions virtual.c:3193: Test failed: expected no STATUS_ACCESS_VIOLATION exception, got 1 exceptions virtual.c:3218: Test failed: expected no STATUS_ACCESS_VIOLATION exception, got 1 exceptions virtual.c:3255: Test failed: NtSetInformationProcess failed with status c0000022 virtual.c:2797: Test failed: NtSetInformationProcess failed with status c0000022 virtual.c:2836: Test failed: expected policy permanent FALSE, got 1 virtual.c:3255: Test failed: NtSetInformationProcess failed with status c0000022
=== w8adm (32 bit report) ===
kernel32: virtual.c:462: Test failed: NtAllocateVirtualMemory returned status c0000017 and pointer 00000000 virtual.c:469: Test failed: NtAllocateVirtualMemory returned c0000017 virtual.c:2797: Test failed: NtSetInformationProcess failed with status c0000022 virtual.c:2835: Test failed: expected policy flags 0, got 3 virtual.c:2836: Test failed: expected policy permanent FALSE, got 1 virtual.c:2891: Test failed: expected no STATUS_ACCESS_VIOLATION exception, got 1 exceptions virtual.c:2905: Test failed: expected no STATUS_ACCESS_VIOLATION exception, got 1 exceptions virtual.c:2934: Test failed: expected no STATUS_ACCESS_VIOLATION exception, got 1 exceptions virtual.c:2949: Test failed: expected no STATUS_ACCESS_VIOLATION exception, got 1 exceptions virtual.c:2997: Test failed: expected no STATUS_ACCESS_VIOLATION exception, got 1 exceptions virtual.c:3012: Test failed: expected no STATUS_ACCESS_VIOLATION exception, got 1 exceptions virtual.c:3030: Test failed: expected no STATUS_ACCESS_VIOLATION exception, got 1 exceptions virtual.c:3048: Test failed: expected no STATUS_ACCESS_VIOLATION exception, got 1 exceptions virtual.c:3129: Test failed: expected no STATUS_ACCESS_VIOLATION exception, got 1 exceptions virtual.c:3153: Test failed: expected no STATUS_ACCESS_VIOLATION exception, got 1 exceptions virtual.c:3193: Test failed: expected no STATUS_ACCESS_VIOLATION exception, got 1 exceptions virtual.c:3218: Test failed: expected no STATUS_ACCESS_VIOLATION exception, got 1 exceptions virtual.c:3255: Test failed: NtSetInformationProcess failed with status c0000022 virtual.c:2797: Test failed: NtSetInformationProcess failed with status c0000022 virtual.c:2835: Test failed: expected policy flags 1, got 3 virtual.c:2836: Test failed: expected policy permanent FALSE, got 1 virtual.c:2934: Test failed: expected no STATUS_ACCESS_VIOLATION exception, got 1 exceptions virtual.c:2949: Test failed: expected no STATUS_ACCESS_VIOLATION exception, got 1 exceptions virtual.c:2997: Test failed: expected no STATUS_ACCESS_VIOLATION exception, got 1 exceptions virtual.c:3012: Test failed: expected no STATUS_ACCESS_VIOLATION exception, got 1 exceptions virtual.c:3193: Test failed: expected no STATUS_ACCESS_VIOLATION exception, got 1 exceptions virtual.c:3218: Test failed: expected no STATUS_ACCESS_VIOLATION exception, got 1 exceptions virtual.c:3255: Test failed: NtSetInformationProcess failed with status c0000022 virtual.c:2797: Test failed: NtSetInformationProcess failed with status c0000022 virtual.c:2836: Test failed: expected policy permanent FALSE, got 1 virtual.c:3255: Test failed: NtSetInformationProcess failed with status c0000022
=== w864 (32 bit report) ===
kernel32: virtual.c:455: Test failed: NtAllocateVirtualMemory returned status 00000000 and pointer 02090000 virtual.c:462: Test failed: NtAllocateVirtualMemory returned status c0000017 and pointer 00000000 virtual.c:469: Test failed: NtAllocateVirtualMemory returned c0000017 virtual.c:2797: Test failed: NtSetInformationProcess failed with status c0000022 virtual.c:2835: Test failed: expected policy flags 0, got 3 virtual.c:2836: Test failed: expected policy permanent FALSE, got 1 virtual.c:2891: Test failed: expected no STATUS_ACCESS_VIOLATION exception, got 1 exceptions virtual.c:2905: Test failed: expected no STATUS_ACCESS_VIOLATION exception, got 1 exceptions virtual.c:2934: Test failed: expected no STATUS_ACCESS_VIOLATION exception, got 1 exceptions virtual.c:2949: Test failed: expected no STATUS_ACCESS_VIOLATION exception, got 1 exceptions virtual.c:2997: Test failed: expected no STATUS_ACCESS_VIOLATION exception, got 1 exceptions virtual.c:3012: Test failed: expected no STATUS_ACCESS_VIOLATION exception, got 1 exceptions virtual.c:3030: Test failed: expected no STATUS_ACCESS_VIOLATION exception, got 1 exceptions virtual.c:3048: Test failed: expected no STATUS_ACCESS_VIOLATION exception, got 1 exceptions virtual.c:3129: Test failed: expected no STATUS_ACCESS_VIOLATION exception, got 1 exceptions virtual.c:3153: Test failed: expected no STATUS_ACCESS_VIOLATION exception, got 1 exceptions virtual.c:3193: Test failed: expected no STATUS_ACCESS_VIOLATION exception, got 1 exceptions virtual.c:3218: Test failed: expected no STATUS_ACCESS_VIOLATION exception, got 1 exceptions virtual.c:3255: Test failed: NtSetInformationProcess failed with status c0000022 virtual.c:2797: Test failed: NtSetInformationProcess failed with status c0000022 virtual.c:2835: Test failed: expected policy flags 1, got 3 virtual.c:2836: Test failed: expected policy permanent FALSE, got 1 virtual.c:2934: Test failed: expected no STATUS_ACCESS_VIOLATION exception, got 1 exceptions virtual.c:2949: Test failed: expected no STATUS_ACCESS_VIOLATION exception, got 1 exceptions virtual.c:2997: Test failed: expected no STATUS_ACCESS_VIOLATION exception, got 1 exceptions virtual.c:3012: Test failed: expected no STATUS_ACCESS_VIOLATION exception, got 1 exceptions virtual.c:3193: Test failed: expected no STATUS_ACCESS_VIOLATION exception, got 1 exceptions virtual.c:3218: Test failed: expected no STATUS_ACCESS_VIOLATION exception, got 1 exceptions virtual.c:3255: Test failed: NtSetInformationProcess failed with status c0000022 virtual.c:2797: Test failed: NtSetInformationProcess failed with status c0000022 virtual.c:2836: Test failed: expected policy permanent FALSE, got 1 virtual.c:3255: Test failed: NtSetInformationProcess failed with status c0000022
=== w1064 (32 bit report) ===
kernel32: virtual.c:462: Test failed: NtAllocateVirtualMemory returned status c0000017 and pointer 00000000 virtual.c:469: Test failed: NtAllocateVirtualMemory returned c0000017 virtual.c:2797: Test failed: NtSetInformationProcess failed with status c0000022 virtual.c:2835: Test failed: expected policy flags 0, got 3 virtual.c:2836: Test failed: expected policy permanent FALSE, got 1 virtual.c:2891: Test failed: expected no STATUS_ACCESS_VIOLATION exception, got 1 exceptions virtual.c:2905: Test failed: expected no STATUS_ACCESS_VIOLATION exception, got 1 exceptions virtual.c:2934: Test failed: expected no STATUS_ACCESS_VIOLATION exception, got 1 exceptions virtual.c:2949: Test failed: expected no STATUS_ACCESS_VIOLATION exception, got 1 exceptions virtual.c:2997: Test failed: expected no STATUS_ACCESS_VIOLATION exception, got 1 exceptions virtual.c:3012: Test failed: expected no STATUS_ACCESS_VIOLATION exception, got 1 exceptions virtual.c:3030: Test failed: expected no STATUS_ACCESS_VIOLATION exception, got 1 exceptions virtual.c:3048: Test failed: expected no STATUS_ACCESS_VIOLATION exception, got 1 exceptions virtual.c:3129: Test failed: expected no STATUS_ACCESS_VIOLATION exception, got 1 exceptions virtual.c:3153: Test failed: expected no STATUS_ACCESS_VIOLATION exception, got 1 exceptions virtual.c:3193: Test failed: expected no STATUS_ACCESS_VIOLATION exception, got 1 exceptions virtual.c:3218: Test failed: expected no STATUS_ACCESS_VIOLATION exception, got 1 exceptions virtual.c:3255: Test failed: NtSetInformationProcess failed with status c0000022 virtual.c:2797: Test failed: NtSetInformationProcess failed with status c0000022 virtual.c:2835: Test failed: expected policy flags 1, got 3 virtual.c:2836: Test failed: expected policy permanent FALSE, got 1 virtual.c:2934: Test failed: expected no STATUS_ACCESS_VIOLATION exception, got 1 exceptions virtual.c:2949: Test failed: expected no STATUS_ACCESS_VIOLATION exception, got 1 exceptions virtual.c:2997: Test failed: expected no STATUS_ACCESS_VIOLATION exception, got 1 exceptions virtual.c:3012: Test failed: expected no STATUS_ACCESS_VIOLATION exception, got 1 exceptions virtual.c:3193: Test failed: expected no STATUS_ACCESS_VIOLATION exception, got 1 exceptions virtual.c:3218: Test failed: expected no STATUS_ACCESS_VIOLATION exception, got 1 exceptions virtual.c:3255: Test failed: NtSetInformationProcess failed with status c0000022 virtual.c:2797: Test failed: NtSetInformationProcess failed with status c0000022 virtual.c:2836: Test failed: expected policy permanent FALSE, got 1 virtual.c:3255: Test failed: NtSetInformationProcess failed with status c0000022
=== wvistau64 (64 bit report) ===
kernel32: virtual.c:455: Test failed: NtAllocateVirtualMemory returned status 00000000 and pointer 0000000002430000 virtual.c:462: Test failed: NtAllocateVirtualMemory returned status c0000017 and pointer 0000000000000000 virtual.c:469: Test failed: NtAllocateVirtualMemory returned c0000017
=== w2008s64 (64 bit report) ===
kernel32: virtual.c:455: Test failed: NtAllocateVirtualMemory returned status 00000000 and pointer 0000000002430000 virtual.c:462: Test failed: NtAllocateVirtualMemory returned status c0000017 and pointer 0000000000000000 virtual.c:469: Test failed: NtAllocateVirtualMemory returned c0000017
=== w7pro64 (64 bit report) ===
kernel32: virtual.c:455: Test failed: NtAllocateVirtualMemory returned status 00000000 and pointer 0000000002140000 virtual.c:462: Test failed: NtAllocateVirtualMemory returned status c0000017 and pointer 0000000000000000 virtual.c:469: Test failed: NtAllocateVirtualMemory returned c0000017
=== w864 (64 bit report) ===
kernel32: virtual.c:462: Test failed: NtAllocateVirtualMemory returned status c0000017 and pointer 0000000000000000 virtual.c:469: Test failed: NtAllocateVirtualMemory returned c0000017
=== w1064 (64 bit report) ===
kernel32: virtual.c:455: Test failed: NtAllocateVirtualMemory returned status 00000000 and pointer 00000000024C0000 virtual.c:462: Test failed: NtAllocateVirtualMemory returned status c0000017 and pointer 0000000000000000 virtual.c:469: Test failed: NtAllocateVirtualMemory returned c0000017
=== debian9 (32 bit report) ===
kernel32: virtual.c:462: Test failed: NtAllocateVirtualMemory returned status c0000017 and pointer (nil) virtual.c:1310: Test succeeded inside todo block: NtMapViewOfSection returned c0000017 virtual.c:1321: Test succeeded inside todo block: NtMapViewOfSection returned c0000017
=== debian9 (32 bit French report) ===
kernel32: virtual.c:462: Test failed: NtAllocateVirtualMemory returned status c0000017 and pointer (nil) virtual.c:1310: Test succeeded inside todo block: NtMapViewOfSection returned c0000017 virtual.c:1321: Test succeeded inside todo block: NtMapViewOfSection returned c0000017
=== debian9 (32 bit Japanese:Japan report) ===
kernel32: virtual.c:462: Test failed: NtAllocateVirtualMemory returned status c0000017 and pointer (nil) virtual.c:1310: Test succeeded inside todo block: NtMapViewOfSection returned c0000017 virtual.c:1321: Test succeeded inside todo block: NtMapViewOfSection returned c0000017
=== debian9 (32 bit Chinese:China report) ===
kernel32: virtual.c:462: Test failed: NtAllocateVirtualMemory returned status c0000017 and pointer (nil) virtual.c:1310: Test succeeded inside todo block: NtMapViewOfSection returned c0000017 virtual.c:1321: Test succeeded inside todo block: NtMapViewOfSection returned c0000017
=== debian9 (32 bit WoW report) ===
kernel32: virtual.c:462: Test failed: NtAllocateVirtualMemory returned status c0000017 and pointer (nil) virtual.c:1310: Test succeeded inside todo block: NtMapViewOfSection returned c0000017 virtual.c:1321: Test succeeded inside todo block: NtMapViewOfSection returned c0000017
=== debian9 (64 bit WoW report) ===
kernel32: virtual.c:462: Test failed: NtAllocateVirtualMemory returned status c0000017 and pointer (nil) virtual.c:1310: Test succeeded inside todo block: NtMapViewOfSection returned c0000017 virtual.c:1321: Test succeeded inside todo block: NtMapViewOfSection returned c0000017
Las@protonmail.ch writes:
A lot of internal Wine functionality unfortunately depends on the old Wine behavior, but thankfully, all of the uses seem to be redundant, as no function requested an alignment higher than the minimum! It may however be that I have not fully understood the code, as it is not always clear what alignment is requested.
At least the signal stack one could potentially need a larger alignment. Also I think it would be nice to preserve the functionality in an internal function to avoid wasting address space where possible.