[Bug 52023] New: VirtualFree returning error when it should not

WineHQ Bugzilla wine-bugs at winehq.org
Thu Nov 11 10:44:33 CST 2021


https://bugs.winehq.org/show_bug.cgi?id=52023

            Bug ID: 52023
           Summary: VirtualFree returning error when it should not
           Product: Wine
           Version: 6.19
          Hardware: x86-64
                OS: Linux
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: kernel32
          Assignee: wine-bugs at winehq.org
          Reporter: elpochodelagente at gmail.com
      Distribution: ---

Created attachment 71022
  --> https://bugs.winehq.org/attachment.cgi?id=71022
test case source and exe

I find it odd that Wine's version of VirtualFree [1] with MEM_DECOMMIT does
nothing, and always returns error (STATUS_NO_MEMORY, see decommit_pages and
anon_map_fixed in dlls/ntdll/unix/virtual.c).

The attached test passes, (crashing) in windows but doesn't in wine:

$ x86_64-w64-mingw32-gcc -o decommit.exe decommit.c 


Windows:

$ ./decommit.exe
======
test 1 - reserve, commit, release
> success!
======
test 2 - reserve, commit, decommit, attempt use
> Segmentation fault


Wine:

$ wine decommit.exe 
======
test 1 - reserve, commit, release
> success!
======
test 2 - reserve, commit, decommit, attempt use
> Could not decommit memory. Error code: 8
======


[1]
https://docs.microsoft.com/en-us/windows/win32/api/memoryapi/nf-memoryapi-virtualfree

-- 
Do not reply to this email, post in Bugzilla using the
above URL to reply.
You are receiving this mail because:
You are watching all bug changes.



More information about the wine-bugs mailing list