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
October 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
796 discussions
Start a n
N
ew thread
Paul Gofman : ntdll/tests: Test AVX context with debugger.
by Alexandre Julliard
13 Oct '20
13 Oct '20
Module: wine Branch: master Commit: fa409a91b0f13e478a43c9adc84d3c870bbae432 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=fa409a91b0f13e478a43c9ad…
Author: Paul Gofman <pgofman(a)codeweavers.com> Date: Fri Oct 9 16:03:56 2020 +0300 ntdll/tests: Test AVX context with debugger. Signed-off-by: Paul Gofman <pgofman(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ntdll/tests/exception.c | 144 ++++++++++++++++++++++++++++++++++++++----- 1 file changed, 127 insertions(+), 17 deletions(-) diff --git a/dlls/ntdll/tests/exception.c b/dlls/ntdll/tests/exception.c index 07b813ac1f..b2331b739a 100644 --- a/dlls/ntdll/tests/exception.c +++ b/dlls/ntdll/tests/exception.c @@ -189,6 +189,67 @@ static BOOL is_wow64; static BOOL have_vectored_api; static int test_stage; +#if defined(__i386__) || defined(__x86_64__) +static void test_debugger_xstate(HANDLE thread, CONTEXT *ctx, int stage) +{ + char context_buffer[sizeof(CONTEXT) + sizeof(CONTEXT_EX) + sizeof(XSTATE) + 63]; + CONTEXT_EX *c_ex; + NTSTATUS status; + YMMCONTEXT *ymm; + CONTEXT *xctx; + DWORD length; + XSTATE *xs; + M128A *xmm; + BOOL bret; + + if (!pRtlGetEnabledExtendedFeatures || !pRtlGetEnabledExtendedFeatures(1 << XSTATE_AVX)) + return; + + if (stage == 14) + return; + + length = sizeof(context_buffer); + bret = pInitializeContext(context_buffer, ctx->ContextFlags | CONTEXT_XSTATE, &xctx, &length); + ok(bret, "Got unexpected bret %#x, GetLastError() %u.\n", bret, GetLastError()); + + ymm = pLocateXStateFeature(xctx, XSTATE_AVX, &length); + ok(!!ymm, "Got zero ymm.\n"); + memset(ymm, 0xcc, sizeof(*ymm)); + + xmm = pLocateXStateFeature(xctx, XSTATE_LEGACY_SSE, &length); + ok(length == sizeof(*xmm) * (sizeof(void *) == 8 ? 16 : 8), "Got unexpected length %#x.\n", length); + ok(!!xmm, "Got zero xmm.\n"); + memset(xmm, 0xcc, length); + + status = pNtGetContextThread(thread, xctx); + ok(!status, "NtSetContextThread failed with 0x%x\n", status); + + c_ex = (CONTEXT_EX *)(xctx + 1); + xs = (XSTATE *)((char *)c_ex + c_ex->XState.Offset); + ok((xs->Mask & 7) == 4 || broken(!xs->Mask) /* Win7 */, + "Got unexpected xs->Mask %s.\n", wine_dbgstr_longlong(xs->Mask)); + + ok(xmm[0].Low == 0x200000001, "Got unexpected data %s.\n", wine_dbgstr_longlong(xmm[0].Low)); + ok(xmm[0].High == 0x400000003, "Got unexpected data %s.\n", wine_dbgstr_longlong(xmm[0].High)); + + ok(ymm->Ymm0.Low == 0x600000005 || broken(!xs->Mask && ymm->Ymm0.Low == 0xcccccccccccccccc) /* Win7 */, + "Got unexpected data %s.\n", wine_dbgstr_longlong(ymm->Ymm0.Low)); + ok(ymm->Ymm0.High == 0x800000007 || broken(!xs->Mask && ymm->Ymm0.High == 0xcccccccccccccccc) /* Win7 */, + "Got unexpected data %s.\n", wine_dbgstr_longlong(ymm->Ymm0.High)); + + xmm = pLocateXStateFeature(ctx, XSTATE_LEGACY_SSE, &length); + ok(!!xmm, "Got zero xmm.\n"); + + xmm[0].Low = 0x2828282828282828; + xmm[0].High = xmm[0].Low; + ymm->Ymm0.Low = 0x4848484848484848; + ymm->Ymm0.High = ymm->Ymm0.Low; + + status = pNtSetContextThread(thread, xctx); + ok(!status, "NtSetContextThread failed with 0x%x\n", status); +} +#endif + #ifdef __i386__ #ifndef __WINE_WINTRNL_H @@ -1055,7 +1116,7 @@ static void test_debugger(void) sizeof(stage), &size_read); ok(!status,"NtReadVirtualMemory failed with 0x%x\n", status); - ctx.ContextFlags = CONTEXT_FULL; + ctx.ContextFlags = CONTEXT_FULL | CONTEXT_EXTENDED_REGISTERS; status = pNtGetContextThread(pi.hThread, &ctx); ok(!status, "NtGetContextThread failed with 0x%x\n", status); @@ -1156,6 +1217,10 @@ static void test_debugger(void) if (stage == 12|| stage == 13) continuestatus = DBG_EXCEPTION_NOT_HANDLED; } + else if (stage == 14 || stage == 15) + { + test_debugger_xstate(pi.hThread, &ctx, stage); + } else ok(FALSE, "unexpected stage %x\n", stage); @@ -3331,6 +3396,10 @@ static void test_debugger(void) if (stage == 12|| stage == 13) continuestatus = DBG_EXCEPTION_NOT_HANDLED; } + else if (stage == 14 || stage == 15) + { + test_debugger_xstate(pi.hThread, &ctx, stage); + } else ok(FALSE, "unexpected stage %x\n", stage); @@ -5957,6 +6026,57 @@ static void test_breakpoint(DWORD numexc) pRtlRemoveVectoredExceptionHandler(vectored_handler); } +#if defined(__i386__) || defined(__x86_64__) +static BYTE except_code_set_ymm0[] = +{ +#ifdef __x86_64__ + 0x48, +#endif + 0xb8, /* mov imm,%ax */ + 0x00, 0x00, 0x00, 0x00, +#ifdef __x86_64__ + 0x00, 0x00, 0x00, 0x00, +#endif + + 0xc5, 0xfc, 0x10, 0x00, /* vmovups (%ax),%ymm0 */ + 0xcc, /* int3 */ + 0xc5, 0xfc, 0x11, 0x00, /* vmovups %ymm0,(%ax) */ + 0xc3, /* ret */ +}; + +static void test_debuggee_xstate(void) +{ + void (CDECL *func)(void) = code_mem; + unsigned int address_offset, i; + unsigned int data[8]; + + if (!pRtlGetEnabledExtendedFeatures || !pRtlGetEnabledExtendedFeatures(1 << XSTATE_AVX)) + { + memcpy(code_mem, breakpoint_code, sizeof(breakpoint_code)); + func(); + return; + } + + memcpy(code_mem, except_code_set_ymm0, sizeof(except_code_set_ymm0)); + address_offset = sizeof(void *) == 8 ? 2 : 1; + *(void **)((BYTE *)code_mem + address_offset) = data; + + for (i = 0; i < ARRAY_SIZE(data); ++i) + data[i] = i + 1; + + func(); + + for (i = 0; i < 4; ++i) + ok(data[i] == (test_stage == 14 ? i + 1 : 0x28282828), + "Got unexpected data %#x, test_stage %u, i %u.\n", data[i], test_stage, i); + + for ( ; i < ARRAY_SIZE(data); ++i) + ok(data[i] == (test_stage == 14 ? i + 1 : 0x48484848) + || broken(test_stage == 15 && data[i] == i + 1) /* Win7 */, + "Got unexpected data %#x, test_stage %u, i %u.\n", data[i], test_stage, i); +} +#endif + static DWORD invalid_handle_exceptions; static LONG CALLBACK invalid_handle_vectored_handler(EXCEPTION_POINTERS *ExceptionInfo) @@ -6593,22 +6713,6 @@ static void wait_for_thread_next_suspend(HANDLE thread) static void test_extended_context(void) { - static BYTE except_code_set_ymm0[] = - { -#ifdef __x86_64__ - 0x48, -#endif - 0xb8, /* mov imm,%ax */ - 0x00, 0x00, 0x00, 0x00, -#ifdef __x86_64__ - 0x00, 0x00, 0x00, 0x00, -#endif - - 0xc5, 0xfc, 0x10, 0x00, /* vmovups (%ax),%ymm0 */ - 0xcc, /* int3 */ - 0xc5, 0xfc, 0x11, 0x00, /* vmovups %ymm0,(%ax) */ - 0xc3, /* ret */ - }; static BYTE except_code_reset_ymm_state[] = { #ifdef __x86_64__ @@ -8029,6 +8133,12 @@ START_TEST(exception) test_closehandle(1, (HANDLE)0xdeadbeef); test_stage = 13; test_closehandle(0, 0); /* Special case. */ +#if defined(__i386__) || defined(__x86_64__) + test_stage = 14; + test_debuggee_xstate(); + test_stage = 15; + test_debuggee_xstate(); +#endif /* rest of tests only run in parent */ return;
1
0
0
0
Paul Gofman : ntdll/tests: Test getting and setting AVX registers for the other thread.
by Alexandre Julliard
13 Oct '20
13 Oct '20
Module: wine Branch: master Commit: 4e52f7ca865abf22c299501447805ab435399e27 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=4e52f7ca865abf22c2995014…
Author: Paul Gofman <pgofman(a)codeweavers.com> Date: Fri Oct 9 16:03:55 2020 +0300 ntdll/tests: Test getting and setting AVX registers for the other thread. Signed-off-by: Paul Gofman <pgofman(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ntdll/tests/exception.c | 362 ++++++++++++++++++++++++++++++------------- 1 file changed, 253 insertions(+), 109 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=4e52f7ca865abf22c299…
1
0
0
0
Paul Gofman : ntdll: Support AVX registers for other thread in Nt{Get|Set}ContextThread().
by Alexandre Julliard
13 Oct '20
13 Oct '20
Module: wine Branch: master Commit: 419abd49a1f816e5a869dbf4cc81114cd516138b URL:
https://source.winehq.org/git/wine.git/?a=commit;h=419abd49a1f816e5a869dbf4…
Author: Paul Gofman <pgofman(a)codeweavers.com> Date: Fri Oct 9 16:03:54 2020 +0300 ntdll: Support AVX registers for other thread in Nt{Get|Set}ContextThread(). Signed-off-by: Paul Gofman <pgofman(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ntdll/unix/server.c | 7 ++++++ dlls/ntdll/unix/signal_i386.c | 31 ++++++++++++++--------- dlls/ntdll/unix/signal_x86_64.c | 35 ++++++++++++++++++-------- dlls/ntdll/unix/thread.c | 36 +++++++++++++++++++++++--- dlls/ntdll/unix/unix_private.h | 56 +++++++++++++++++++++++++++++++++++------ include/wine/server_protocol.h | 5 ++++ server/protocol.def | 5 ++++ server/thread.c | 1 + server/trace.c | 6 +++++ 9 files changed, 148 insertions(+), 34 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=419abd49a1f816e5a869…
1
0
0
0
Paul Gofman : ntdll: Call FLS callbacks.
by Alexandre Julliard
13 Oct '20
13 Oct '20
Module: wine Branch: master Commit: ec1ea1ea1b2469a526f4bbc38aab404b7a2b062c URL:
https://source.winehq.org/git/wine.git/?a=commit;h=ec1ea1ea1b2469a526f4bbc3…
Author: Paul Gofman <pgofman(a)codeweavers.com> Date: Fri Oct 9 05:51:27 2020 +0300 ntdll: Call FLS callbacks. Signed-off-by: Paul Gofman <pgofman(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/kernel32/tests/fiber.c | 24 +++++++++++--- dlls/kernel32/tests/loader.c | 79 ++++++++++++++++++++++++++++++++------------ dlls/ntdll/loader.c | 8 ++++- dlls/ntdll/thread.c | 40 +++++++++++++++++++--- 4 files changed, 119 insertions(+), 32 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=ec1ea1ea1b2469a526f4…
1
0
0
0
Paul Gofman : ntdll: Zero all FLS slots instances in RtlFlsFree().
by Alexandre Julliard
13 Oct '20
13 Oct '20
Module: wine Branch: master Commit: 7341f4ad1e771f32d8276734774bfa9ba352f259 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=7341f4ad1e771f32d8276734…
Author: Paul Gofman <pgofman(a)codeweavers.com> Date: Fri Oct 9 05:51:26 2020 +0300 ntdll: Zero all FLS slots instances in RtlFlsFree(). Signed-off-by: Paul Gofman <pgofman(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ntdll/thread.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/dlls/ntdll/thread.c b/dlls/ntdll/thread.c index cf6bddab0b..95511391d3 100644 --- a/dlls/ntdll/thread.c +++ b/dlls/ntdll/thread.c @@ -392,7 +392,7 @@ NTSTATUS WINAPI DECLSPEC_HOTPATCH RtlFlsFree( ULONG index ) { unsigned int chunk_index, idx; FLS_INFO_CHUNK *chunk; - TEB_FLS_DATA *fls; + LIST_ENTRY *entry; lock_fls_data(); @@ -410,10 +410,15 @@ NTSTATUS WINAPI DECLSPEC_HOTPATCH RtlFlsFree( ULONG index ) return STATUS_INVALID_PARAMETER; } - if ((fls = NtCurrentTeb()->FlsSlots) && fls->fls_data_chunks[chunk_index]) + for (entry = fls_data.fls_list_head.Flink; entry != &fls_data.fls_list_head; entry = entry->Flink) { - /* FIXME: call Fls callback */ - fls->fls_data_chunks[chunk_index][idx + 1] = NULL; + TEB_FLS_DATA *fls = CONTAINING_RECORD(entry, TEB_FLS_DATA, fls_list_entry); + + if (fls->fls_data_chunks[chunk_index]) + { + /* FIXME: call Fls callback */ + fls->fls_data_chunks[chunk_index][idx + 1] = NULL; + } } --chunk->count;
1
0
0
0
Sven Baars : d3dcompiler: Fix a leak on error path (Coverity).
by Alexandre Julliard
13 Oct '20
13 Oct '20
Module: wine Branch: master Commit: 9f9fec18799bf59df6211b7294f8d338caa7f4db URL:
https://source.winehq.org/git/wine.git/?a=commit;h=9f9fec18799bf59df6211b72…
Author: Sven Baars <sbaars(a)codeweavers.com> Date: Sun Oct 4 22:39:11 2020 +0200 d3dcompiler: Fix a leak on error path (Coverity). Signed-off-by: Sven Baars <sbaars(a)codeweavers.com> Signed-off-by: Matteo Bruni <mbruni(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/d3dcompiler_43/utils.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dlls/d3dcompiler_43/utils.c b/dlls/d3dcompiler_43/utils.c index df39716b49..21ad98f2b5 100644 --- a/dlls/d3dcompiler_43/utils.c +++ b/dlls/d3dcompiler_43/utils.c @@ -1446,7 +1446,7 @@ static BOOL invert_swizzle(unsigned int *swizzle, unsigned int *writemask, unsig struct hlsl_ir_node *add_assignment(struct list *instrs, struct hlsl_ir_node *lhs, enum parse_assign_op assign_op, struct hlsl_ir_node *rhs) { - struct hlsl_ir_assignment *assign = d3dcompiler_alloc(sizeof(*assign)); + struct hlsl_ir_assignment *assign; struct hlsl_type *lhs_type; DWORD writemask = 0; @@ -1459,6 +1459,7 @@ struct hlsl_ir_node *add_assignment(struct list *instrs, struct hlsl_ir_node *lh return NULL; } + assign = d3dcompiler_alloc(sizeof(*assign)); if (!assign) { ERR("Out of memory\n");
1
0
0
0
Robert Wilhelm : vbscript: Support class default sub.
by Alexandre Julliard
13 Oct '20
13 Oct '20
Module: wine Branch: master Commit: 16fe2037fb2b3ddec1e6312b076cc76d88e9240a URL:
https://source.winehq.org/git/wine.git/?a=commit;h=16fe2037fb2b3ddec1e6312b…
Author: Robert Wilhelm <robert.wilhelm(a)gmx.net> Date: Tue Oct 13 18:58:21 2020 +0200 vbscript: Support class default sub. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=35744
Signed-off-by: Robert Wilhelm <robert.wilhelm(a)gmx.net> Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/vbscript/compile.c | 14 +++++++++++--- dlls/vbscript/parser.y | 2 +- dlls/vbscript/tests/lang.vbs | 30 ++++++++++++++++++++++++++++++ dlls/vbscript/vbdisp.c | 6 ++---- 4 files changed, 44 insertions(+), 8 deletions(-) diff --git a/dlls/vbscript/compile.c b/dlls/vbscript/compile.c index e9f6361aee..5c298ebe99 100644 --- a/dlls/vbscript/compile.c +++ b/dlls/vbscript/compile.c @@ -1668,6 +1668,7 @@ static BOOL lookup_class_funcs(class_desc_t *class_desc, const WCHAR *name) static HRESULT compile_class(compile_ctx_t *ctx, class_decl_t *class_decl) { function_decl_t *func_decl, *func_prop_decl; + BOOL is_default, have_default = FALSE; class_desc_t *class_desc; dim_decl_t *prop_decl; unsigned i; @@ -1690,14 +1691,21 @@ static HRESULT compile_class(compile_ctx_t *ctx, class_decl_t *class_decl) if(!class_desc->name) return E_OUTOFMEMORY; - class_desc->func_cnt = 1; /* always allocate slot for default getter */ + class_desc->func_cnt = 1; /* always allocate slot for default getter or method */ for(func_decl = class_decl->funcs; func_decl; func_decl = func_decl->next) { + is_default = FALSE; for(func_prop_decl = func_decl; func_prop_decl; func_prop_decl = func_prop_decl->next_prop_func) { - if(func_prop_decl->is_default) + if(func_prop_decl->is_default) { + if(have_default) { + FIXME("multiple default getters or methods\n"); + return E_FAIL; + } + is_default = have_default = TRUE; break; + } } - if(!func_prop_decl) + if(!is_default) class_desc->func_cnt++; } diff --git a/dlls/vbscript/parser.y b/dlls/vbscript/parser.y index 7e6cc17efd..942e76459c 100644 --- a/dlls/vbscript/parser.y +++ b/dlls/vbscript/parser.y @@ -993,7 +993,7 @@ static function_decl_t *new_function_decl(parser_ctx_t *ctx, const WCHAR *name, BOOL is_default = FALSE; if(storage_flags & STORAGE_IS_DEFAULT) { - if(type == FUNC_PROPGET) { + if(type == FUNC_PROPGET || type == FUNC_FUNCTION || type == FUNC_SUB) { is_default = TRUE; }else { FIXME("Invalid default property\n"); diff --git a/dlls/vbscript/tests/lang.vbs b/dlls/vbscript/tests/lang.vbs index fc762450a3..65f8a458cd 100644 --- a/dlls/vbscript/tests/lang.vbs +++ b/dlls/vbscript/tests/lang.vbs @@ -1750,6 +1750,36 @@ call ok(x.getprop.getprop().prop is obj, "x.getprop.getprop().prop is not obj (e ok getVT(x) = "VT_DISPATCH*", "getVT(x) = " & getVT(x) todo_wine_ok getVT(x()) = "VT_BSTR", "getVT(x()) = " & getVT(x()) +funcCalled = "" +class DefaultSubTest1 + Public default Sub init(a) + funcCalled = "init" & a + end sub +end class + +Set obj = New DefaultSubTest1 +obj.init(1) +call ok(funcCalled = "init1","funcCalled=" & funcCalled) +funcCalled = "" +obj(2) +call ok(funcCalled = "init2","funcCalled=" & funcCalled) + +class DefaultSubTest2 + Public Default Function init + funcCalled = "init" + end function +end class + +Set obj = New DefaultSubTest2 +funcCalled = "" +obj.init() +call ok(funcCalled = "init","funcCalled=" & funcCalled) +funcCalled = "" +' todo this is not yet supported +'funcCalled = "" +'obj() +'call ok(funcCalled = "init","funcCalled=" & funcCalled) + with nothing end with diff --git a/dlls/vbscript/vbdisp.c b/dlls/vbscript/vbdisp.c index 1ff1110e56..5f493d420b 100644 --- a/dlls/vbscript/vbdisp.c +++ b/dlls/vbscript/vbdisp.c @@ -38,19 +38,17 @@ static BOOL get_func_id(vbdisp_t *This, const WCHAR *name, vbdisp_invoke_type_t { unsigned i; - for(i = invoke_type == VBDISP_ANY ? 0 : 1; i < This->desc->func_cnt; i++) { + for(i = 0; i < This->desc->func_cnt; i++) { if(invoke_type == VBDISP_ANY) { if(!search_private && !This->desc->funcs[i].is_public) continue; - if(!i && !This->desc->funcs[0].name) /* default value may not exist */ - continue; }else { if(!This->desc->funcs[i].entries[invoke_type] || (!search_private && !This->desc->funcs[i].entries[invoke_type]->is_public)) continue; } - if(!wcsicmp(This->desc->funcs[i].name, name)) { + if(This->desc->funcs[i].name && !wcsicmp(This->desc->funcs[i].name, name)) { *id = i; return TRUE; }
1
0
0
0
Robert Wilhelm : vbscript: Add is_default flag to function_decl_t.
by Alexandre Julliard
13 Oct '20
13 Oct '20
Module: wine Branch: master Commit: 54740a5cb8dfb8ccedad988aaf46125893cebd15 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=54740a5cb8dfb8ccedad988a…
Author: Robert Wilhelm <robert.wilhelm(a)gmx.net> Date: Tue Oct 13 18:58:06 2020 +0200 vbscript: Add is_default flag to function_decl_t. Signed-off-by: Robert Wilhelm <robert.wilhelm(a)gmx.net> Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/vbscript/compile.c | 6 ++---- dlls/vbscript/interp.c | 2 +- dlls/vbscript/parse.h | 1 + dlls/vbscript/parser.y | 4 +++- dlls/vbscript/vbdisp.c | 2 +- dlls/vbscript/vbscript.h | 1 - 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/dlls/vbscript/compile.c b/dlls/vbscript/compile.c index 2e991b0c0a..e9f6361aee 100644 --- a/dlls/vbscript/compile.c +++ b/dlls/vbscript/compile.c @@ -1468,7 +1468,6 @@ static HRESULT compile_func(compile_ctx_t *ctx, statement_t *stat, function_t *f case FUNC_PROPGET: case FUNC_PROPLET: case FUNC_PROPSET: - case FUNC_DEFGET: ctx->prop_end_label = alloc_label(ctx); if(!ctx->prop_end_label) return E_OUTOFMEMORY; @@ -1630,7 +1629,6 @@ static HRESULT create_class_funcprop(compile_ctx_t *ctx, function_decl_t *func_d case FUNC_FUNCTION: case FUNC_SUB: case FUNC_PROPGET: - case FUNC_DEFGET: invoke_type = VBDISP_CALLGET; break; case FUNC_PROPLET: @@ -1696,7 +1694,7 @@ static HRESULT compile_class(compile_ctx_t *ctx, class_decl_t *class_decl) for(func_decl = class_decl->funcs; func_decl; func_decl = func_decl->next) { for(func_prop_decl = func_decl; func_prop_decl; func_prop_decl = func_prop_decl->next_prop_func) { - if(func_prop_decl->type == FUNC_DEFGET) + if(func_prop_decl->is_default) break; } if(!func_prop_decl) @@ -1710,7 +1708,7 @@ static HRESULT compile_class(compile_ctx_t *ctx, class_decl_t *class_decl) for(func_decl = class_decl->funcs, i=1; func_decl; func_decl = func_decl->next, i++) { for(func_prop_decl = func_decl; func_prop_decl; func_prop_decl = func_prop_decl->next_prop_func) { - if(func_prop_decl->type == FUNC_DEFGET) { + if(func_prop_decl->is_default) { i--; break; } diff --git a/dlls/vbscript/interp.c b/dlls/vbscript/interp.c index d58e89b7db..40d1e961cc 100644 --- a/dlls/vbscript/interp.c +++ b/dlls/vbscript/interp.c @@ -134,7 +134,7 @@ static HRESULT lookup_identifier(exec_ctx_t *ctx, BSTR name, vbdisp_invoke_type_ DISPID id; HRESULT hres; - if((ctx->func->type == FUNC_FUNCTION || ctx->func->type == FUNC_PROPGET || ctx->func->type == FUNC_DEFGET) + if((ctx->func->type == FUNC_FUNCTION || ctx->func->type == FUNC_PROPGET) && !wcsicmp(name, ctx->func->name)) { ref->type = REF_VAR; ref->u.v = &ctx->ret_val; diff --git a/dlls/vbscript/parse.h b/dlls/vbscript/parse.h index ab81bb3ae4..f5d8a616b9 100644 --- a/dlls/vbscript/parse.h +++ b/dlls/vbscript/parse.h @@ -184,6 +184,7 @@ typedef struct _function_decl_t { const WCHAR *name; function_type_t type; BOOL is_public; + BOOL is_default; arg_decl_t *args; statement_t *body; struct _function_decl_t *next; diff --git a/dlls/vbscript/parser.y b/dlls/vbscript/parser.y index cf94bdce46..7e6cc17efd 100644 --- a/dlls/vbscript/parser.y +++ b/dlls/vbscript/parser.y @@ -990,10 +990,11 @@ static function_decl_t *new_function_decl(parser_ctx_t *ctx, const WCHAR *name, unsigned storage_flags, arg_decl_t *arg_decl, statement_t *body) { function_decl_t *decl; + BOOL is_default = FALSE; if(storage_flags & STORAGE_IS_DEFAULT) { if(type == FUNC_PROPGET) { - type = FUNC_DEFGET; + is_default = TRUE; }else { FIXME("Invalid default property\n"); ctx->hres = E_FAIL; @@ -1008,6 +1009,7 @@ static function_decl_t *new_function_decl(parser_ctx_t *ctx, const WCHAR *name, decl->name = name; decl->type = type; decl->is_public = !(storage_flags & STORAGE_IS_PRIVATE); + decl->is_default = is_default; decl->args = arg_decl; decl->body = body; decl->next = NULL; diff --git a/dlls/vbscript/vbdisp.c b/dlls/vbscript/vbdisp.c index 36eba21e27..1ff1110e56 100644 --- a/dlls/vbscript/vbdisp.c +++ b/dlls/vbscript/vbdisp.c @@ -177,7 +177,7 @@ static HRESULT invoke_vbdisp(vbdisp_t *This, DISPID id, DWORD flags, BOOL extern switch(flags) { case DISPATCH_PROPERTYGET: func = This->desc->funcs[id].entries[VBDISP_CALLGET]; - if(!func || (func->type != FUNC_PROPGET && func->type != FUNC_DEFGET)) { + if(!func || func->type != FUNC_PROPGET) { WARN("no getter\n"); return DISP_E_MEMBERNOTFOUND; } diff --git a/dlls/vbscript/vbscript.h b/dlls/vbscript/vbscript.h index 869fb05b6e..afcce5eb9b 100644 --- a/dlls/vbscript/vbscript.h +++ b/dlls/vbscript/vbscript.h @@ -314,7 +314,6 @@ typedef enum { FUNC_PROPGET, FUNC_PROPLET, FUNC_PROPSET, - FUNC_DEFGET } function_type_t; typedef struct {
1
0
0
0
Sven Baars : mmdevapi/tests: Fix some test failures on Windows <= 7.
by Alexandre Julliard
13 Oct '20
13 Oct '20
Module: wine Branch: master Commit: a66bb83191381e0614fd0ed27ecce9c8d6dca72d URL:
https://source.winehq.org/git/wine.git/?a=commit;h=a66bb83191381e0614fd0ed2…
Author: Sven Baars <sbaars(a)codeweavers.com> Date: Sun Oct 11 13:20:22 2020 +0200 mmdevapi/tests: Fix some test failures on Windows <= 7. Signed-off-by: Sven Baars <sbaars(a)codeweavers.com> Signed-off-by: Andrew Eikum <aeikum(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/mmdevapi/tests/mmdevenum.c | 7 +++++ dlls/mmdevapi/tests/render.c | 60 ++++++++++++++++++++++------------------- 2 files changed, 40 insertions(+), 27 deletions(-) diff --git a/dlls/mmdevapi/tests/mmdevenum.c b/dlls/mmdevapi/tests/mmdevenum.c index 11df1f0229..4708c2fef8 100644 --- a/dlls/mmdevapi/tests/mmdevenum.c +++ b/dlls/mmdevapi/tests/mmdevenum.c @@ -218,6 +218,13 @@ static void test_ActivateAudioInterfaceAsync(void) h_mmdev = LoadLibraryA("mmdevapi.dll"); + pActivateAudioInterfaceAsync = (void*)GetProcAddress(h_mmdev, "ActivateAudioInterfaceAsync"); + if (!pActivateAudioInterfaceAsync) + { + win_skip("ActivateAudioInterfaceAsync is not supported on Win <= 7\n"); + return; + } + /* some applications look this up by ordinal */ pActivateAudioInterfaceAsync = (void*)GetProcAddress(h_mmdev, (char *)17); ok(pActivateAudioInterfaceAsync != NULL, "mmdevapi.ActivateAudioInterfaceAsync missing!\n"); diff --git a/dlls/mmdevapi/tests/render.c b/dlls/mmdevapi/tests/render.c index 5800ec5fd6..3ad00eaa2e 100644 --- a/dlls/mmdevapi/tests/render.c +++ b/dlls/mmdevapi/tests/render.c @@ -154,8 +154,11 @@ static void test_audioclient(void) hr = IMMDevice_Activate(dev, &IID_IAudioClient2, CLSCTX_INPROC_SERVER, NULL, (void**)&ac2); - ok(hr == S_OK, "IAudioClient2 Activation failed with %08x\n", hr); - IAudioClient2_Release(ac2); + ok(hr == S_OK || + broken(hr == E_NOINTERFACE) /* win7 */, + "IAudioClient2 Activation failed with %08x\n", hr); + if(hr == S_OK) + IAudioClient2_Release(ac2); hr = IMMDevice_Activate(dev, &IID_IAudioClient, CLSCTX_INPROC_SERVER, NULL, (void**)&ac); @@ -262,39 +265,42 @@ static void test_audioclient(void) } hr = IAudioClient_QueryInterface(ac, &IID_IAudioClient2, (void**)&ac2); - ok(hr == S_OK, "Failed to query IAudioClient2 interface: %08x\n", hr); - - hr = IAudioClient2_IsOffloadCapable(ac2, AudioCategory_BackgroundCapableMedia, NULL); - ok(hr == E_INVALIDARG, "IsOffloadCapable gave wrong error: %08x\n", hr); + if (hr == S_OK) + { + hr = IAudioClient2_IsOffloadCapable(ac2, AudioCategory_BackgroundCapableMedia, NULL); + ok(hr == E_INVALIDARG, "IsOffloadCapable gave wrong error: %08x\n", hr); - hr = IAudioClient2_IsOffloadCapable(ac2, AudioCategory_BackgroundCapableMedia, &offload_capable); - ok(hr == S_OK, "IsOffloadCapable failed: %08x\n", hr); + hr = IAudioClient2_IsOffloadCapable(ac2, AudioCategory_BackgroundCapableMedia, &offload_capable); + ok(hr == S_OK, "IsOffloadCapable failed: %08x\n", hr); - hr = IAudioClient2_SetClientProperties(ac2, NULL); - ok(hr == E_POINTER, "SetClientProperties with NULL props gave wrong error: %08x\n", hr); + hr = IAudioClient2_SetClientProperties(ac2, NULL); + ok(hr == E_POINTER, "SetClientProperties with NULL props gave wrong error: %08x\n", hr); - client_props.cbSize = 0; - client_props.bIsOffload = FALSE; - client_props.eCategory = AudioCategory_BackgroundCapableMedia; - client_props.Options = 0; + client_props.cbSize = 0; + client_props.bIsOffload = FALSE; + client_props.eCategory = AudioCategory_BackgroundCapableMedia; + client_props.Options = 0; - hr = IAudioClient2_SetClientProperties(ac2, &client_props); - ok(hr == E_INVALIDARG, "SetClientProperties with invalid cbSize gave wrong error: %08x\n", hr); + hr = IAudioClient2_SetClientProperties(ac2, &client_props); + ok(hr == E_INVALIDARG, "SetClientProperties with invalid cbSize gave wrong error: %08x\n", hr); - client_props.cbSize = sizeof(client_props); - client_props.bIsOffload = TRUE; + client_props.cbSize = sizeof(client_props); + client_props.bIsOffload = TRUE; - hr = IAudioClient2_SetClientProperties(ac2, &client_props); - if(!offload_capable) - ok(hr == AUDCLNT_E_ENDPOINT_OFFLOAD_NOT_CAPABLE, "SetClientProperties(offload) gave wrong error: %08x\n", hr); - else - ok(hr == S_OK, "SetClientProperties(offload) failed: %08x\n", hr); + hr = IAudioClient2_SetClientProperties(ac2, &client_props); + if(!offload_capable) + ok(hr == AUDCLNT_E_ENDPOINT_OFFLOAD_NOT_CAPABLE, "SetClientProperties(offload) gave wrong error: %08x\n", hr); + else + ok(hr == S_OK, "SetClientProperties(offload) failed: %08x\n", hr); - client_props.bIsOffload = FALSE; - hr = IAudioClient2_SetClientProperties(ac2, &client_props); - ok(hr == S_OK, "SetClientProperties failed: %08x\n", hr); + client_props.bIsOffload = FALSE; + hr = IAudioClient2_SetClientProperties(ac2, &client_props); + ok(hr == S_OK, "SetClientProperties failed: %08x\n", hr); - IAudioClient2_Release(ac2); + IAudioClient2_Release(ac2); + } + else + win_skip("IAudioClient2 is not present on Win <= 7\n"); hr = IAudioClient_QueryInterface(ac, &IID_IAudioClient3, (void**)&ac3); ok(hr == S_OK ||
1
0
0
0
Jacek Caban : server: Remove no longer needed screen_buffer fields.
by Alexandre Julliard
13 Oct '20
13 Oct '20
Module: wine Branch: master Commit: c58802d0f46860572b7c42818cf8681119d4db7e URL:
https://source.winehq.org/git/wine.git/?a=commit;h=c58802d0f46860572b7c4281…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Tue Oct 13 16:30:29 2020 +0200 server: Remove no longer needed screen_buffer fields. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- server/console.c | 90 ++------------------------------------------------------ 1 file changed, 2 insertions(+), 88 deletions(-) diff --git a/server/console.c b/server/console.c index 1cb4fd1659..9bcacff2c6 100644 --- a/server/console.c +++ b/server/console.c @@ -258,22 +258,6 @@ struct screen_buffer struct list entry; /* entry in list of all screen buffers */ struct console_input *input; /* associated console input */ unsigned int id; /* buffer id */ - unsigned int mode; /* output mode */ - int cursor_size; /* size of cursor (percentage filled) */ - int cursor_visible;/* cursor visibility flag */ - int cursor_x; /* position of cursor */ - int cursor_y; /* position of cursor */ - int width; /* size (w-h) of the screen buffer */ - int height; - int max_width; /* size (w-h) of the window given font size */ - int max_height; - char_info_t *data; /* the data for each cell - a width x height matrix */ - unsigned short attr; /* default fill attributes (screen colors) */ - unsigned short popup_attr; /* pop-up color attributes */ - unsigned int color_map[16]; /* color table */ - rectangle_t win; /* current visible window on the screen buffer * - * as seen in wineconsole */ - struct font_info font; /* console font information */ struct fd *fd; /* for bare console, attached output fd */ struct async_queue ioctl_q; /* ioctl queue */ }; @@ -412,8 +396,6 @@ static const struct fd_ops console_connection_fd_ops = static struct list screen_buffer_list = LIST_INIT(screen_buffer_list); -static const char_info_t empty_char_info = { ' ', 0x000f }; /* white on black space */ - static struct fd *console_input_get_fd( struct object* obj ) { struct console_input *console_input = (struct console_input*)obj; @@ -649,47 +631,17 @@ static void disconnect_console_server( struct console_server *server ) static void set_active_screen_buffer( struct console_input *console_input, struct screen_buffer *screen_buffer ) { - struct condrv_renderer_event evt; - if (console_input->active == screen_buffer) return; if (console_input->active) release_object( console_input->active ); console_input->active = (struct screen_buffer *)grab_object( screen_buffer ); if (console_input->server) queue_host_ioctl( console_input->server, IOCTL_CONDRV_ACTIVATE, screen_buffer->id, NULL, NULL ); - - evt.event = CONSOLE_RENDERER_SB_RESIZE_EVENT; - evt.u.resize.width = screen_buffer->width; - evt.u.resize.height = screen_buffer->height; - console_input_events_append( console_input, &evt ); - - evt.event = CONSOLE_RENDERER_DISPLAY_EVENT; - evt.u.display.left = screen_buffer->win.left; - evt.u.display.top = screen_buffer->win.top; - evt.u.display.width = screen_buffer->win.right - screen_buffer->win.left + 1; - evt.u.display.height = screen_buffer->win.bottom - screen_buffer->win.top + 1; - console_input_events_append( console_input, &evt ); - - evt.event = CONSOLE_RENDERER_UPDATE_EVENT; - evt.u.update.top = 0; - evt.u.update.bottom = screen_buffer->height - 1; - console_input_events_append( console_input, &evt ); - - evt.event = CONSOLE_RENDERER_CURSOR_GEOM_EVENT; - evt.u.cursor_geom.size = screen_buffer->cursor_size; - evt.u.cursor_geom.visible = screen_buffer->cursor_visible; - console_input_events_append( console_input, &evt ); - - evt.event = CONSOLE_RENDERER_CURSOR_POS_EVENT; - evt.u.cursor_pos.x = screen_buffer->cursor_x; - evt.u.cursor_pos.y = screen_buffer->cursor_y; - console_input_events_append( console_input, &evt ); } static struct object *create_console_output( struct console_input *console_input ) { struct screen_buffer *screen_buffer; - int i; if (console_input->last_id == ~0) { @@ -700,31 +652,8 @@ static struct object *create_console_output( struct console_input *console_input if (!(screen_buffer = alloc_object( &screen_buffer_ops ))) return NULL; - screen_buffer->id = ++console_input->last_id; - screen_buffer->mode = ENABLE_PROCESSED_OUTPUT | ENABLE_WRAP_AT_EOL_OUTPUT; - screen_buffer->input = console_input; - screen_buffer->cursor_size = 100; - screen_buffer->cursor_visible = 1; - screen_buffer->width = 80; - screen_buffer->height = 150; - screen_buffer->max_width = 80; - screen_buffer->max_height = 25; - screen_buffer->cursor_x = 0; - screen_buffer->cursor_y = 0; - screen_buffer->attr = 0x0F; - screen_buffer->popup_attr = 0xF5; - screen_buffer->win.left = 0; - screen_buffer->win.right = screen_buffer->max_width - 1; - screen_buffer->win.top = 0; - screen_buffer->win.bottom = screen_buffer->max_height - 1; - screen_buffer->data = NULL; - screen_buffer->font.width = 0; - screen_buffer->font.height = 0; - screen_buffer->font.weight = FW_NORMAL; - screen_buffer->font.pitch_family = FIXED_PITCH | FF_DONTCARE; - screen_buffer->font.face_name = NULL; - screen_buffer->font.face_len = 0; - memset( screen_buffer->color_map, 0, sizeof(screen_buffer->color_map) ); + screen_buffer->id = ++console_input->last_id; + screen_buffer->input = console_input; init_async_queue( &screen_buffer->ioctl_q ); list_add_head( &screen_buffer_list, &screen_buffer->entry ); @@ -737,19 +666,6 @@ static struct object *create_console_output( struct console_input *console_input } allow_fd_caching(screen_buffer->fd); - if (!(screen_buffer->data = malloc( screen_buffer->width * screen_buffer->height * - sizeof(*screen_buffer->data) ))) - { - release_object( screen_buffer ); - return NULL; - } - /* clear the first row */ - for (i = 0; i < screen_buffer->width; i++) screen_buffer->data[i] = empty_char_info; - /* and copy it to all other rows */ - for (i = 1; i < screen_buffer->height; i++) - memcpy( &screen_buffer->data[i * screen_buffer->width], screen_buffer->data, - screen_buffer->width * sizeof(char_info_t) ); - if (console_input->server) queue_host_ioctl( console_input->server, IOCTL_CONDRV_INIT_OUTPUT, screen_buffer->id, NULL, NULL ); if (!console_input->active) set_active_screen_buffer( console_input, screen_buffer ); @@ -966,8 +882,6 @@ static void screen_buffer_destroy( struct object *obj ) screen_buffer->id, NULL, NULL ); if (screen_buffer->fd) release_object( screen_buffer->fd ); free_async_queue( &screen_buffer->ioctl_q ); - free( screen_buffer->data ); - free( screen_buffer->font.face_name ); } static struct object *screen_buffer_open_file( struct object *obj, unsigned int access,
1
0
0
0
← Newer
1
...
37
38
39
40
41
42
43
...
80
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
Results per page:
10
25
50
100
200