winehq.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
November 2020
----- 2025 -----
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
1 participants
851 discussions
Start a n
N
ew thread
Alexandre Julliard : include: Force aligning stack pointer also for Mingw builds.
by Alexandre Julliard
26 Nov '20
26 Nov '20
Module: wine Branch: master Commit: 5a0c9270b1225da86782bffd9eb798a39723d70f URL:
https://source.winehq.org/git/wine.git/?a=commit;h=5a0c9270b1225da86782bffd…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu Nov 26 16:01:49 2020 +0100 include: Force aligning stack pointer also for Mingw builds. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=50189
Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- include/msvcrt/corecrt.h | 22 +++++++--------------- include/windef.h | 22 +++++++--------------- 2 files changed, 14 insertions(+), 30 deletions(-) diff --git a/include/msvcrt/corecrt.h b/include/msvcrt/corecrt.h index 587dcce2a54..eee028c2028 100644 --- a/include/msvcrt/corecrt.h +++ b/include/msvcrt/corecrt.h @@ -61,7 +61,8 @@ #define __has_attribute(x) 0 #endif -#if !defined(_MSC_VER) && !defined(__stdcall) +#ifndef _MSC_VER +# undef __stdcall # ifdef __i386__ # ifdef __GNUC__ # if (__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 2)) || defined(__APPLE__) @@ -87,27 +88,18 @@ # endif /* __i386__ */ #endif /* __stdcall */ -#if !defined(_MSC_VER) && !defined(__cdecl) +#ifndef _MSC_VER +# undef __cdecl # if defined(__i386__) && defined(__GNUC__) -# if (__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 2)) || defined(__APPLE__) +# if (__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 2)) || defined(__APPLE__) # define __cdecl __attribute__((__cdecl__)) __attribute__((__force_align_arg_pointer__)) # else # define __cdecl __attribute__((__cdecl__)) # endif -# elif defined(__x86_64__) && defined (__GNUC__) -# if __has_attribute(__force_align_arg_pointer__) -# define __cdecl __attribute__((ms_abi)) __attribute__((__force_align_arg_pointer__)) -# else -# define __cdecl __attribute__((ms_abi)) -# endif -# elif defined(__arm__) && defined (__GNUC__) && !defined(__SOFTFP__) -# define __cdecl __attribute__((pcs("aapcs-vfp"))) -# elif defined(__aarch64__) && defined (__GNUC__) -# define __cdecl __attribute__((ms_abi)) # else -# define __cdecl +# define __cdecl __stdcall # endif -#endif /* __cdecl */ +#endif #ifndef __ms_va_list # if (defined(__x86_64__) || defined(__aarch64__)) && defined (__GNUC__) diff --git a/include/windef.h b/include/windef.h index db5c60641d4..b8e5ed692b1 100644 --- a/include/windef.h +++ b/include/windef.h @@ -54,7 +54,8 @@ extern "C" { # endif #endif -#if !defined(_MSC_VER) && !defined(__stdcall) +#ifndef _MSC_VER +# undef __stdcall # ifdef __i386__ # ifdef __GNUC__ # if (__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 2)) || defined(__APPLE__) @@ -80,27 +81,18 @@ extern "C" { # endif /* __i386__ */ #endif /* __stdcall */ -#if !defined(_MSC_VER) && !defined(__cdecl) +#ifndef _MSC_VER +# undef __cdecl # if defined(__i386__) && defined(__GNUC__) -# if (__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 2)) || defined(__APPLE__) +# if (__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 2)) || defined(__APPLE__) # define __cdecl __attribute__((__cdecl__)) __attribute__((__force_align_arg_pointer__)) # else # define __cdecl __attribute__((__cdecl__)) # endif -# elif defined(__x86_64__) && defined (__GNUC__) -# if __has_attribute(__force_align_arg_pointer__) -# define __cdecl __attribute__((ms_abi)) __attribute__((__force_align_arg_pointer__)) -# else -# define __cdecl __attribute__((ms_abi)) -# endif -# elif defined(__arm__) && defined (__GNUC__) && !defined(__SOFTFP__) -# define __cdecl __attribute__((pcs("aapcs-vfp"))) -# elif defined(__aarch64__) && defined (__GNUC__) -# define __cdecl __attribute__((ms_abi)) # else -# define __cdecl +# define __cdecl __stdcall # endif -#endif /* __cdecl */ +#endif #if !defined(_MSC_VER) && !defined(__fastcall) # define __fastcall __stdcall
1
0
0
0
Alexandre Julliard : ntdll: Store the syscall dispatcher also in the WOW32Reserved TEB field.
by Alexandre Julliard
26 Nov '20
26 Nov '20
Module: wine Branch: master Commit: baec5f1eca35450e13f24b65605c9783e5dca1d2 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=baec5f1eca35450e13f24b65…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu Nov 26 13:33:52 2020 +0100 ntdll: Store the syscall dispatcher also in the WOW32Reserved TEB field. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ntdll/unix/virtual.c | 1 + 1 file changed, 1 insertion(+) diff --git a/dlls/ntdll/unix/virtual.c b/dlls/ntdll/unix/virtual.c index eaaf7242883..785583a340a 100644 --- a/dlls/ntdll/unix/virtual.c +++ b/dlls/ntdll/unix/virtual.c @@ -2542,6 +2542,7 @@ static void init_teb( TEB *teb, PEB *peb ) PtrToUlong( &teb64->ActivationContextStack.FrameListCache ); teb64->StaticUnicodeString.Buffer = PtrToUlong( teb64->StaticUnicodeBuffer ); teb64->StaticUnicodeString.MaximumLength = sizeof( teb64->StaticUnicodeBuffer ); + teb->WOW32Reserved = __wine_syscall_dispatcher; #endif teb->Peb = peb; teb->Tib.Self = &teb->Tib;
1
0
0
0
Alexandre Julliard : krnl386: Move the 16-bit stack out of the WOW32Reserved field.
by Alexandre Julliard
26 Nov '20
26 Nov '20
Module: wine Branch: master Commit: b636f9816f898ddd368d6366fd822a1a4b17e515 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=b636f9816f898ddd368d6366…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu Nov 26 13:25:06 2020 +0100 krnl386: Move the 16-bit stack out of the WOW32Reserved field. Based on a patch by Sebastian Lackner. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/dbghelp/cpu_i386.c | 6 +++--- dlls/krnl386.exe16/kernel16_private.h | 1 + dlls/krnl386.exe16/thunk.c | 4 ++-- dlls/krnl386.exe16/wowthunk.c | 2 +- dlls/ntdll/unix/signal_i386.c | 2 +- dlls/toolhelp.dll16/toolhelp.c | 4 ++-- include/wine/winbase16.h | 6 +++--- tools/winebuild/relay.c | 2 +- 8 files changed, 14 insertions(+), 13 deletions(-) diff --git a/dlls/dbghelp/cpu_i386.c b/dlls/dbghelp/cpu_i386.c index 864b7f76643..45b3bd95df6 100644 --- a/dlls/dbghelp/cpu_i386.c +++ b/dlls/dbghelp/cpu_i386.c @@ -213,16 +213,16 @@ static BOOL i386_stack_walk(struct cpu_stack_walk *csw, STACKFRAME64 *frame, /* Init done */ set_curr_mode((frame->AddrPC.Mode == AddrModeFlat) ? stm_32bit : stm_16bit); - /* cur_switch holds address of WOW32Reserved field in TEB in debuggee + /* cur_switch holds address of SystemReserved1[0] field in TEB in debuggee * address space */ if (NtQueryInformationThread(csw->hThread, ThreadBasicInformation, &info, sizeof(info), NULL) == STATUS_SUCCESS) { - curr_switch = (DWORD_PTR)info.TebBaseAddress + FIELD_OFFSET(TEB, WOW32Reserved); + curr_switch = (DWORD_PTR)info.TebBaseAddress + FIELD_OFFSET(TEB, SystemReserved1); if (!sw_read_mem(csw, curr_switch, &p, sizeof(p))) { - WARN("Can't read TEB:WOW32Reserved\n"); + WARN("Can't read TEB:SystemReserved1\n"); goto done_err; } next_switch = p; diff --git a/dlls/krnl386.exe16/kernel16_private.h b/dlls/krnl386.exe16/kernel16_private.h index 8c93b1dc0a2..279058ac68f 100644 --- a/dlls/krnl386.exe16/kernel16_private.h +++ b/dlls/krnl386.exe16/kernel16_private.h @@ -298,6 +298,7 @@ struct tagSYSLEVEL; struct kernel_thread_data { + SEGPTR stack; /* 16-bit stack pointer */ WORD stack_sel; /* 16-bit stack selector */ WORD htask16; /* Win16 task handle */ DWORD sys_count[4]; /* syslevel mutex entry counters */ diff --git a/dlls/krnl386.exe16/thunk.c b/dlls/krnl386.exe16/thunk.c index ad2c52fab46..98dbf31a770 100644 --- a/dlls/krnl386.exe16/thunk.c +++ b/dlls/krnl386.exe16/thunk.c @@ -1229,7 +1229,7 @@ void WINAPI __regs_K32Thk1632Prolog( CONTEXT *context ) DWORD argSize = context->Ebp - context->Esp; char *stack16 = (char *)context->Esp - 4; STACK16FRAME *frame16 = (STACK16FRAME *)stack16 - 1; - STACK32FRAME *frame32 = NtCurrentTeb()->WOW32Reserved; + STACK32FRAME *frame32 = (STACK32FRAME *)kernel_get_thread_data()->stack; char *stack32 = (char *)frame32 - argSize; WORD stackSel = SELECTOROF(frame32->frame16); DWORD stackBase = GetSelectorBase(stackSel); @@ -1282,7 +1282,7 @@ void WINAPI __regs_K32Thk1632Epilog( CONTEXT *context ) TRACE("before SYSTHUNK hack: EBP: %08x ESP: %08x cur_stack: %04x:%04x\n", context->Ebp, context->Esp, CURRENT_SS, CURRENT_SP); - NtCurrentTeb()->WOW32Reserved = frame16->frame32; + kernel_get_thread_data()->stack = (SEGPTR)frame16->frame32; context->Esp = (DWORD)stack16 + nArgsPopped; context->Ebp = frame16->ebp; diff --git a/dlls/krnl386.exe16/wowthunk.c b/dlls/krnl386.exe16/wowthunk.c index 2b4deb34e99..73d1565c573 100644 --- a/dlls/krnl386.exe16/wowthunk.c +++ b/dlls/krnl386.exe16/wowthunk.c @@ -127,7 +127,7 @@ static DWORD call16_handler( EXCEPTION_RECORD *record, EXCEPTION_REGISTRATION_RE { /* unwinding: restore the stack pointer in the TEB, and leave the Win16 mutex */ STACK32FRAME *frame32 = CONTAINING_RECORD(frame, STACK32FRAME, frame); - NtCurrentTeb()->WOW32Reserved = (void *)frame32->frame16; + kernel_get_thread_data()->stack = frame32->frame16; _LeaveWin16Lock(); } else if (record->ExceptionCode == EXCEPTION_ACCESS_VIOLATION || diff --git a/dlls/ntdll/unix/signal_i386.c b/dlls/ntdll/unix/signal_i386.c index 58b79940773..eb4a6653f5e 100644 --- a/dlls/ntdll/unix/signal_i386.c +++ b/dlls/ntdll/unix/signal_i386.c @@ -630,7 +630,7 @@ static inline void *init_handler( const ucontext_t *sigcontext ) * SS is still non-system segment. This is why both CS and SS * are checked. */ - return teb->WOW32Reserved; + return teb->SystemReserved1[0]; } return (void *)(ESP_sig(sigcontext) & ~3); } diff --git a/dlls/toolhelp.dll16/toolhelp.c b/dlls/toolhelp.dll16/toolhelp.c index 5d7bf8f016e..57a95fb8d8f 100644 --- a/dlls/toolhelp.dll16/toolhelp.c +++ b/dlls/toolhelp.dll16/toolhelp.c @@ -491,8 +491,8 @@ BOOL16 WINAPI TaskNext16( TASKENTRY *lpte ) lpte->hTaskParent = pTask->hParent; lpte->hInst = pTask->hInstance; lpte->hModule = pTask->hModule; - lpte->wSS = SELECTOROF( pTask->teb->WOW32Reserved ); - lpte->wSP = OFFSETOF( pTask->teb->WOW32Reserved ); + lpte->wSS = SELECTOROF( pTask->teb->SystemReserved1[0] ); + lpte->wSP = OFFSETOF( pTask->teb->SystemReserved1[0] ); lpte->wStackTop = pInstData->stacktop; lpte->wStackMinimum = pInstData->stackmin; lpte->wStackBottom = pInstData->stackbottom; diff --git a/include/wine/winbase16.h b/include/wine/winbase16.h index a3ff69b264d..71493395f3a 100644 --- a/include/wine/winbase16.h +++ b/include/wine/winbase16.h @@ -562,9 +562,9 @@ BOOL16 WINAPI WritePrivateProfileSection16(LPCSTR,LPCSTR,LPCSTR); BOOL16 WINAPI WritePrivateProfileStruct16(LPCSTR,LPCSTR,LPVOID,UINT16,LPCSTR); BOOL16 WINAPI WriteProfileSection16(LPCSTR,LPCSTR); -#define CURRENT_STACK16 ((STACK16FRAME *)MapSL((SEGPTR)NtCurrentTeb()->WOW32Reserved)) +#define CURRENT_STACK16 ((STACK16FRAME *)MapSL((SEGPTR)NtCurrentTeb()->SystemReserved1[0])) #define CURRENT_DS (CURRENT_STACK16->ds) -#define CURRENT_SP (((WORD *)&NtCurrentTeb()->WOW32Reserved)[0]) -#define CURRENT_SS (((WORD *)&NtCurrentTeb()->WOW32Reserved)[1]) +#define CURRENT_SP (((WORD *)NtCurrentTeb()->SystemReserved1)[0]) +#define CURRENT_SS (((WORD *)NtCurrentTeb()->SystemReserved1)[1]) #endif /* __WINE_WINE_WINBASE16_H */ diff --git a/tools/winebuild/relay.c b/tools/winebuild/relay.c index 29d0a74c833..dc0960761a5 100644 --- a/tools/winebuild/relay.c +++ b/tools/winebuild/relay.c @@ -31,7 +31,7 @@ #include "build.h" /* offset of the stack pointer relative to %fs:(0) */ -#define STACKOFFSET 0xc0 /* FIELD_OFFSET(TEB,WOW32Reserved) */ +#define STACKOFFSET 0x10c /* FIELD_OFFSET(TEB,SystemReserved1) */ /* fix this if the x86_thread_data structure is changed */ #define GS_OFFSET 0x1d8 /* FIELD_OFFSET(TEB,SystemReserved2) + FIELD_OFFSET(struct x86_thread_data,gs) */
1
0
0
0
Alexandre Julliard : include: Add CURRENT_SS/SP macros for 16-bit code.
by Alexandre Julliard
26 Nov '20
26 Nov '20
Module: wine Branch: master Commit: f87262ea9935f5bc62d1f2f9c0146c7723ef7b59 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=f87262ea9935f5bc62d1f2f9…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu Nov 26 12:49:41 2020 +0100 include: Add CURRENT_SS/SP macros for 16-bit code. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/commdlg.dll16/filedlg.c | 4 ++-- dlls/krnl386.exe16/kernel.c | 7 +++--- dlls/krnl386.exe16/kernel16_private.h | 9 ++++---- dlls/krnl386.exe16/ne_module.c | 8 +++---- dlls/krnl386.exe16/ne_segment.c | 24 ++++++++++---------- dlls/krnl386.exe16/task.c | 37 +++++++++++++++--------------- dlls/krnl386.exe16/thunk.c | 42 ++++++++++++++++------------------- dlls/krnl386.exe16/wowthunk.c | 15 +++++-------- dlls/system.drv16/system.c | 2 +- dlls/user.exe16/message.c | 6 ++--- include/wine/winbase16.h | 2 ++ 11 files changed, 73 insertions(+), 83 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=f87262ea9935f5bc62d1…
1
0
0
0
Alexandre Julliard : include: Make the CURRENT_STACK16 and CURRENT_DS macros available globally.
by Alexandre Julliard
26 Nov '20
26 Nov '20
Module: wine Branch: master Commit: 6e1c296ef3b8cc37e595453365175f892f08b51f URL:
https://source.winehq.org/git/wine.git/?a=commit;h=6e1c296ef3b8cc37e5954533…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu Nov 26 12:42:54 2020 +0100 include: Make the CURRENT_STACK16 and CURRENT_DS macros available globally. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/krnl386.exe16/kernel16_private.h | 3 --- dlls/krnl386.exe16/thunk.c | 2 +- dlls/toolhelp.dll16/toolhelp.c | 10 ++++----- dlls/user.exe16/message.c | 40 ++++++++++++++--------------------- dlls/user.exe16/user.c | 24 ++++++++++----------- dlls/user.exe16/window.c | 3 +-- include/wine/winbase16.h | 4 ++++ 7 files changed, 38 insertions(+), 48 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=6e1c296ef3b8cc37e595…
1
0
0
0
Rémi Bernon : ntdll: Return failure from RtlQueryProcessDebugInformation.
by Alexandre Julliard
26 Nov '20
26 Nov '20
Module: wine Branch: master Commit: 97825b9c5311fd8f9b39fb6904fff06266de89b6 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=97825b9c5311fd8f9b39fb69…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Thu Nov 26 11:26:53 2020 +0100 ntdll: Return failure from RtlQueryProcessDebugInformation. Some DRM call it with GetCurrentThreadId(), although they don't seem to mind about the result. Signed-off-by: Rémi Bernon <rbernon(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ntdll/debugbuffer.c | 13 +++++++++++-- dlls/ntdll/tests/rtl.c | 19 +++++++++++++++++++ 2 files changed, 30 insertions(+), 2 deletions(-) diff --git a/dlls/ntdll/debugbuffer.c b/dlls/ntdll/debugbuffer.c index 3ac765d454e..9f5d214aacb 100644 --- a/dlls/ntdll/debugbuffer.c +++ b/dlls/ntdll/debugbuffer.c @@ -114,7 +114,16 @@ NTSTATUS WINAPI RtlDestroyQueryDebugBuffer(IN PDEBUG_BUFFER iBuf) NTSTATUS WINAPI RtlQueryProcessDebugInformation(IN ULONG iProcessId, IN ULONG iDebugInfoMask, IN OUT PDEBUG_BUFFER iBuf) { - NTSTATUS nts = STATUS_SUCCESS; + CLIENT_ID cid; + NTSTATUS status; + HANDLE process; + + cid.UniqueProcess = ULongToHandle( iProcessId ); + cid.UniqueThread = 0; + + if ((status = NtOpenProcess( &process, PROCESS_QUERY_LIMITED_INFORMATION, NULL, &cid ))) return status; + NtClose( process ); + FIXME("(%d, %x, %p): stub\n", iProcessId, iDebugInfoMask, iBuf); iBuf->InfoClassMask = iDebugInfoMask; @@ -139,5 +148,5 @@ NTSTATUS WINAPI RtlQueryProcessDebugInformation(IN ULONG iProcessId, IN ULONG iD } TRACE("returns:%p\n", iBuf); dump_DEBUG_BUFFER(iBuf); - return nts; + return status; } diff --git a/dlls/ntdll/tests/rtl.c b/dlls/ntdll/tests/rtl.c index 897be4fcd12..28dd02fd118 100644 --- a/dlls/ntdll/tests/rtl.c +++ b/dlls/ntdll/tests/rtl.c @@ -132,6 +132,24 @@ static void InitFunctionPtrs(void) ok(strlen(src) == 15, "Source must be 16 bytes long!\n"); } +static void test_RtlQueryProcessDebugInformation(void) +{ + DEBUG_BUFFER *buffer; + NTSTATUS status; + + buffer = RtlCreateQueryDebugBuffer( 0, 0 ); + ok( buffer != NULL, "RtlCreateQueryDebugBuffer returned NULL" ); + + status = RtlQueryProcessDebugInformation( GetCurrentThreadId(), PDI_HEAPS | PDI_HEAP_BLOCKS, buffer ); + ok( status == STATUS_INVALID_CID, "RtlQueryProcessDebugInformation returned %x\n", status ); + + status = RtlQueryProcessDebugInformation( GetCurrentProcessId(), PDI_HEAPS | PDI_HEAP_BLOCKS, buffer ); + ok( !status, "RtlQueryProcessDebugInformation returned %x\n", status ); + + status = RtlDestroyQueryDebugBuffer( buffer ); + ok( !status, "RtlDestroyQueryDebugBuffer returned %x\n", status ); +} + #define COMP(str1,str2,cmplen,len) size = RtlCompareMemory(str1, str2, cmplen); \ ok(size == len, "Expected %ld, got %ld\n", size, (SIZE_T)len) @@ -3668,6 +3686,7 @@ START_TEST(rtl) { InitFunctionPtrs(); + test_RtlQueryProcessDebugInformation(); test_RtlCompareMemory(); test_RtlCompareMemoryUlong(); test_RtlMoveMemory();
1
0
0
0
Rémi Bernon : server: Return STATUS_INVALID_CID from NtOpenProcess.
by Alexandre Julliard
26 Nov '20
26 Nov '20
Module: wine Branch: master Commit: e0a1bdf2bcdd58422d7f4c7f49c6dff5e441d47d URL:
https://source.winehq.org/git/wine.git/?a=commit;h=e0a1bdf2bcdd58422d7f4c7f…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Thu Nov 26 10:11:35 2020 +0100 server: Return STATUS_INVALID_CID from NtOpenProcess. When appropriate, instead of STATUS_INVALID_PARAMETER. Signed-off-by: Rémi Bernon <rbernon(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ntdll/tests/om.c | 6 +++--- server/process.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dlls/ntdll/tests/om.c b/dlls/ntdll/tests/om.c index 6687b8b6767..4f711f6b6b8 100644 --- a/dlls/ntdll/tests/om.c +++ b/dlls/ntdll/tests/om.c @@ -2060,17 +2060,17 @@ static void test_process(void) cid.UniqueProcess = 0; cid.UniqueThread = 0; status = pNtOpenProcess( &process, PROCESS_QUERY_LIMITED_INFORMATION, &attr, &cid ); - todo_wine ok( status == STATUS_INVALID_CID, "NtOpenProcess returned %x\n", status ); + ok( status == STATUS_INVALID_CID, "NtOpenProcess returned %x\n", status ); cid.UniqueProcess = ULongToHandle( 0xdeadbeef ); cid.UniqueThread = ULongToHandle( 0xdeadbeef ); status = pNtOpenProcess( &process, PROCESS_QUERY_LIMITED_INFORMATION, &attr, &cid ); - todo_wine ok( status == STATUS_INVALID_CID, "NtOpenProcess returned %x\n", status ); + ok( status == STATUS_INVALID_CID, "NtOpenProcess returned %x\n", status ); cid.UniqueProcess = ULongToHandle( GetCurrentThreadId() ); cid.UniqueThread = 0; status = pNtOpenProcess( &process, PROCESS_QUERY_LIMITED_INFORMATION, &attr, &cid ); - todo_wine ok( status == STATUS_INVALID_CID, "NtOpenProcess returned %x\n", status ); + ok( status == STATUS_INVALID_CID, "NtOpenProcess returned %x\n", status ); cid.UniqueProcess = ULongToHandle( GetCurrentProcessId() ); cid.UniqueThread = 0; diff --git a/server/process.c b/server/process.c index d5b9a2548cf..5b3e29e5dfd 100644 --- a/server/process.c +++ b/server/process.c @@ -778,7 +778,7 @@ struct process *get_process_from_id( process_id_t id ) struct object *obj = get_ptid_entry( id ); if (obj && obj->ops == &process_ops) return (struct process *)grab_object( obj ); - set_error( STATUS_INVALID_PARAMETER ); + set_error( STATUS_INVALID_CID ); return NULL; }
1
0
0
0
Rémi Bernon : ntdll/tests: Add tests for NtOpenProcess return status.
by Alexandre Julliard
26 Nov '20
26 Nov '20
Module: wine Branch: master Commit: 3326c578f3db6928e08d7d0d24e282b27be4b8cd URL:
https://source.winehq.org/git/wine.git/?a=commit;h=3326c578f3db6928e08d7d0d…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Thu Nov 26 10:11:34 2020 +0100 ntdll/tests: Add tests for NtOpenProcess return status. Signed-off-by: Rémi Bernon <rbernon(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ntdll/tests/om.c | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) diff --git a/dlls/ntdll/tests/om.c b/dlls/ntdll/tests/om.c index d3b932bec1d..6687b8b6767 100644 --- a/dlls/ntdll/tests/om.c +++ b/dlls/ntdll/tests/om.c @@ -73,6 +73,7 @@ static NTSTATUS (WINAPI *pNtQuerySystemTime)( LARGE_INTEGER * ); static NTSTATUS (WINAPI *pRtlWaitOnAddress)( const void *, const void *, SIZE_T, const LARGE_INTEGER * ); static void (WINAPI *pRtlWakeAddressAll)( const void * ); static void (WINAPI *pRtlWakeAddressSingle)( const void * ); +static NTSTATUS (WINAPI *pNtOpenProcess)( HANDLE *, ACCESS_MASK, const OBJECT_ATTRIBUTES *, const CLIENT_ID * ); #define KEYEDEVENT_WAIT 0x0001 #define KEYEDEVENT_WAKE 0x0002 @@ -2034,6 +2035,56 @@ static void test_wait_on_address(void) ok(address == 0, "got %s\n", wine_dbgstr_longlong(address)); } +static void test_process(void) +{ + OBJECT_ATTRIBUTES attr; + CLIENT_ID cid; + NTSTATUS status; + HANDLE process; + + if (!pNtOpenProcess) + { + win_skip( "NtOpenProcess not supported, skipping test\n" ); + return; + } + + InitializeObjectAttributes( &attr, NULL, 0, 0, NULL ); + + cid.UniqueProcess = 0; + cid.UniqueThread = 0; + status = pNtOpenProcess( &process, PROCESS_QUERY_LIMITED_INFORMATION, NULL, &cid ); + todo_wine ok( status == STATUS_ACCESS_VIOLATION, "NtOpenProcess returned %x\n", status ); + status = pNtOpenProcess( &process, PROCESS_QUERY_LIMITED_INFORMATION, &attr, NULL ); + todo_wine ok( status == STATUS_INVALID_PARAMETER_MIX, "NtOpenProcess returned %x\n", status ); + + cid.UniqueProcess = 0; + cid.UniqueThread = 0; + status = pNtOpenProcess( &process, PROCESS_QUERY_LIMITED_INFORMATION, &attr, &cid ); + todo_wine ok( status == STATUS_INVALID_CID, "NtOpenProcess returned %x\n", status ); + + cid.UniqueProcess = ULongToHandle( 0xdeadbeef ); + cid.UniqueThread = ULongToHandle( 0xdeadbeef ); + status = pNtOpenProcess( &process, PROCESS_QUERY_LIMITED_INFORMATION, &attr, &cid ); + todo_wine ok( status == STATUS_INVALID_CID, "NtOpenProcess returned %x\n", status ); + + cid.UniqueProcess = ULongToHandle( GetCurrentThreadId() ); + cid.UniqueThread = 0; + status = pNtOpenProcess( &process, PROCESS_QUERY_LIMITED_INFORMATION, &attr, &cid ); + todo_wine ok( status == STATUS_INVALID_CID, "NtOpenProcess returned %x\n", status ); + + cid.UniqueProcess = ULongToHandle( GetCurrentProcessId() ); + cid.UniqueThread = 0; + status = pNtOpenProcess( &process, PROCESS_QUERY_LIMITED_INFORMATION, &attr, &cid ); + ok( !status, "NtOpenProcess returned %x\n", status ); + pNtClose( process ); + + cid.UniqueProcess = ULongToHandle( GetCurrentProcessId() ); + cid.UniqueThread = ULongToHandle( GetCurrentThreadId() ); + status = pNtOpenProcess( &process, PROCESS_QUERY_LIMITED_INFORMATION, &attr, &cid ); + ok( !status, "NtOpenProcess returned %x\n", status ); + pNtClose( process ); +} + START_TEST(om) { HMODULE hntdll = GetModuleHandleA("ntdll.dll"); @@ -2082,6 +2133,7 @@ START_TEST(om) pRtlWaitOnAddress = (void *)GetProcAddress(hntdll, "RtlWaitOnAddress"); pRtlWakeAddressAll = (void *)GetProcAddress(hntdll, "RtlWakeAddressAll"); pRtlWakeAddressSingle = (void *)GetProcAddress(hntdll, "RtlWakeAddressSingle"); + pNtOpenProcess = (void *)GetProcAddress(hntdll, "NtOpenProcess"); test_case_sensitive(); test_namespace_pipe(); @@ -2096,4 +2148,5 @@ START_TEST(om) test_keyed_events(); test_null_device(); test_wait_on_address(); + test_process(); }
1
0
0
0
Nikolay Sivov : oleaut32: Use wide-char string literals.
by Alexandre Julliard
26 Nov '20
26 Nov '20
Module: wine Branch: master Commit: c4a9a296ba1e96af3cfc14e3da7c8612c7461b98 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=c4a9a296ba1e96af3cfc14e3…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Thu Nov 26 11:07:57 2020 +0300 oleaut32: Use wide-char string literals. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/oleaut32/oleaut.c | 41 ++++++----------- dlls/oleaut32/olefont.c | 50 +++++++-------------- dlls/oleaut32/olepicture.c | 6 +-- dlls/oleaut32/olepropframe.c | 4 +- dlls/oleaut32/typelib.c | 105 +++++++++++++++---------------------------- dlls/oleaut32/vartype.c | 17 +++---- 6 files changed, 73 insertions(+), 150 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=c4a9a296ba1e96af3cfc…
1
0
0
0
Zebediah Figura : mountmgr.sys: Add a comment advertising the HKLM\Software\Wine\Ports registry key.
by Alexandre Julliard
26 Nov '20
26 Nov '20
Module: wine Branch: master Commit: 067c077277a2fd5397419507698eda8f94101f57 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=067c077277a2fd5397419507…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Wed Nov 25 20:20:45 2020 -0600 mountmgr.sys: Add a comment advertising the HKLM\Software\Wine\Ports registry key. Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/mountmgr.sys/device.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dlls/mountmgr.sys/device.c b/dlls/mountmgr.sys/device.c index 6db088f11ee..ed345d110a4 100644 --- a/dlls/mountmgr.sys/device.c +++ b/dlls/mountmgr.sys/device.c @@ -2067,6 +2067,8 @@ static void create_port_devices( DRIVER_OBJECT *driver ) } p += 3; + /* @@ Wine registry key: HKLM\Software\Wine\Ports */ + RegCreateKeyExW( HKEY_LOCAL_MACHINE, ports_keyW, 0, NULL, 0, KEY_QUERY_VALUE, NULL, &wine_ports_key, NULL ); RegCreateKeyExW( HKEY_LOCAL_MACHINE, windows_ports_key_name, 0, NULL, REG_OPTION_VOLATILE,
1
0
0
0
← Newer
1
...
13
14
15
16
17
18
19
...
86
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
Results per page:
10
25
50
100
200