https://bugs.winehq.org/show_bug.cgi?id=57523
--- Comment #13 from Tatsuyuki Ishi ishitatsuyuki@gmail.com --- The app creates a tightly bounded heap, then allocate a single object out of it:
13761.528:0148:014c:trace:heap:RtlCreateHeap flags 0x4, addr 0000000000000000, total_size 0xc00, commit_size 0xc00, lock 0000000000000000, params 0000000000000000 13761.528:0148:014c:Ret KERNEL32.HeapCreate() retval=01470000 ret=14035a75b 13761.528:0148:014c:Call ntdll.RtlAllocateHeap(01470000,0000000c,00000af0) ret=14035a76f
commit_size is rounded to page boundary, so we have 0x1000 bytes for the entire heap. The allocation needs 0xaf0, which leaves us with 0x510 bytes left.
With the commit in question sizeof(struct heap) is 0x8f0, which is too large to fit into the equation. I'll give you a patch that shrinks struct heap to see if it solves your issue. If this works, let me think if there's a way to address this without regressing the performance intensive use case the commit was trying to fix.