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
February 2023
----- 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
599 discussions
Start a n
N
ew thread
Alex Henrie : winspool: Initialize nt_ppd in add_printer_driver.
by Alexandre Julliard
16 Feb '23
16 Feb '23
Module: wine Branch: master Commit: d0ce5a77c60e0a9613f1af03d67d13b89816441b URL:
https://gitlab.winehq.org/wine/wine/-/commit/d0ce5a77c60e0a9613f1af03d67d13…
Author: Alex Henrie <alexhenrie24(a)gmail.com> Date: Thu Feb 16 09:15:56 2023 -0700 winspool: Initialize nt_ppd in add_printer_driver. This prevents a bad free if RtlDosPathNameToNtPathName_U fails. --- dlls/winspool.drv/info.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/winspool.drv/info.c b/dlls/winspool.drv/info.c index 61017104ab1..456d5e2ecdf 100644 --- a/dlls/winspool.drv/info.c +++ b/dlls/winspool.drv/info.c @@ -635,7 +635,7 @@ static BOOL add_printer_driver( const WCHAR *name, const WCHAR *ppd_dir ) { WCHAR *ppd = get_ppd_filename( ppd_dir, name ); struct get_ppd_params ppd_params; - UNICODE_STRING nt_ppd; + UNICODE_STRING nt_ppd = { .Buffer = NULL }; DRIVER_INFO_3W di3; unsigned int i; BOOL res = FALSE;
1
0
0
0
Jason Millard : vbscript: Fix compile issue with non hex after concat without space.
by Alexandre Julliard
16 Feb '23
16 Feb '23
Module: wine Branch: master Commit: e8bd066514fb343790b3831d3e62709f80366d61 URL:
https://gitlab.winehq.org/wine/wine/-/commit/e8bd066514fb343790b3831d3e6270…
Author: Jason Millard <jsm174(a)gmail.com> Date: Wed Feb 15 16:56:28 2023 -0500 vbscript: Fix compile issue with non hex after concat without space. --- dlls/vbscript/lex.c | 2 +- dlls/vbscript/tests/lang.vbs | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/dlls/vbscript/lex.c b/dlls/vbscript/lex.c index 38ee4a5fd4b..8c5c69ea429 100644 --- a/dlls/vbscript/lex.c +++ b/dlls/vbscript/lex.c @@ -473,7 +473,7 @@ static int parse_next_token(void *lval, unsigned *loc, parser_ctx_t *ctx) case '#': return parse_date_literal(ctx, lval); case '&': - if(*++ctx->ptr == 'h' || *ctx->ptr == 'H') + if((*++ctx->ptr == 'h' || *ctx->ptr == 'H') && hex_to_int(ctx->ptr[1]) != -1) return parse_hex_literal(ctx, lval); return '&'; case '=': diff --git a/dlls/vbscript/tests/lang.vbs b/dlls/vbscript/tests/lang.vbs index 4a629627a16..77e132133b0 100644 --- a/dlls/vbscript/tests/lang.vbs +++ b/dlls/vbscript/tests/lang.vbs @@ -18,7 +18,7 @@ OPTION EXPLICIT : : DIM W -dim x, y, z, e +dim x, y, z, e, hi Dim obj call ok(true, "true is not true?") @@ -62,6 +62,11 @@ Call ok(&hfffe& = 65534, "&hfffe& <> -2") Call ok(&hffffffff& = -1, "&hffffffff& <> -1") Call ok((&h01or&h02)=3,"&h01or&h02 <> 3") +' Test concat when no space and var begins with h +hi = "y" +x = "x" &hi +Call ok(x = "xy", "x = " & x & " expected ""xy""") + W = 5 Call ok(W = 5, "W = " & W & " expected " & 5)
1
0
0
0
Alexandre Julliard : winedump: Dump the metadata of hybrid PE dlls.
by Alexandre Julliard
16 Feb '23
16 Feb '23
Module: wine Branch: master Commit: 7141332431e341e101124afc4e10de48fd5d0963 URL:
https://gitlab.winehq.org/wine/wine/-/commit/7141332431e341e101124afc4e10de…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu Feb 16 16:47:55 2023 +0100 winedump: Dump the metadata of hybrid PE dlls. --- tools/winedump/pe.c | 108 ++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 104 insertions(+), 4 deletions(-) diff --git a/tools/winedump/pe.c b/tools/winedump/pe.c index aa14750d3a1..34b34217d17 100644 --- a/tools/winedump/pe.c +++ b/tools/winedump/pe.c @@ -169,7 +169,7 @@ static const char *get_magic_type(WORD magic) return "???"; } -static ULONGLONG get_hybrid_metadata(void) +static const void *get_hybrid_metadata(void) { unsigned int size; @@ -179,7 +179,7 @@ static ULONGLONG get_hybrid_metadata(void) if (!cfg) return 0; size = min( size, cfg->Size ); if (size <= offsetof( IMAGE_LOAD_CONFIG_DIRECTORY64, CHPEMetadataPointer )) return 0; - return cfg->CHPEMetadataPointer; + return RVA( cfg->CHPEMetadataPointer - ((const IMAGE_OPTIONAL_HEADER64 *)&PE_nt_headers->OptionalHeader)->ImageBase, 1 ); } else { @@ -187,7 +187,7 @@ static ULONGLONG get_hybrid_metadata(void) if (!cfg) return 0; size = min( size, cfg->Size ); if (size <= offsetof( IMAGE_LOAD_CONFIG_DIRECTORY32, CHPEMetadataPointer )) return 0; - return cfg->CHPEMetadataPointer; + return RVA( cfg->CHPEMetadataPointer - PE_nt_headers->OptionalHeader.ImageBase, 1 ); } } @@ -430,7 +430,7 @@ void dump_file_header(const IMAGE_FILE_HEADER *fileHeader, BOOL is_hybrid) static void dump_pe_header(void) { - dump_file_header(&PE_nt_headers->FileHeader, get_hybrid_metadata() != 0); + dump_file_header(&PE_nt_headers->FileHeader, get_hybrid_metadata() != NULL); dump_optional_header((const IMAGE_OPTIONAL_HEADER32*)&PE_nt_headers->OptionalHeader, PE_nt_headers->FileHeader.SizeOfOptionalHeader); if (!PE_alt_headers) return; @@ -1799,6 +1799,104 @@ static void dump_dir_imported_functions(void) printf("\n"); } +static void dump_hybrid_metadata(void) +{ + unsigned int i; + const struct + { + unsigned int version; + unsigned int code_map; + unsigned int code_map_count; + unsigned int code_ranges_to_ep; + unsigned int redir_metadata; + unsigned int __os_arm64x_dispatch_call_no_redirect; + unsigned int __os_arm64x_dispatch_ret; + unsigned int __os_arm64x_check_call; + unsigned int __os_arm64x_check_icall; + unsigned int __os_arm64x_check_icall_cfg; + unsigned int alt_entry; + unsigned int aux_iat; + unsigned int code_ranges_to_ep_count; + unsigned int redir_metadata_count; + unsigned int __os_arm64x_get_x64_information; + unsigned int __os_arm64x_set_x64_information; + unsigned int except_data; + unsigned int except_data_size; + unsigned int __os_arm64x_jump; + unsigned int aux_iat_copy; + } *data = get_hybrid_metadata(); + + if (!data) return; + printf( "Hybrid metadata\n" ); + print_dword( "Version", data->version ); + print_dword( "Code map", data->code_map ); + print_dword( "Code map count", data->code_map_count ); + print_dword( "Code ranges to entry points", data->code_ranges_to_ep ); + print_dword( "Redirection metadata", data->redir_metadata ); + print_dword( "__os_arm64x_dispatch_call_no_redirect", data->__os_arm64x_dispatch_call_no_redirect ); + print_dword( "__os_arm64x_dispatch_ret", data->__os_arm64x_dispatch_ret ); + print_dword( "__os_arm64x_check_call", data->__os_arm64x_check_call ); + print_dword( "__os_arm64x_check_icall", data->__os_arm64x_check_icall ); + print_dword( "__os_arm64x_check_icall_cfg", data->__os_arm64x_check_icall_cfg ); + print_dword( "Alternate entry point", data->alt_entry ); + print_dword( "Auxiliary IAT", data->aux_iat ); + print_dword( "Code ranges to entry points count", data->code_ranges_to_ep_count ); + print_dword( "Redirection metadata count", data->redir_metadata_count ); + print_dword( "__os_arm64x_get_x64_information", data->__os_arm64x_get_x64_information ); + print_dword( "__os_arm64x_set_x64_information", data->__os_arm64x_set_x64_information ); + print_dword( "Exception data", data->except_data ); + print_dword( "Exception data size", data->except_data_size ); + print_dword( "__os_arm64x_jump", data->__os_arm64x_jump ); + print_dword( "Auxiliary IAT copy", data->aux_iat_copy ); + + if (data->code_map) + { + const struct + { + unsigned int start : 30; + unsigned int type : 2; + unsigned int len; + } *map = RVA( data->code_map, data->code_map_count * sizeof(*map) ); + + printf( "\nCode ranges\n" ); + for (i = 0; i < data->code_map_count; i++) + { + static const char *types[] = { "ARM64", "ARM64EC", "x64", "??" }; + unsigned int start = map[i].start & ~0x3; + unsigned int type = map[i].start & 0x3; + printf( " %08x - %08x %s\n", start, start + map[i].len, types[type] ); + } + } + + if (data->code_ranges_to_ep) + { + const struct + { + unsigned int start; + unsigned int end; + unsigned int func; + } *map = RVA( data->code_ranges_to_ep, data->code_ranges_to_ep_count * sizeof(*map) ); + + printf( "\nCode ranges to entry points\n" ); + printf( " Start - End Entry point\n" ); + for (i = 0; i < data->code_ranges_to_ep_count; i++) + printf( " %08x - %08x %08x\n", map[i].start, map[i].end, map[i].func ); + } + + if (data->redir_metadata) + { + const struct + { + unsigned int func; + unsigned int redir; + } *map = RVA( data->redir_metadata, data->redir_metadata_count * sizeof(*map) ); + + printf( "\nEntry point redirection\n" ); + for (i = 0; i < data->redir_metadata_count; i++) + printf( " %08x -> %08x\n", map[i].func, map[i].redir ); + } +} + static void dump_dir_loadconfig(void) { unsigned int dir, size, sizes[2]; @@ -1946,6 +2044,8 @@ static void dump_dir_loadconfig(void) print_dword( "GuardMemcpyFunctionPointer", loadcfg32->GuardMemcpyFunctionPointer ); } } + printf( "\n" ); + dump_hybrid_metadata(); } static void dump_dir_delay_imported_functions(void)
1
0
0
0
Alexandre Julliard : winedump: Dump the alternate version of some data directories for hybrid PE dlls.
by Alexandre Julliard
16 Feb '23
16 Feb '23
Module: wine Branch: master Commit: 385ce6276125ffcc211c7c0515f7f2ad9ee05db8 URL:
https://gitlab.winehq.org/wine/wine/-/commit/385ce6276125ffcc211c7c0515f7f2…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu Feb 16 14:29:20 2023 +0100 winedump: Dump the alternate version of some data directories for hybrid PE dlls. --- tools/winedump/pe.c | 588 +++++++++++++++++++++++++++++++++------------------- 1 file changed, 377 insertions(+), 211 deletions(-)
1
0
0
0
Brendan Shanks : ntdll: Use __ASM_LOCAL_LABEL in syscall dispatchers.
by Alexandre Julliard
16 Feb '23
16 Feb '23
Module: wine Branch: master Commit: 41e708dafa0e917951a9cfb331f97a09d46b2aa6 URL:
https://gitlab.winehq.org/wine/wine/-/commit/41e708dafa0e917951a9cfb331f97a…
Author: Brendan Shanks <bshanks(a)codeweavers.com> Date: Thu Feb 9 15:03:05 2023 -0800 ntdll: Use __ASM_LOCAL_LABEL in syscall dispatchers. Fixes compile error on ARM64 macOS. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=54256
--- dlls/ntdll/unix/signal_arm.c | 8 ++++---- dlls/ntdll/unix/signal_arm64.c | 8 ++++---- dlls/ntdll/unix/signal_i386.c | 8 ++++---- dlls/ntdll/unix/signal_x86_64.c | 6 +++--- 4 files changed, 15 insertions(+), 15 deletions(-) diff --git a/dlls/ntdll/unix/signal_arm.c b/dlls/ntdll/unix/signal_arm.c index 8180bc52b46..681c2e3c0c1 100644 --- a/dlls/ntdll/unix/signal_arm.c +++ b/dlls/ntdll/unix/signal_arm.c @@ -1701,7 +1701,7 @@ __ASM_GLOBAL_FUNC( __wine_syscall_dispatcher, "ldr r5, [r4]\n\t" /* table->ServiceTable */ "ldr ip, [r5, ip, lsl #2]\n\t" "blx ip\n" - ".L__wine_syscall_dispatcher_return:\n\t" + __ASM_LOCAL_LABEL("__wine_syscall_dispatcher_return") ":\n\t" "ldr ip, [r8, #0x44]\n\t" /* frame->restore_flags */ #ifndef __SOFTFP__ "tst ip, #4\n\t" /* CONTEXT_FLOATING_POINT */ @@ -1722,12 +1722,12 @@ __ASM_GLOBAL_FUNC( __wine_syscall_dispatcher, "5:\tmovw r0, #0x000d\n\t" /* STATUS_INVALID_PARAMETER */ "movt r0, #0xc000\n\t" "add sp, sp, #0x10\n\t" - "b .L__wine_syscall_dispatcher_return\n\t" + "b " __ASM_LOCAL_LABEL("__wine_syscall_dispatcher_return") "\n\t" ".globl " __ASM_NAME("__wine_syscall_dispatcher_return") "\n" __ASM_NAME("__wine_syscall_dispatcher_return") ":\n\t" "mov r8, r0\n\t" "mov r0, r1\n\t" - "b .L__wine_syscall_dispatcher_return" ) + "b " __ASM_LOCAL_LABEL("__wine_syscall_dispatcher_return") ) /*********************************************************************** @@ -1762,7 +1762,7 @@ __ASM_GLOBAL_FUNC( __wine_unix_call_dispatcher, "ldr sp, [r8, #0x38]\n\t" "add r8, r8, #0x10\n\t" "ldm r8, {r4-r12,pc}\n\t" - "1:\tb .L__wine_syscall_dispatcher_return" ) + "1:\tb " __ASM_LOCAL_LABEL("__wine_syscall_dispatcher_return") ) /*********************************************************************** diff --git a/dlls/ntdll/unix/signal_arm64.c b/dlls/ntdll/unix/signal_arm64.c index bd9818c808a..d94b335bc8d 100644 --- a/dlls/ntdll/unix/signal_arm64.c +++ b/dlls/ntdll/unix/signal_arm64.c @@ -1522,7 +1522,7 @@ __ASM_GLOBAL_FUNC( __wine_syscall_dispatcher, "ldr x16, [x16, x20, lsl 3]\n\t" "blr x16\n\t" "mov sp, x22\n" - ".L__wine_syscall_dispatcher_return:\n\t" + __ASM_LOCAL_LABEL("__wine_syscall_dispatcher_return") ":\n\t" "ldp x18, x19, [sp, #0x90]\n\t" "ldp x20, x21, [sp, #0xa0]\n\t" "ldp x22, x23, [sp, #0xb0]\n\t" @@ -1567,12 +1567,12 @@ __ASM_GLOBAL_FUNC( __wine_syscall_dispatcher, "ret x16\n" "4:\tmov x0, #0xc0000000\n\t" /* STATUS_INVALID_PARAMETER */ "movk x0, #0x000d\n\t" - "b .L__wine_syscall_dispatcher_return\n\t" + "b " __ASM_LOCAL_LABEL("__wine_syscall_dispatcher_return") "\n\t" ".globl " __ASM_NAME("__wine_syscall_dispatcher_return") "\n" __ASM_NAME("__wine_syscall_dispatcher_return") ":\n\t" "mov sp, x0\n\t" "mov x0, x1\n\t" - "b .L__wine_syscall_dispatcher_return" ) + "b " __ASM_LOCAL_LABEL("__wine_syscall_dispatcher_return") ) /*********************************************************************** @@ -1607,7 +1607,7 @@ __ASM_GLOBAL_FUNC( __wine_unix_call_dispatcher, "mov x0, x2\n\t" /* args */ "blr x16\n\t" "ldr w16, [sp, #0x10c]\n\t" /* frame->restore_flags */ - "cbnz w16, .L__wine_syscall_dispatcher_return\n\t" + "cbnz w16, " __ASM_LOCAL_LABEL("__wine_syscall_dispatcher_return") "\n\t" "ldr x18, [sp, #0x90]\n\t" "ldp x16, x17, [sp, #0xf8]\n\t" "mov sp, x16\n\t" diff --git a/dlls/ntdll/unix/signal_i386.c b/dlls/ntdll/unix/signal_i386.c index 1cea685d995..a567aa31b2a 100644 --- a/dlls/ntdll/unix/signal_i386.c +++ b/dlls/ntdll/unix/signal_i386.c @@ -2630,7 +2630,7 @@ __ASM_GLOBAL_FUNC( __wine_syscall_dispatcher, "call *(%eax,%edx,4)\n\t" "leal -0x34(%ebp),%esp\n" - ".L__wine_syscall_dispatcher_return:\t" + __ASM_LOCAL_LABEL("__wine_syscall_dispatcher_return") ":\t" __ASM_CFI_CFA_IS_AT1(esp, 0x0c) __ASM_CFI_REG_IS_AT1(esp, esp, 0x0c) __ASM_CFI_REG_IS_AT1(eip, esp, 0x08) @@ -2707,7 +2707,7 @@ __ASM_GLOBAL_FUNC( __wine_syscall_dispatcher, "iret\n" __ASM_CFI("\t.cfi_restore_state\n") "6:\tmovl $0xc000000d,%eax\n\t" /* STATUS_INVALID_PARAMETER */ - "jmp .L__wine_syscall_dispatcher_return\n\t" + "jmp " __ASM_LOCAL_LABEL("__wine_syscall_dispatcher_return") "\n\t" ".globl " __ASM_NAME("__wine_syscall_dispatcher_return") "\n" __ASM_NAME("__wine_syscall_dispatcher_return") ":\n\t" @@ -2722,7 +2722,7 @@ __ASM_GLOBAL_FUNC( __wine_syscall_dispatcher, "movl 8(%esp),%eax\n\t" "movl 4(%esp),%esp\n\t" __ASM_CFI(".cfi_restore_state\n\t") - "jmp .L__wine_syscall_dispatcher_return" ) + "jmp " __ASM_LOCAL_LABEL("__wine_syscall_dispatcher_return") ) /*********************************************************************** @@ -2769,7 +2769,7 @@ __ASM_GLOBAL_FUNC( __wine_unix_call_dispatcher, __ASM_CFI_REG_IS_AT1(esi, esp, 0x30) __ASM_CFI_REG_IS_AT1(ebp, esp, 0x34) "testw $0xffff,2(%esp)\n\t" /* frame->restore_flags */ - "jnz .L__wine_syscall_dispatcher_return\n\t" + "jnz " __ASM_LOCAL_LABEL("__wine_syscall_dispatcher_return") "\n\t" "movl 0x08(%esp),%ecx\n\t" /* frame->eip */ __ASM_CFI(".cfi_register %eip, %ecx\n\t") "movl 0x0c(%esp),%esp\n\t" /* frame->esp */ diff --git a/dlls/ntdll/unix/signal_x86_64.c b/dlls/ntdll/unix/signal_x86_64.c index 54babc7d964..13fe7051c66 100644 --- a/dlls/ntdll/unix/signal_x86_64.c +++ b/dlls/ntdll/unix/signal_x86_64.c @@ -2757,7 +2757,7 @@ __ASM_GLOBAL_FUNC( __wine_syscall_dispatcher, "leaq -0x98(%rbp),%rcx\n\t" /* $rcx is now pointing to "frame" again */ __ASM_CFI(".cfi_restore_state\n") - ".L__wine_syscall_dispatcher_return:\n\t" + __ASM_LOCAL_LABEL("__wine_syscall_dispatcher_return") ":\n\t" "movl 0x94(%rcx),%edx\n\t" /* frame->restore_flags */ #ifdef __linux__ "testl $12,%r14d\n\t" /* SYSCALL_HAVE_PTHREAD_TEB | SYSCALL_HAVE_WRFSGSBASE */ @@ -2849,7 +2849,7 @@ __ASM_GLOBAL_FUNC( __wine_syscall_dispatcher, __ASM_NAME("__wine_syscall_dispatcher_return") ":\n\t" "movl 0xb0(%rcx),%r14d\n\t" /* frame->syscall_flags */ "movq %rdx,%rax\n\t" - "jmp .L__wine_syscall_dispatcher_return" ) + "jmp " __ASM_LOCAL_LABEL("__wine_syscall_dispatcher_return") ) /*********************************************************************** @@ -2930,7 +2930,7 @@ __ASM_GLOBAL_FUNC( __wine_unix_call_dispatcher, "movdqa 0x240(%rcx),%xmm14\n\t" "movdqa 0x250(%rcx),%xmm15\n\t" "testl $0xffff,0x94(%rcx)\n\t" /* frame->restore_flags */ - "jnz .L__wine_syscall_dispatcher_return\n\t" + "jnz " __ASM_LOCAL_LABEL("__wine_syscall_dispatcher_return") "\n\t" #ifdef __linux__ "testl $12,%r14d\n\t" /* SYSCALL_HAVE_PTHREAD_TEB | SYSCALL_HAVE_WRFSGSBASE */ "jz 1f\n\t"
1
0
0
0
Brendan Shanks : include: Add __ASM_LOCAL_LABEL macro.
by Alexandre Julliard
16 Feb '23
16 Feb '23
Module: wine Branch: master Commit: 1362b0c04f1df59cfac7c3bfe60f5d43b8ba449b URL:
https://gitlab.winehq.org/wine/wine/-/commit/1362b0c04f1df59cfac7c3bfe60f5d…
Author: Brendan Shanks <bshanks(a)codeweavers.com> Date: Tue Feb 14 21:12:55 2023 -0800 include: Add __ASM_LOCAL_LABEL macro. --- include/wine/asm.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/include/wine/asm.h b/include/wine/asm.h index 2448f591189..61e197d9586 100644 --- a/include/wine/asm.h +++ b/include/wine/asm.h @@ -27,6 +27,12 @@ # define __ASM_NAME(name) name #endif +#if defined(__APPLE__) +# define __ASM_LOCAL_LABEL(label) "L" label +#else +# define __ASM_LOCAL_LABEL(label) ".L" label +#endif + #if defined(__WINE_PE_BUILD) && defined(__i386__) # define __ASM_STDCALL(name,args) "_" name "@" #args # define __ASM_FASTCALL(name,args) "@" name "@" #args
1
0
0
0
Rémi Bernon : dinput: Hook window threads instead of the entire prefix.
by Alexandre Julliard
16 Feb '23
16 Feb '23
Module: wine Branch: master Commit: e5c540c59b5642254b6e5731a93d3eeba543be7b URL:
https://gitlab.winehq.org/wine/wine/-/commit/e5c540c59b5642254b6e5731a93d3e…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Wed Feb 15 13:46:49 2023 +0100 dinput: Hook window threads instead of the entire prefix. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=54431
--- dlls/dinput/device_private.h | 1 + dlls/dinput/dinput_main.c | 32 ++++++++++++++++++++------------ 2 files changed, 21 insertions(+), 12 deletions(-) diff --git a/dlls/dinput/device_private.h b/dlls/dinput/device_private.h index f6030c5d088..ebe1b49da2f 100644 --- a/dlls/dinput/device_private.h +++ b/dlls/dinput/device_private.h @@ -95,6 +95,7 @@ struct dinput_device HWND win; enum device_status status; BOOL use_raw_input; /* use raw input instead of low-level messages */ + HHOOK cbt_hook; /* CBT hook to track foreground changes */ LPDIDEVICEOBJECTDATA data_queue; /* buffer for 'GetDeviceData'. */ int queue_len; /* valid size of the queue */ diff --git a/dlls/dinput/dinput_main.c b/dlls/dinput/dinput_main.c index 42541b9084a..0d502821966 100644 --- a/dlls/dinput/dinput_main.c +++ b/dlls/dinput/dinput_main.c @@ -61,7 +61,6 @@ struct input_thread_state UINT devices_count; HHOOK mouse_ll_hook; HHOOK keyboard_ll_hook; - HHOOK callwndproc_hook; RAWINPUTDEVICE rawinput_devices[2]; struct dinput_device *devices[INPUT_THREAD_MAX_DEVICES]; HANDLE events[INPUT_THREAD_MAX_DEVICES]; @@ -112,12 +111,21 @@ void dinput_hooks_unacquire_device( IDirectInputDevice8W *iface ) SendMessageW( di_em_win, INPUT_THREAD_NOTIFY, NOTIFY_REFRESH_DEVICES, 0 ); } +static void unhook_device_window_foreground_changes( struct dinput_device *device ) +{ + if (!device->cbt_hook) return; + UnhookWindowsHookEx( device->cbt_hook ); + device->cbt_hook = NULL; +} + static void dinput_device_internal_unacquire( IDirectInputDevice8W *iface, DWORD status ) { struct dinput_device *impl = impl_from_IDirectInputDevice8W( iface ); TRACE( "iface %p.\n", iface ); + unhook_device_window_foreground_changes( impl ); + EnterCriticalSection( &impl->crit ); if (impl->status == STATUS_ACQUIRED) { @@ -198,17 +206,26 @@ static LRESULT CALLBACK cbt_hook_proc( int code, WPARAM wparam, LPARAM lparam ) return CallNextHookEx( 0, code, wparam, lparam ); } +static void hook_device_window_foreground_changes( struct dinput_device *device ) +{ + DWORD tid, pid; + if (!(tid = GetWindowThreadProcessId( device->win, &pid ))) return; + device->cbt_hook = SetWindowsHookExW( WH_CBT, cbt_hook_proc, DINPUT_instance, tid ); +} + static void input_thread_update_device_list( struct input_thread_state *state ) { RAWINPUTDEVICE rawinput_keyboard = {.usUsagePage = HID_USAGE_PAGE_GENERIC, .usUsage = HID_USAGE_GENERIC_KEYBOARD, .dwFlags = RIDEV_REMOVE}; RAWINPUTDEVICE rawinput_mouse = {.usUsagePage = HID_USAGE_PAGE_GENERIC, .usUsage = HID_USAGE_GENERIC_MOUSE, .dwFlags = RIDEV_REMOVE}; - UINT count = 0, keyboard_ll_count = 0, mouse_ll_count = 0, foreground_count = 0; + UINT count = 0, keyboard_ll_count = 0, mouse_ll_count = 0; struct dinput_device *device; EnterCriticalSection( &dinput_hook_crit ); LIST_FOR_EACH_ENTRY( device, &acquired_device_list, struct dinput_device, entry ) { - if (device->dwCoopLevel & DISCL_FOREGROUND) foreground_count++; + unhook_device_window_foreground_changes( device ); + if (device->dwCoopLevel & DISCL_FOREGROUND) hook_device_window_foreground_changes( device ); + if (!device->read_event || !device->vtbl->read) continue; state->events[count] = device->read_event; dinput_device_internal_addref( (state->devices[count] = device) ); @@ -250,14 +267,6 @@ static void input_thread_update_device_list( struct input_thread_state *state ) state->devices_count = count; LeaveCriticalSection( &dinput_hook_crit ); - if (foreground_count && !state->callwndproc_hook) - state->callwndproc_hook = SetWindowsHookExW( WH_CBT, cbt_hook_proc, DINPUT_instance, 0 ); - else if (!foreground_count && state->callwndproc_hook) - { - UnhookWindowsHookEx( state->callwndproc_hook ); - state->callwndproc_hook = NULL; - } - if (keyboard_ll_count && !state->keyboard_ll_hook) state->keyboard_ll_hook = SetWindowsHookExW( WH_KEYBOARD_LL, input_thread_ll_hook_proc, DINPUT_instance, 0 ); else if (!keyboard_ll_count && state->keyboard_ll_hook) @@ -413,7 +422,6 @@ static DWORD WINAPI dinput_thread_proc( void *params ) } while (state.devices_count--) dinput_device_internal_release( state.devices[state.devices_count] ); - if (state.callwndproc_hook) UnhookWindowsHookEx( state.callwndproc_hook ); if (state.keyboard_ll_hook) UnhookWindowsHookEx( state.keyboard_ll_hook ); if (state.mouse_ll_hook) UnhookWindowsHookEx( state.mouse_ll_hook ); DestroyWindow( di_em_win );
1
0
0
0
Rémi Bernon : dinput: Forbid acquiring for other process windows.
by Alexandre Julliard
16 Feb '23
16 Feb '23
Module: wine Branch: master Commit: 7a2d59fb24ae6c6458339f1e8be1a7d160fc5d3c URL:
https://gitlab.winehq.org/wine/wine/-/commit/7a2d59fb24ae6c6458339f1e8be1a7…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Wed Feb 15 13:43:26 2023 +0100 dinput: Forbid acquiring for other process windows. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=54431
--- dlls/dinput/device.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/dlls/dinput/device.c b/dlls/dinput/device.c index c7b29da9271..c001d1ef29a 100644 --- a/dlls/dinput/device.c +++ b/dlls/dinput/device.c @@ -546,6 +546,7 @@ static HRESULT WINAPI dinput_device_Acquire( IDirectInputDevice8W *iface ) { struct dinput_device *impl = impl_from_IDirectInputDevice8W( iface ); HRESULT hr = DI_OK; + DWORD pid; TRACE( "iface %p.\n", iface ); @@ -556,6 +557,8 @@ static HRESULT WINAPI dinput_device_Acquire( IDirectInputDevice8W *iface ) hr = DIERR_INVALIDPARAM; else if ((impl->dwCoopLevel & DISCL_FOREGROUND) && impl->win != GetForegroundWindow()) hr = DIERR_OTHERAPPHASPRIO; + else if ((impl->dwCoopLevel & DISCL_FOREGROUND) && (!GetWindowThreadProcessId( impl->win, &pid ) || pid != GetCurrentProcessId())) + hr = DIERR_INVALIDPARAM; else { impl->status = STATUS_ACQUIRED;
1
0
0
0
Francois Gouget : riched20/tests: Add context to the EM_FORMATRANGE tests.
by Alexandre Julliard
16 Feb '23
16 Feb '23
Module: wine Branch: master Commit: 020145248371bbfd2e473e79ba873e8313dde72d URL:
https://gitlab.winehq.org/wine/wine/-/commit/020145248371bbfd2e473e79ba873e…
Author: Francois Gouget <fgouget(a)codeweavers.com> Date: Wed Feb 15 12:02:47 2023 +0100 riched20/tests: Add context to the EM_FORMATRANGE tests. --- dlls/riched20/tests/editor.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dlls/riched20/tests/editor.c b/dlls/riched20/tests/editor.c index 788491f3ffb..7c959680e84 100644 --- a/dlls/riched20/tests/editor.c +++ b/dlls/riched20/tests/editor.c @@ -5784,6 +5784,7 @@ static void test_EM_FORMATRANGE(void) SIZE stringsize; int len; + winetest_push_context("%d", i); SendMessageA(hwndRichEdit, WM_SETTEXT, 0, (LPARAM)fmtstrings[i].string); gtl.flags = GTL_NUMCHARS | GTL_PRECISE; @@ -5840,6 +5841,7 @@ static void test_EM_FORMATRANGE(void) todo_wine { ok(r == len, "Expected %d, got %d\n", len, r); } + winetest_pop_context(); } ReleaseDC(NULL, hdc);
1
0
0
0
Francois Gouget : riched20/tests: Check clipboard content after destroying the editor window.
by Alexandre Julliard
16 Feb '23
16 Feb '23
Module: wine Branch: master Commit: b5b5b0b365639b889a0240d4992e16174b428f75 URL:
https://gitlab.winehq.org/wine/wine/-/commit/b5b5b0b365639b889a0240d4992e16…
Author: Francois Gouget <fgouget(a)codeweavers.com> Date: Thu Jul 22 07:57:55 2021 +0200 riched20/tests: Check clipboard content after destroying the editor window. Destroying the editor window should render all the formats so they are still available after. --- dlls/riched20/tests/editor.c | 53 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) diff --git a/dlls/riched20/tests/editor.c b/dlls/riched20/tests/editor.c index ab741f23035..788491f3ffb 100644 --- a/dlls/riched20/tests/editor.c +++ b/dlls/riched20/tests/editor.c @@ -4791,6 +4791,36 @@ static DWORD CALLBACK test_EM_GETMODIFY_esCallback(DWORD_PTR dwCookie, return 0; } +#define open_clipboard(hwnd) open_clipboard_(__LINE__, hwnd) +static BOOL open_clipboard_(int line, HWND hwnd) +{ + DWORD start = GetTickCount(); + while (1) + { + BOOL ret = OpenClipboard(hwnd); + if (ret || GetLastError() != ERROR_ACCESS_DENIED) + return ret; + if (GetTickCount() - start > 100) + { + char classname[256]; + DWORD le = GetLastError(); + HWND clipwnd = GetOpenClipboardWindow(); + /* Provide a hint as to the source of interference: + * - The class name would typically be CLIPBRDWNDCLASS if the + * clipboard was opened by a Windows application using the + * ole32 API. + * - And it would be __wine_clipboard_manager if it was opened in + * response to a native application. + */ + GetClassNameA(clipwnd, classname, ARRAY_SIZE(classname)); + trace_(__FILE__, line)("%p (%s) opened the clipboard\n", clipwnd, classname); + SetLastError(le); + return ret; + } + Sleep(15); + } +} + static void test_EM_GETMODIFY(void) { HWND hwndRichEdit = new_richedit(NULL); @@ -4807,6 +4837,8 @@ static void test_EM_GETMODIFY(void) CHARFORMAT2A cf2; PARAFORMAT2 pf2; EDITSTREAM es; + BOOL r; + HANDLE hclip; HFONT testFont = CreateFontA (0,0,0,0,FW_LIGHT, 0, 0, 0, ANSI_CHARSET, OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS, DEFAULT_QUALITY, DEFAULT_PITCH | @@ -4953,7 +4985,28 @@ static void test_EM_GETMODIFY(void) ok (result != 0, "EM_GETMODIFY returned zero, instead of non-zero for EM_STREAM\n"); + /* Check that the clipboard data is still available after destroying the + * editor window. + */ + SendMessageA(hwndRichEdit, WM_SETTEXT, 0, (LPARAM)"Stayin' alive"); + SendMessageA(hwndRichEdit, EM_SETSEL, 8, -1); + SendMessageA(hwndRichEdit, WM_COPY, 0, 0); + DestroyWindow(hwndRichEdit); + + r = open_clipboard(NULL); + ok(r, "OpenClipboard failed le=%lu\n", GetLastError()); + + hclip = GetClipboardData(CF_TEXT); + todo_wine ok(hclip != NULL, "GetClipboardData() failed le=%lu\n", GetLastError()); + if (hclip) + { + const char* str = GlobalLock(hclip); + ok(strcmp(str, "alive") == 0, "unexpected clipboard content: %s\n", str); + GlobalUnlock(hclip); + } + + CloseClipboard(); } struct exsetsel_s {
1
0
0
0
← Newer
1
...
25
26
27
28
29
30
31
...
60
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
Results per page:
10
25
50
100
200