[PATCH staging 3/4] ntdll: Always enable WRITECOPY support.
Andrew Wesie
awesie at gmail.com
Fri Apr 24 14:55:16 CDT 2020
Signed-off-by: Andrew Wesie <awesie at gmail.com>
---
dlls/ntdll/virtual.c | 22 +++-------------------
1 file changed, 3 insertions(+), 19 deletions(-)
diff --git a/dlls/ntdll/virtual.c b/dlls/ntdll/virtual.c
index 6d57e50c7b..dba2e3380c 100644
--- a/dlls/ntdll/virtual.c
+++ b/dlls/ntdll/virtual.c
@@ -311,22 +311,6 @@ static const char *VIRTUAL_GetProtStr( BYTE prot )
return buffer;
}
-/* This might look like a hack, but it actually isn't - the 'experimental' version
- * is correct, but it already has revealed a couple of additional Wine bugs, which
- * were not triggered before, and there are probably some more.
- * To avoid breaking Wine for everyone, the new correct implementation has to be
- * manually enabled, until it is tested a bit more. */
-static inline BOOL experimental_WRITECOPY( void )
-{
- static int enabled = -1;
- if (enabled == -1)
- {
- const char *str = getenv("STAGING_WRITECOPY");
- enabled = str && (atoi(str) != 0);
- }
- return enabled;
-}
-
/***********************************************************************
* VIRTUAL_GetUnixProt
*
@@ -343,10 +327,10 @@ static int VIRTUAL_GetUnixProt( BYTE vprot )
#if defined(__i386__) || defined(__x86_64__)
if (vprot & VPROT_WRITECOPY)
{
- if (experimental_WRITECOPY() && !(vprot & VPROT_WRITTEN))
- prot = (prot & ~PROT_WRITE) | PROT_READ;
- else
+ if (vprot & VPROT_WRITTEN)
prot |= PROT_WRITE | PROT_READ;
+ else
+ prot = (prot & ~PROT_WRITE) | PROT_READ;
}
#else
/* FIXME: Architecture needs implementation of signal_init_early. */
--
2.24.2 (Apple Git-127)
More information about the wine-devel
mailing list