http://bugs.winehq.org/show_bug.cgi?id=58084
Bug ID: 58084 Summary: Commit d813ffc3 (ntdll: Align virtual memory allocations to the host page size) breaks Wine in a Rosetta emulated Docker environment Product: Wine Version: 10.5 Hardware: arm OS: MacOS Status: UNCONFIRMED Severity: normal Priority: P2 Component: ntdll Assignee: wine-bugs@winehq.org Reporter: alex@willner.ws
**Version:** 10.5 and 10.4
**Steps that will reproduce the problem:**
On an arm64 M2 run macOS 15.4 (24E248) and execute with Docker version 28.0.4 (b8034c0): docker run --platform linux/amd64 --rm scottyhardy/docker-wine:devel-10.4 sh -c 'wine --version && winecfg'
**What is the expected result:**
% docker run --platform linux/amd64 --rm scottyhardy/docker-wine:devel-10.5 sh -c 'wine --version && winecfg' wine-10.5 wine: created the configuration directory ...
**What happens instead:**
wine-10.5 wine: dlls/ntdll/unix/virtual.c:253: anon_mmap_fixed: Assertion `!((UINT_PTR)start & host_page_mask)' failed. qemu: uncaught target signal 6 (Aborted) - core dumped Aborted
**Possible workaround:**
Downgrade to Wine 10.4:
% docker run --platform linux/amd64 --rm scottyhardy/docker-wine:devel-10.4 sh -c 'wine --version && winecfg' wine-10.4 wine: created the configuration directory ...
*Any additional information:**
See Commit d813ffc3: ntdll: Align virtual memory allocations to the host page size. https://gitlab.winehq.org/wine/wine/-/commit/d813ffc3557083fd135a28d59f490bb...
http://bugs.winehq.org/show_bug.cgi?id=58084
cqwrteur euloanty@live.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |euloanty@live.com
--- Comment #1 from cqwrteur euloanty@live.com --- i have found the same issue on aarch64-linux-musl
Assertion failed: !(size & host_page_mask) (/home/cqwrteur/toolchains_build/wine/dlls/ntdll/unix/virtual.c: alloc_virtual_heap: 3421) Aborted
http://bugs.winehq.org/show_bug.cgi?id=58084
Arseny Solokha asolokha@gmx.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |asolokha@gmx.com
http://bugs.winehq.org/show_bug.cgi?id=58084
André Z. nerv@dawncrow.de changed:
What |Removed |Added ---------------------------------------------------------------------------- Ever confirmed|0 |1 CC| |nerv@dawncrow.de Status|UNCONFIRMED |NEW
--- Comment #2 from André Z. nerv@dawncrow.de --- confirming, there were reports for Hangover as well
http://bugs.winehq.org/show_bug.cgi?id=58084
André Z. nerv@dawncrow.de changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |julliard@winehq.org
--- Comment #3 from André Z. nerv@dawncrow.de --- So according to my calculations this is what happens on a 4k pagesize system with 38 bits address space:
virtual_init: pages_vprot_size = ((size_t)host_addr_space_limit /* 0x7fffff0000 */ >> page_shift /* 12 */ >> pages_vprot_shift /* 20 */) + 1; /* = 0x80 */ size = 2 * view_block_size + pages_vprot_size * sizeof(*pages_vprot); /* = 0x200400 */
alloc_virtual_heap: assert( !(size & host_page_mask) ); /* 0x200400 & 0xfff */ //->boom
http://bugs.winehq.org/show_bug.cgi?id=58084
André Z. nerv@dawncrow.de changed:
What |Removed |Added ---------------------------------------------------------------------------- Regression SHA1| |d813ffc3557083fd135a28d59f4 | |90bb83754263f
http://bugs.winehq.org/show_bug.cgi?id=58084
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |austinenglish@gmail.com
http://bugs.winehq.org/show_bug.cgi?id=58084
--- Comment #4 from André Z. nerv@dawncrow.de --- (In reply to André Z. from comment #3)
So according to my calculations this is what happens on a 4k pagesize system with 38 bits address space:
virtual_init: pages_vprot_size = ((size_t)host_addr_space_limit /* 0x7fffff0000 */ >> page_shift /* 12 */ >> pages_vprot_shift /* 20 */) + 1; /* = 0x80 */ size = 2 * view_block_size + pages_vprot_size * sizeof(*pages_vprot); /* = 0x200400 */
alloc_virtual_heap: assert( !(size & host_page_mask) ); /* 0x200400 & 0xfff */ //->boom
396207f4f1ad8903876a31cecbf5756f321295a9 fixed this, but not sure about the similar problem on mac. Somehow this bug is about two different issues.