https://bugs.winehq.org/show_bug.cgi?id=40528
--- Comment #6 from Angus Gratton gus@projectgus.com ---
It's not surprising it doesn't work as they are expecting exact opcode sequence for some ntdll exports. We can't do that, maybe someone interested could convince them to add back fallback logic if only for Wine.
Yes, sorry - I posted that comment and then read find_fast_fwd_pointer()'s source and realised the same.
There is actually some existing fallback logic if that fails: https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;a=blob;f=winsup/cy...
I think the current crash may happen when Cygwin calls RtlEnterCriticalSection (peb.FastPebLock);, as wine doesn't set this field and calls RtlAcquirePebLock() instead (which uses a static variable). I don't know if that's the only thing that's different, though...