[PATCH] ntdll/tests: If DEP is enabled, skip a test that will crash

Huw Davies huw at codeweavers.com
Mon Sep 10 04:48:12 CDT 2018


On Mon, Sep 10, 2018 at 10:30:47AM +0100, Huw Davies wrote:
> On Tue, Sep 04, 2018 at 09:54:58PM -0600, Alex Henrie wrote:
> > Signed-off-by: Alex Henrie <alexhenrie24 at gmail.com>
> > ---
> > DEP is enabled by default on server editions of Windows, so this test
> > has been consistently crashing on Windows Server 2008.
> > ---
> >  dlls/ntdll/tests/info.c | 29 ++++++++++++++++++++++-------
> >  1 file changed, 22 insertions(+), 7 deletions(-)
> > 
> > diff --git a/dlls/ntdll/tests/info.c b/dlls/ntdll/tests/info.c
> > index 2ab12e4257..2ee9f0deba 100644
> > --- a/dlls/ntdll/tests/info.c
> > +++ b/dlls/ntdll/tests/info.c
> > @@ -37,6 +37,7 @@ static NTSTATUS (WINAPI * pNtUnmapViewOfSection)(HANDLE,PVOID);
> >  static NTSTATUS (WINAPI * pNtClose)(HANDLE);
> >  static ULONG    (WINAPI * pNtGetCurrentProcessorNumber)(void);
> >  static BOOL     (WINAPI * pIsWow64Process)(HANDLE, PBOOL);
> > +static BOOL     (WINAPI * pGetProcessDEPPolicy)(HANDLE,DWORD*,BOOL*);
> >  static BOOL     (WINAPI * pGetLogicalProcessorInformationEx)(LOGICAL_PROCESSOR_RELATIONSHIP,SYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX*,DWORD*);
> >  
> >  static BOOL is_wow64;
> > @@ -96,6 +97,8 @@ static BOOL InitFunctionPtrs(void)
> >      pIsWow64Process = (void *)GetProcAddress(hkernel32, "IsWow64Process");
> >      if (!pIsWow64Process || !pIsWow64Process( GetCurrentProcess(), &is_wow64 )) is_wow64 = FALSE;
> >  
> > +    pGetProcessDEPPolicy = (void *)GetProcAddress(hkernel32, "GetProcessDEPPolicy");
> > +
> 
> You want to use NtQueryInformationProcess() to get the DEP flags, to
> avoid calling back up to kernel32.

But on looking further we already do that (sorry I thought this was a
different test), so something else must be going on.

Huw.



More information about the wine-devel mailing list