There are applications that uses SRWLOCK in an invalid way and then checks its binary
representation. ~~Specifically they releases an unlocked SRWLOCK then check its bit pattern is
all-ones.~~
Tweak the representation a bit so they are happy.
--
v14: ntdll: Tweak the binary representation of SRWLOCK.
https://gitlab.winehq.org/wine/wine/-/merge_requests/4310
_(w)environ[] do have a distinct allocation chunk for each entry, so
that _(w)environ[i] pointer and (pointed) string don't change when
updating/deleting any other entry.
Proposed implementation still differs from native:
- allocation is done on process heap, while native uses msvcrt's heap
- first ANSI allocated _environ[] doesn't have per entry allocation.
This is only activated after a change (update/deletion) to _environ[]
is made.
--
v2: msvcrt: Let each _environ[] entry have a distinct allocation block.
msvcrt: Add test about _environ[] entries allocation.
https://gitlab.winehq.org/wine/wine/-/merge_requests/4313
Prevents applications that accidentally attempt to allocate massive amounts of memory from getting OOM killed
(An example of such an application is EverQuest's DX11 beta, which has some corrupted asset files that result in it trying to allocate ~18TB of memory)
BTW, is it okay to have a test that's likely to get OOM killed on a failing implementation? If not, any recommendations on how else to test this?
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/4328