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
January 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
467 discussions
Start a n
N
ew thread
Francisco Casas : vkd3d-shader/hlsl: Validate that non-uniform objects are not referenced.
by Alexandre Julliard
19 Jan '23
19 Jan '23
Module: vkd3d Branch: master Commit: 17d6a4411eac6307c785a679a0f179b38a925bb4 URL:
https://gitlab.winehq.org/wine/vkd3d/-/commit/17d6a4411eac6307c785a679a0f17…
Author: Francisco Casas <fcasas(a)codeweavers.com> Date: Mon Dec 5 21:48:28 2022 -0300 vkd3d-shader/hlsl: Validate that non-uniform objects are not referenced. Note that in the future we should call validate_static_object_references() after DCE and pruning branches, because shaders such as these compile (at least in more modern versions of the native compiler): Branch pruning: ``` static RWTexture2D<float> tex; float4 main() : sv_target { if (0) { tex[int2(0, 0)] = 2; } return 0; } ``` DCE: ``` static Texture2D tex; uniform uint i; float4 main() : sv_target { float4 unused = tex.Load(int3(0, 1, 2)); return 0; } ``` These are "todo" tests in hlsl-static-initializer.shader_test that depend on this. --- libs/vkd3d-shader/hlsl_codegen.c | 33 ++++++++++++++++++++++++++------- tests/object-references.shader_test | 2 +- 2 files changed, 27 insertions(+), 8 deletions(-) diff --git a/libs/vkd3d-shader/hlsl_codegen.c b/libs/vkd3d-shader/hlsl_codegen.c index 71e515b8..5076274e 100644 --- a/libs/vkd3d-shader/hlsl_codegen.c +++ b/libs/vkd3d-shader/hlsl_codegen.c @@ -1009,26 +1009,45 @@ static bool validate_static_object_references(struct hlsl_ctx *ctx, struct hlsl_ { struct hlsl_ir_resource_load *load = hlsl_ir_resource_load(instr); - if (!hlsl_component_index_range_from_deref(ctx, &load->resource, &start, &count)) + if (!(load->resource.var->storage_modifiers & HLSL_STORAGE_UNIFORM)) + { + hlsl_error(ctx, &instr->loc, VKD3D_SHADER_ERROR_HLSL_NON_STATIC_OBJECT_REF, + "Loaded resource must have a single uniform source."); + } + else if (!hlsl_component_index_range_from_deref(ctx, &load->resource, &start, &count)) { hlsl_error(ctx, &instr->loc, VKD3D_SHADER_ERROR_HLSL_NON_STATIC_OBJECT_REF, "Loaded resource from \"%s\" must be determinable at compile time.", load->resource.var->name); note_non_static_deref_expressions(ctx, &load->resource, "loaded resource"); } - if (load->sampler.var && !hlsl_component_index_range_from_deref(ctx, &load->sampler, &start, &count)) + + if (load->sampler.var) { - hlsl_error(ctx, &instr->loc, VKD3D_SHADER_ERROR_HLSL_NON_STATIC_OBJECT_REF, - "Resource load sampler from \"%s\" must be determinable at compile time.", - load->sampler.var->name); - note_non_static_deref_expressions(ctx, &load->sampler, "resource load sampler"); + if (!(load->sampler.var->storage_modifiers & HLSL_STORAGE_UNIFORM)) + { + hlsl_error(ctx, &instr->loc, VKD3D_SHADER_ERROR_HLSL_NON_STATIC_OBJECT_REF, + "Resource load sampler must have a single uniform source."); + } + else if (!hlsl_component_index_range_from_deref(ctx, &load->sampler, &start, &count)) + { + hlsl_error(ctx, &instr->loc, VKD3D_SHADER_ERROR_HLSL_NON_STATIC_OBJECT_REF, + "Resource load sampler from \"%s\" must be determinable at compile time.", + load->sampler.var->name); + note_non_static_deref_expressions(ctx, &load->sampler, "resource load sampler"); + } } } else if (instr->type == HLSL_IR_RESOURCE_STORE) { struct hlsl_ir_resource_store *store = hlsl_ir_resource_store(instr); - if (!hlsl_component_index_range_from_deref(ctx, &store->resource, &start, &count)) + if (!(store->resource.var->storage_modifiers & HLSL_STORAGE_UNIFORM)) + { + hlsl_error(ctx, &instr->loc, VKD3D_SHADER_ERROR_HLSL_NON_STATIC_OBJECT_REF, + "Accessed resource must have a single uniform source."); + } + else if (!hlsl_component_index_range_from_deref(ctx, &store->resource, &start, &count)) { hlsl_error(ctx, &instr->loc, VKD3D_SHADER_ERROR_HLSL_NON_STATIC_OBJECT_REF, "Accessed resource from \"%s\" must be determinable at compile time.", diff --git a/tests/object-references.shader_test b/tests/object-references.shader_test index e33a7f38..67f86bc6 100644 --- a/tests/object-references.shader_test +++ b/tests/object-references.shader_test @@ -157,7 +157,7 @@ todo draw quad todo probe (0, 0) rgba (11.0, 12.0, 13.0, 11.0) -[pixel shader fail todo] +[pixel shader fail] float4 main(Texture2D tex2) : sv_target { Texture2D tex1;
1
0
0
0
Francisco Casas : tests: Add additional object references tests.
by Alexandre Julliard
19 Jan '23
19 Jan '23
Module: vkd3d Branch: master Commit: 97c966954400c8b2a9d3153708464233f32245e6 URL:
https://gitlab.winehq.org/wine/vkd3d/-/commit/97c966954400c8b2a9d3153708464…
Author: Francisco Casas <fcasas(a)codeweavers.com> Date: Mon Dec 5 21:38:50 2022 -0300 tests: Add additional object references tests. --- tests/hlsl-static-initializer.shader_test | 136 ++++++++++++++++++++++++++++++ tests/object-references.shader_test | 9 ++ tests/shader_runner_d3d12.c | 2 +- 3 files changed, 146 insertions(+), 1 deletion(-) diff --git a/tests/hlsl-static-initializer.shader_test b/tests/hlsl-static-initializer.shader_test index e959cd2b..480eae19 100644 --- a/tests/hlsl-static-initializer.shader_test +++ b/tests/hlsl-static-initializer.shader_test @@ -53,3 +53,139 @@ float4 main() : sv_target [test] draw quad probe all rgba (1.0, 2.0, 3.0, 4.0) + + +[sampler 0] +filter linear linear linear +address clamp clamp clamp + + +[texture 0] +size (1, 1) +1.0 2.0 3.0 4.0 + + +[pixel shader fail todo] +static Texture2D tex; +sampler sam; + +float4 main() : sv_target +{ + return tex.Sample(sam, int3(0, 0, 0)); +} + + +[pixel shader todo] +// This is allowed in 10.0.10011.16384 but not in 9.29.952.3111 +static Texture2D tex; + +float4 main() : sv_target +{ + return 0; +} + + +[pixel shader todo] +// This is allowed in 10.0.10011.16384 but not in 9.29.952.3111 +static Texture2D tex; +sampler sam; + +float4 main() : sv_target +{ + if (0) + return tex.Sample(sam, int3(0, 0, 0)); + else + return float4(0, 1, 2, 3); +} + + +[pixel shader todo] +// This is allowed in 10.0.10011.16384 but not in 9.29.952.3111 +static Texture2D tex; +sampler sam; +uniform uint i; + +float4 main() : sv_target +{ + float4 unused = tex.Sample(sam, int3(0, 1, 2)); + + return 0; +} + + +[pixel shader fail todo] +static Texture2D tex1; +sampler sam; + +float4 main() : sv_target +{ + static Texture2D tex2 = tex1; + return tex2.Sample(sam, int3(0, 0, 0)); +} + + +[pixel shader fail todo] +static Texture2D tex1; +sampler sam; + +float4 main(Texture2D tex2) : sv_target +{ + tex2 = tex1; + return tex2.Sample(sam, int3(0, 0, 0)); +} + + +[pixel shader] +Texture2D real_tex; +static Texture2D tex = real_tex; +sampler sam; + +float4 main() : sv_target +{ + return tex.Sample(sam, int3(0, 0, 0)); +} + +[test] +draw quad +probe all rgba (1, 2, 3, 4) + + +[pixel shader todo] +Texture2D real_tex; +static Texture2D tex; +sampler sam; + +float4 main() : sv_target +{ + tex = real_tex; + return tex.Sample(sam, int3(0, 0, 0)); +} + +[test] +todo draw quad +todo probe all rgba (1, 2, 3, 4) + + +[require] +shader model >= 5.0 + + +[uav 1] +format r32 float +size (1, 1) + +0.5 + + +[pixel shader todo] +// This is allowed in 10.0.10011.16384 but not in 9.29.952.3111 +static RWTexture2D<float> tex; + +float4 main() : sv_target +{ + if (0) + { + tex[int2(0, 0)] = 2; + } + return 0; +} diff --git a/tests/object-references.shader_test b/tests/object-references.shader_test index 12f745e6..e33a7f38 100644 --- a/tests/object-references.shader_test +++ b/tests/object-references.shader_test @@ -155,3 +155,12 @@ float4 main() : sv_target uniform 0 float 10.0 todo draw quad todo probe (0, 0) rgba (11.0, 12.0, 13.0, 11.0) + + +[pixel shader fail todo] +float4 main(Texture2D tex2) : sv_target +{ + Texture2D tex1; + tex2 = tex1; + return tex2.Load(int3(0, 0, 0)); +} diff --git a/tests/shader_runner_d3d12.c b/tests/shader_runner_d3d12.c index bb4d9c5a..bd94b4c9 100644 --- a/tests/shader_runner_d3d12.c +++ b/tests/shader_runner_d3d12.c @@ -167,7 +167,7 @@ static ID3D12RootSignature *d3d12_runner_create_root_signature(struct d3d12_shad ID3D12GraphicsCommandList *command_list, unsigned int *uniform_index) { D3D12_ROOT_SIGNATURE_DESC root_signature_desc = {0}; - D3D12_ROOT_PARAMETER root_params[3], *root_param; + D3D12_ROOT_PARAMETER root_params[4], *root_param; D3D12_STATIC_SAMPLER_DESC static_samplers[1]; ID3D12RootSignature *root_signature; HRESULT hr;
1
0
0
0
Giovanni Mascellani : tests: Test proper initialization of static structs to zero.
by Alexandre Julliard
19 Jan '23
19 Jan '23
Module: vkd3d Branch: master Commit: 207643b8e89091de7adbf52b2aa3697301f1eda8 URL:
https://gitlab.winehq.org/wine/vkd3d/-/commit/207643b8e89091de7adbf52b2aa36…
Author: Giovanni Mascellani <gmascellani(a)codeweavers.com> Date: Thu Dec 8 14:52:11 2022 -0300 tests: Test proper initialization of static structs to zero. --- tests/hlsl-static-initializer.shader_test | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/tests/hlsl-static-initializer.shader_test b/tests/hlsl-static-initializer.shader_test index 2ab25f65..e959cd2b 100644 --- a/tests/hlsl-static-initializer.shader_test +++ b/tests/hlsl-static-initializer.shader_test @@ -23,3 +23,33 @@ float4 main() : sv_target { return 1 / i; } + + +[pixel shader] +static struct +{ + float4 x; + float4 y; +} x; + +float4 main() : sv_target +{ + return 0; +} + + +[pixel shader] +static struct +{ + float4 x; + float3 y; +} x; + +float4 main() : sv_target +{ + return float4(1, 2, 3, 4) + x.x; +} + +[test] +draw quad +probe all rgba (1.0, 2.0, 3.0, 4.0)
1
0
0
0
Francisco Casas : vkd3d-shader/hlsl: Initialize static variables to 0 by default.
by Alexandre Julliard
19 Jan '23
19 Jan '23
Module: vkd3d Branch: master Commit: 5cfc8d378febb461984f06b3d0e8abadfa08e1f5 URL:
https://gitlab.winehq.org/wine/vkd3d/-/commit/5cfc8d378febb461984f06b3d0e8a…
Author: Francisco Casas <fcasas(a)codeweavers.com> Date: Fri Dec 2 17:20:59 2022 -0300 vkd3d-shader/hlsl: Initialize static variables to 0 by default. We are currently not initializing static values to zero by default. Consider the following shader: ```hlsl static float4 va; float4 main() : sv_target { return va; } ``` we get the following output: ``` ps_5_0 dcl_output o0.xyzw dcl_temps 2 mov r0.xyzw, r1.xyzw mov o0.xyzw, r0.xyzw ret ``` where r1.xyzw is not initialized. This patch solves this by assigning the static variable the value of an uint 0, and thus, relying on complex broadcasts. This seems to be the behaviour of the 9.29.952.3111 version of the native compiler, since it retrieves the following error on a shader that lacks an initializer on a data type with object components: ``` error X3017: cannot convert from 'uint' to 'struct <unnamed>' ``` --- libs/vkd3d-shader/hlsl.y | 35 +++++++++++++++++++++++++++++++ tests/hlsl-static-initializer.shader_test | 9 ++++++++ 2 files changed, 44 insertions(+) diff --git a/libs/vkd3d-shader/hlsl.y b/libs/vkd3d-shader/hlsl.y index 019c875c..73266006 100644 --- a/libs/vkd3d-shader/hlsl.y +++ b/libs/vkd3d-shader/hlsl.y @@ -2174,6 +2174,41 @@ static struct list *declare_vars(struct hlsl_ctx *ctx, struct hlsl_type *basic_t vkd3d_free(v->initializer.args); vkd3d_free(v->initializer.instrs); } + else if (var->storage_modifiers & HLSL_STORAGE_STATIC) + { + struct hlsl_ir_constant *zero; + struct hlsl_ir_store *store; + struct hlsl_ir_node *cast; + + /* Initialize statics to zero by default. */ + + if (type_has_object_components(var->data_type, false)) + { + hlsl_fixme(ctx, &var->loc, "Uninitialized static objects."); + vkd3d_free(v); + continue; + } + + if (!(zero = hlsl_new_uint_constant(ctx, 0, &var->loc))) + { + vkd3d_free(v); + continue; + } + list_add_tail(&ctx->static_initializers, &zero->node.entry); + + if (!(cast = add_cast(ctx, &ctx->static_initializers, &zero->node, var->data_type, &var->loc))) + { + vkd3d_free(v); + continue; + } + + if (!(store = hlsl_new_simple_store(ctx, var, cast))) + { + vkd3d_free(v); + continue; + } + list_add_tail(&ctx->static_initializers, &store->node.entry); + } vkd3d_free(v); } vkd3d_free(var_list); diff --git a/tests/hlsl-static-initializer.shader_test b/tests/hlsl-static-initializer.shader_test index 526fc99d..2ab25f65 100644 --- a/tests/hlsl-static-initializer.shader_test +++ b/tests/hlsl-static-initializer.shader_test @@ -14,3 +14,12 @@ float4 main() : sv_target [test] draw quad todo probe all rgba (0.8, 0.0, 0.0, 0.0) + + +[pixel shader fail] +static uint i; + +float4 main() : sv_target +{ + return 1 / i; +}
1
0
0
0
Gabriel Ivăncescu : notepad: Fix uninitialized upper 64-bits of `pos` in DoFind.
by Alexandre Julliard
18 Jan '23
18 Jan '23
Module: wine Branch: master Commit: 929fdbbf5541d0139492b6e5072e0cb410073776 URL:
https://gitlab.winehq.org/wine/wine/-/commit/929fdbbf5541d0139492b6e5072e0c…
Author: Gabriel Ivăncescu <gabrielopcode(a)gmail.com> Date: Wed Jan 18 18:30:14 2023 +0200 notepad: Fix uninitialized upper 64-bits of `pos` in DoFind. And get rid of the hacky casts. Signed-off-by: Gabriel Ivăncescu <gabrielopcode(a)gmail.com> --- programs/notepad/main.c | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/programs/notepad/main.c b/programs/notepad/main.c index 930884d144f..829cd7af33b 100644 --- a/programs/notepad/main.c +++ b/programs/notepad/main.c @@ -441,10 +441,10 @@ static LPWSTR NOTEPAD_StrRStr(LPWSTR pszSource, LPWSTR pszLast, LPWSTR pszSrch) */ void NOTEPAD_DoFind(FINDREPLACEW *fr) { - LPWSTR content; + LPWSTR content, found; int len = lstrlenW(fr->lpstrFindWhat); int fileLen; - SIZE_T pos; + DWORD pos; fileLen = GetWindowTextLengthW(Globals.hEdit) + 1; content = HeapAlloc(GetProcessHeap(), 0, fileLen * sizeof(WCHAR)); @@ -455,27 +455,24 @@ void NOTEPAD_DoFind(FINDREPLACEW *fr) switch (fr->Flags & (FR_DOWN|FR_MATCHCASE)) { case 0: - pos = StrRStrIW(content, content+pos-len, fr->lpstrFindWhat) - content; - if (pos == -(SIZE_T)content) pos = ~(SIZE_T)0; + found = StrRStrIW(content, content+pos-len, fr->lpstrFindWhat); break; case FR_DOWN: - pos = StrStrIW(content+pos, fr->lpstrFindWhat) - content; - if (pos == -(SIZE_T)content) pos = ~(SIZE_T)0; + found = StrStrIW(content+pos, fr->lpstrFindWhat); break; case FR_MATCHCASE: - pos = NOTEPAD_StrRStr(content, content+pos-len, fr->lpstrFindWhat) - content; - if (pos == -(SIZE_T)content) pos = ~(SIZE_T)0; + found = NOTEPAD_StrRStr(content, content+pos-len, fr->lpstrFindWhat); break; case FR_DOWN|FR_MATCHCASE: - pos = StrStrW(content+pos, fr->lpstrFindWhat) - content; - if (pos == -(SIZE_T)content) pos = ~(SIZE_T)0; + found = StrStrW(content+pos, fr->lpstrFindWhat); break; default: /* shouldn't happen */ return; } + pos = found - content; HeapFree(GetProcessHeap(), 0, content); - if (pos == ~(SIZE_T)0) + if (!found) { DIALOG_StringMsgBox(Globals.hFindReplaceDlg, STRING_NOTFOUND, fr->lpstrFindWhat, MB_ICONINFORMATION|MB_OK);
1
0
0
0
Francois Gouget : d3d12/tests: Allow a broken Windows 10 1709 hresult.
by Alexandre Julliard
18 Jan '23
18 Jan '23
Module: wine Branch: master Commit: 8ddf8daa529667d326c274c5e4e3958a57b583da URL:
https://gitlab.winehq.org/wine/wine/-/commit/8ddf8daa529667d326c274c5e4e395…
Author: Francois Gouget <fgouget(a)codeweavers.com> Date: Fri Jan 13 13:08:49 2023 +0100 d3d12/tests: Allow a broken Windows 10 1709 hresult. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=54298
--- dlls/d3d12/tests/d3d12.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dlls/d3d12/tests/d3d12.c b/dlls/d3d12/tests/d3d12.c index 0d3deafda45..33c8ad8dfff 100644 --- a/dlls/d3d12/tests/d3d12.c +++ b/dlls/d3d12/tests/d3d12.c @@ -1409,7 +1409,8 @@ static void test_desktop_window(void) swapchain_desc.Width = rect.right; swapchain_desc.Height = rect.bottom; hr = IDXGIFactory4_CreateSwapChainForHwnd(factory, queue, window, &swapchain_desc, NULL, NULL, &swapchain); - ok(hr == E_ACCESSDENIED, "Got unexpected hr %#lx.\n", hr); + ok(hr == E_ACCESSDENIED || broken(hr == E_OUTOFMEMORY /* win10 1709 */), + "Got unexpected hr %#lx.\n", hr); IDXGIFactory4_Release(factory); destroy_test_context(&context);
1
0
0
0
Eric Pouech : kernel32/tests: Filter spurious thread creation debug events.
by Alexandre Julliard
18 Jan '23
18 Jan '23
Module: wine Branch: master Commit: 8aeca16ca552dd61b6efd1dc66c995f29dfe66b0 URL:
https://gitlab.winehq.org/wine/wine/-/commit/8aeca16ca552dd61b6efd1dc66c995…
Author: Eric Pouech <eric.pouech(a)gmail.com> Date: Wed Jan 18 16:24:01 2023 +0100 kernel32/tests: Filter spurious thread creation debug events. On windows, we get some test failures as un-expected thread create debug events are sent. Try to filter them out in a couple of places. Signed-off-by: Eric Pouech <eric.pouech(a)gmail.com> --- dlls/kernel32/tests/debugger.c | 60 +++++++++++++++++++++++++++++++----------- 1 file changed, 45 insertions(+), 15 deletions(-) diff --git a/dlls/kernel32/tests/debugger.c b/dlls/kernel32/tests/debugger.c index cc6265fcd97..513db658222 100644 --- a/dlls/kernel32/tests/debugger.c +++ b/dlls/kernel32/tests/debugger.c @@ -452,15 +452,20 @@ static void process_attach_events(struct debugger_context *ctx, BOOL pass_except /* Win11 doesn't generate it at this point (Win <= 10 do) */ if (ctx->ev.dwDebugEventCode == CREATE_THREAD_DEBUG_EVENT) { - DWORD last_thread; + DWORD last_threads[5]; + unsigned thd_idx = 0, i; /* sometimes (at least Win10) several thread creations are reported here */ do { - last_thread = ctx->ev.dwThreadId; + if (thd_idx < ARRAY_SIZE(last_threads)) + last_threads[thd_idx++] = ctx->ev.dwThreadId; next_event(ctx, WAIT_EVENT_TIMEOUT); } while (ctx->ev.dwDebugEventCode == CREATE_THREAD_DEBUG_EVENT); - ok(ctx->ev.dwThreadId == last_thread, "unexpected thread\n"); + ok(thd_idx <= ARRAY_SIZE(last_threads), "too many threads created\n"); + for (i = 0; i < thd_idx; i++) + if (last_threads[i] == ctx->ev.dwThreadId) break; + ok(i < thd_idx, "unexpected thread\n"); ok(ctx->ev.dwDebugEventCode == EXCEPTION_DEBUG_EVENT, "dwDebugEventCode = %ld\n", ctx->ev.dwDebugEventCode); ok(ctx->ev.u.Exception.ExceptionRecord.ExceptionCode == EXCEPTION_BREAKPOINT, "ExceptionCode = %lx\n", @@ -1303,11 +1308,10 @@ static void expect_exception_(unsigned line, struct debugger_context *ctx, DWORD ctx->ev.u.Exception.ExceptionRecord.ExceptionCode, exception_code); } -#define expect_breakpoint_exception(a,b) expect_breakpoint_exception_(__LINE__,a,b) -static void expect_breakpoint_exception_(unsigned line, struct debugger_context *ctx, const void *expect_addr) +#define check_breakpoint_exception(a,b) expect_breakpoint_exception_(__LINE__,a,b) +static void check_breakpoint_exception_(unsigned line, struct debugger_context *ctx, const void *expect_addr) { struct debuggee_thread *thread; - expect_exception_(line, ctx, EXCEPTION_BREAKPOINT); if (!expect_addr) return; ok_(__FILE__,line)(ctx->ev.u.Exception.ExceptionRecord.ExceptionAddress == expect_addr, "ExceptionAddress = %p expected %p\n", ctx->ev.u.Exception.ExceptionRecord.ExceptionAddress, expect_addr); @@ -1317,6 +1321,13 @@ static void expect_breakpoint_exception_(unsigned line, struct debugger_context get_ip(&thread->ctx), expect_addr); } +#define expect_breakpoint_exception(a,b) expect_breakpoint_exception_(__LINE__,a,b) +static void expect_breakpoint_exception_(unsigned line, struct debugger_context *ctx, const void *expect_addr) +{ + expect_exception_(line, ctx, EXCEPTION_BREAKPOINT); + check_breakpoint_exception_(line, ctx, expect_addr); +} + #define single_step(a,b,c) single_step_(__LINE__,a,b,c) static void single_step_(unsigned line, struct debugger_context *ctx, struct debuggee_thread *thread, void *expect_addr) { @@ -1599,15 +1610,31 @@ static void test_debugger(const char *argv0) ok(pNtResumeProcess != NULL, "pNtResumeProcess not found\n"); if (pNtSuspendProcess && pNtResumeProcess) { + DWORD action = DBG_REPLY_LATER; status = pNtSuspendProcess(pi.hProcess); ok(!status, "NtSuspendProcess failed, last error:%lu\n", GetLastError()); - ret = ContinueDebugEvent(ctx.ev.dwProcessId, ctx.ev.dwThreadId, DBG_REPLY_LATER); - ok(ret, "ContinueDebugEvent failed, last error:%lu\n", GetLastError()); - ok(!WaitForDebugEvent(&ctx.ev, POLL_EVENT_TIMEOUT), "WaitForDebugEvent succeeded.\n"); + do + { + ret = ContinueDebugEvent(ctx.ev.dwProcessId, ctx.ev.dwThreadId, action); + ok(ret, "ContinueDebugEvent failed, last error:%lu\n", GetLastError()); + ret = WaitForDebugEvent(&ctx.ev, POLL_EVENT_TIMEOUT); + ok(!ret || ctx.ev.dwDebugEventCode == CREATE_THREAD_DEBUG_EVENT, "WaitForDebugEvent succeeded.\n"); + if (ret) add_thread(&ctx, ctx.ev.dwThreadId); + action = DBG_CONTINUE; + } while (ret); status = NtResumeThread(thread_b, NULL); ok(!status, "NtResumeThread failed, last error:%lu\n", GetLastError()); - ok(!WaitForDebugEvent(&ctx.ev, POLL_EVENT_TIMEOUT), "WaitForDebugEvent succeeded.\n"); + while (WaitForDebugEvent(&ctx.ev, POLL_EVENT_TIMEOUT)) + { + ok(ctx.ev.dwDebugEventCode == CREATE_THREAD_DEBUG_EVENT, "Unexpected debug event %lx\n", ctx.ev.dwDebugEventCode); + if (ctx.ev.dwDebugEventCode == CREATE_THREAD_DEBUG_EVENT) + { + add_thread(&ctx, ctx.ev.dwThreadId); + ret = ContinueDebugEvent(ctx.ev.dwProcessId, ctx.ev.dwThreadId, DBG_CONTINUE); + ok(ret, "ContinueDebugEvent failed, last error:%lu\n", GetLastError()); + } + } status = pNtResumeProcess(pi.hProcess); ok(!status, "pNtResumeProcess failed, last error:%lu\n", GetLastError()); @@ -1739,9 +1766,11 @@ static void test_debugger(const char *argv0) thread = CreateRemoteThread(pi.hProcess, NULL, 0, (void*)thread_proc, NULL, 0, &tid); ok(thread != NULL, "CreateRemoteThread failed: %lu\n", GetLastError()); - next_event(&ctx, WAIT_EVENT_TIMEOUT); - ok(ctx.ev.dwDebugEventCode == CREATE_THREAD_DEBUG_EVENT, "dwDebugEventCode = %ld\n", ctx.ev.dwDebugEventCode); - ok(ctx.ev.dwThreadId == tid, "Unexpected thread id\n"); + do + { + next_event(&ctx, WAIT_EVENT_TIMEOUT); + ok(ctx.ev.dwDebugEventCode == CREATE_THREAD_DEBUG_EVENT, "dwDebugEventCode = %ld\n", ctx.ev.dwDebugEventCode); + } while (ctx.ev.dwDebugEventCode == CREATE_THREAD_DEBUG_EVENT && ctx.ev.dwThreadId != tid); ok(ctx.ev.u.CreateThread.lpStartAddress == (void*)thread_proc, "Unexpected thread's start address\n"); ret = CloseHandle(thread); @@ -1752,7 +1781,8 @@ static void test_debugger(const char *argv0) ret = WriteProcessMemory(pi.hProcess, thread_proc + 1, &byte, 1, NULL); ok(ret, "WriteProcessMemory failed: %lu\n", GetLastError()); - expect_breakpoint_exception(&ctx, thread_proc + 1); + wait_for_breakpoint(&ctx); + check_breakpoint_exception(&ctx, thread_proc + 1); exception_cnt = 1; byte = 0xc3; /* ret */ @@ -1874,7 +1904,7 @@ static void test_debugger(const char *argv0) SetEvent(event); ResumeThread(ctx.main_thread->handle); - next_event(&ctx, 2000); + next_event_filter(&ctx, 2000, event_mask(CREATE_THREAD_DEBUG_EVENT)); ok(ctx.ev.dwDebugEventCode == EXCEPTION_DEBUG_EVENT, "dwDebugEventCode = %ld\n", ctx.ev.dwDebugEventCode); ok(ctx.ev.u.Exception.ExceptionRecord.ExceptionCode == EXCEPTION_BREAKPOINT, "ExceptionCode = %lx\n", ctx.ev.u.Exception.ExceptionRecord.ExceptionCode);
1
0
0
0
Eric Pouech : kernel32/tests: Merge two debug event loops in test_debugger().
by Alexandre Julliard
18 Jan '23
18 Jan '23
Module: wine Branch: master Commit: 982472d8953fab6356c43a322f794d3f29ae3971 URL:
https://gitlab.winehq.org/wine/wine/-/commit/982472d8953fab6356c43a322f794d…
Author: Eric Pouech <eric.pouech(a)gmail.com> Date: Wed Jan 18 16:24:00 2023 +0100 kernel32/tests: Merge two debug event loops in test_debugger(). Current test in debugger expects that all breakpoint debug events appear before all the exit thread events. On Windows, it happens that sometimes the breakpoint and exit thread events are intertwined (making the test fail). So, this patch: - merges the exception events loop and the exit thread events loop into a single loop. - detects the unordered sequence (mark it broken as windows only) - extends the test so that we check that all exit thread events are received. - introduce next_event_filter helper to not return some unwanted events. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=47874
Signed-off-by: Eric Pouech <eric.pouech(a)gmail.com> --- dlls/kernel32/tests/debugger.c | 58 +++++++++++++++++++++++++++++++----------- 1 file changed, 43 insertions(+), 15 deletions(-) diff --git a/dlls/kernel32/tests/debugger.c b/dlls/kernel32/tests/debugger.c index a190fc6f3f3..cc6265fcd97 100644 --- a/dlls/kernel32/tests/debugger.c +++ b/dlls/kernel32/tests/debugger.c @@ -391,12 +391,25 @@ static void next_event_(unsigned line, struct debugger_context *ctx, unsigned ti ctx->current_thread = get_debuggee_thread(ctx, ctx->ev.dwThreadId); } +static DWORD event_mask(DWORD ev) +{ + return (ev >= 1 && ev <= 7) ? (1LU << ev) : 0; +} + +#define next_event_filter(a, b,c) next_event_filter_(__LINE__, (a), (b), (c)) +static void next_event_filter_(unsigned line, struct debugger_context *ctx, DWORD timeout, DWORD mask) +{ + do + { + next_event_(line, ctx, timeout); + } while (event_mask(ctx->ev.dwDebugEventCode) & mask); +} + #define wait_for_breakpoint(a) wait_for_breakpoint_(__LINE__,a) static void wait_for_breakpoint_(unsigned line, struct debugger_context *ctx) { - do next_event_(line, ctx, WAIT_EVENT_TIMEOUT); - while (ctx->ev.dwDebugEventCode == LOAD_DLL_DEBUG_EVENT || ctx->ev.dwDebugEventCode == UNLOAD_DLL_DEBUG_EVENT - || ctx->ev.dwDebugEventCode == CREATE_THREAD_DEBUG_EVENT); + next_event_filter_(line, ctx, WAIT_EVENT_TIMEOUT, + event_mask(LOAD_DLL_DEBUG_EVENT) | event_mask(UNLOAD_DLL_DEBUG_EVENT) | event_mask(CREATE_THREAD_DEBUG_EVENT)); ok_(__FILE__,line)(ctx->ev.dwDebugEventCode == EXCEPTION_DEBUG_EVENT, "dwDebugEventCode = %ld\n", ctx->ev.dwDebugEventCode); ok_(__FILE__,line)(ctx->ev.u.Exception.ExceptionRecord.ExceptionCode == EXCEPTION_BREAKPOINT, "ExceptionCode = %lx\n", @@ -1710,6 +1723,8 @@ static void test_debugger(const char *argv0) if (sizeof(loop_code) > 1) { + unsigned event_order = 0; + memset(buf, OP_BP, sizeof(buf)); memcpy(proc_code, &loop_code, sizeof(loop_code)); ret = WriteProcessMemory(pi.hProcess, mem, buf, sizeof(buf), NULL); @@ -1720,11 +1735,14 @@ static void test_debugger(const char *argv0) worker_cnt = 20; for (i = 0; i < worker_cnt; i++) { - thread = CreateRemoteThread(pi.hProcess, NULL, 0, (void*)thread_proc, NULL, 0, NULL); + DWORD tid; + thread = CreateRemoteThread(pi.hProcess, NULL, 0, (void*)thread_proc, NULL, 0, &tid); ok(thread != NULL, "CreateRemoteThread failed: %lu\n", GetLastError()); next_event(&ctx, WAIT_EVENT_TIMEOUT); ok(ctx.ev.dwDebugEventCode == CREATE_THREAD_DEBUG_EVENT, "dwDebugEventCode = %ld\n", ctx.ev.dwDebugEventCode); + ok(ctx.ev.dwThreadId == tid, "Unexpected thread id\n"); + ok(ctx.ev.u.CreateThread.lpStartAddress == (void*)thread_proc, "Unexpected thread's start address\n"); ret = CloseHandle(thread); ok(ret, "CloseHandle failed, last error %ld.\n", GetLastError()); @@ -1741,6 +1759,11 @@ static void test_debugger(const char *argv0) ret = WriteProcessMemory(pi.hProcess, thread_proc + 1, &byte, 1, NULL); ok(ret, "WriteProcessMemory failed: %lu\n", GetLastError()); + /* One would expect that we get all exception debug events (for the worker threads + * that hit the BP instruction), then the exit thread events for all created threads. + * It happens that on Windows, the exception & exit thread events can be intertwined. + * So detect this situation. + */ for (;;) { DEBUG_EVENT ev; @@ -1753,26 +1776,31 @@ static void test_debugger(const char *argv0) ret = WaitForDebugEvent(&ev, 10); ok(GetLastError() == ERROR_SEM_TIMEOUT, "WaitForDebugEvent returned %x(%lu)\n", ret, GetLastError()); - next_event(&ctx, POLL_EVENT_TIMEOUT); - if (ctx.ev.dwDebugEventCode != EXCEPTION_DEBUG_EVENT) break; + for (;;) + { + next_event_filter(&ctx, POLL_EVENT_TIMEOUT, event_mask(CREATE_THREAD_DEBUG_EVENT)); + if (ctx.ev.dwDebugEventCode == EXCEPTION_DEBUG_EVENT) break; + if (ctx.ev.dwDebugEventCode == EXIT_THREAD_DEBUG_EVENT) + { + if (event_order == 0) event_order = 1; /* first exit thread event */ + if (!--worker_cnt) break; + } + } + if (!worker_cnt) break; + + ok(ctx.ev.dwDebugEventCode == EXCEPTION_DEBUG_EVENT, "dwDebugEventCode = %ld\n", ctx.ev.dwDebugEventCode); trace("exception at %p in thread %04lx\n", ctx.ev.u.Exception.ExceptionRecord.ExceptionAddress, ctx.ev.dwThreadId); ok(ctx.ev.u.Exception.ExceptionRecord.ExceptionCode == EXCEPTION_BREAKPOINT, "ExceptionCode = %lx\n", ctx.ev.u.Exception.ExceptionRecord.ExceptionCode); ok(ctx.ev.u.Exception.ExceptionRecord.ExceptionAddress == thread_proc + 1, "ExceptionAddress = %p\n", ctx.ev.u.Exception.ExceptionRecord.ExceptionAddress); exception_cnt++; + if (event_order == 1) event_order = 2; /* exception debug event after exit thread event */ } trace("received %u exceptions\n", exception_cnt); - - for (;;) - { - ok(ctx.ev.dwDebugEventCode == EXIT_THREAD_DEBUG_EVENT - || broken(ctx.ev.dwDebugEventCode == CREATE_THREAD_DEBUG_EVENT), /* sometimes happens on vista */ - "dwDebugEventCode = %ld\n", ctx.ev.dwDebugEventCode); - if (ctx.ev.dwDebugEventCode == EXIT_THREAD_DEBUG_EVENT && !--worker_cnt) break; - next_event(&ctx, WAIT_EVENT_TIMEOUT); - } + ok(!worker_cnt, "Missing %u exit thread events\n", worker_cnt); + ok(event_order == 1 || broken(event_order == 2), "Intertwined exit thread & exception debug events\n"); } if (OP_BP)
1
0
0
0
Robert Wilhelm : vbscript/tests: Fix chr() tests with double-byte character sets.
by Alexandre Julliard
18 Jan '23
18 Jan '23
Module: wine Branch: master Commit: 6895ad6f9c074904316f1f8936729ef66ee474dc URL:
https://gitlab.winehq.org/wine/wine/-/commit/6895ad6f9c074904316f1f8936729e…
Author: Robert Wilhelm <robert.wilhelm(a)gmx.net> Date: Fri Jan 13 18:35:57 2023 +0100 vbscript/tests: Fix chr() tests with double-byte character sets. There are no errors when running chr(-1) e.g. in utf-8 locale. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=54003
--- dlls/vbscript/tests/api.vbs | 9 ++++++++- dlls/vbscript/tests/run.c | 12 ++++++++++++ 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/dlls/vbscript/tests/api.vbs b/dlls/vbscript/tests/api.vbs index 459d3ace33e..903593ebd60 100644 --- a/dlls/vbscript/tests/api.vbs +++ b/dlls/vbscript/tests/api.vbs @@ -150,7 +150,7 @@ Call ok(Chr("120") = "x", "Chr(""120"") = " & Chr("120")) sub testChrError on error resume next - if isEnglishLang then + if MaxCharSize = 1 then call Err.clear() call Chr(-1) call ok(Err.number = 5, "Err.number = " & Err.number) @@ -159,6 +159,13 @@ sub testChrError call Err.clear() call Chr(256) call ok(Err.number = 5, "Err.number = " & Err.number) + else + call Err.clear() + call Chr(-1) + call ok(Err.number = 0, "Err.number = " & Err.number) + call Err.clear() + call Chr(256) + call ok(Err.number = 0, "Err.number = " & Err.number) end if call Err.clear() diff --git a/dlls/vbscript/tests/run.c b/dlls/vbscript/tests/run.c index 022d714dea5..4158aa28197 100644 --- a/dlls/vbscript/tests/run.c +++ b/dlls/vbscript/tests/run.c @@ -147,6 +147,7 @@ DEFINE_EXPECT(OnLeaveScript); #define DISPID_GLOBAL_UNKOBJ 1026 #define DISPID_GLOBAL_THROWEXCEPTION 1027 #define DISPID_GLOBAL_ISARRAYFIXED 1028 +#define DISPID_GLOBAL_MAXCHARSIZE 1029 #define DISPID_TESTOBJ_PROPGET 2000 #define DISPID_TESTOBJ_PROPPUT 2001 @@ -158,6 +159,7 @@ DEFINE_EXPECT(OnLeaveScript); #define MAKE_VBSERROR(code) MAKE_HRESULT(SEVERITY_ERROR, FACILITY_VBS, code) static BOOL strict_dispid_check, is_english, allow_ui; +static UINT MaxCharSize; static int first_day_of_week; static const char *test_name = "(null)"; static int test_counter; @@ -229,6 +231,7 @@ static const char *vt2a(VARIANT *v) */ static void detect_locale(void) { + CPINFOEXA cpinfo; HMODULE kernel32 = GetModuleHandleA("kernel32.dll"); LANGID (WINAPI *pGetThreadUILanguage)(void) = (void*)GetProcAddress(kernel32, "GetThreadUILanguage"); @@ -236,6 +239,9 @@ static void detect_locale(void) PRIMARYLANGID(GetUserDefaultUILanguage()) == LANG_ENGLISH && PRIMARYLANGID(GetUserDefaultLangID()) == LANG_ENGLISH); + GetCPInfoExA( CP_ACP, 0, &cpinfo ); + MaxCharSize = cpinfo.MaxCharSize; + GetLocaleInfoA(LOCALE_USER_DEFAULT, LOCALE_IFIRSTDAYOFWEEK | LOCALE_RETURN_NUMBER, (void*)&first_day_of_week, sizeof(first_day_of_week)); first_day_of_week = 1 + (first_day_of_week + 1) % 7; @@ -1142,6 +1148,7 @@ static HRESULT WINAPI Global_GetDispID(IDispatchEx *iface, BSTR bstrName, DWORD { L"reportSuccess", DISPID_GLOBAL_REPORTSUCCESS, REF_EXPECT(global_success_d) }, { L"getVT", DISPID_GLOBAL_GETVT }, { L"isEnglishLang", DISPID_GLOBAL_ISENGLANG }, + { L"MaxCharSize", DISPID_GLOBAL_MAXCHARSIZE }, { L"firstDayOfWeek", DISPID_GLOBAL_WEEKSTARTDAY }, { L"globalCallback", DISPID_GLOBAL_GLOBALCALLBACK }, { L"testObj", DISPID_GLOBAL_TESTOBJ }, @@ -1264,6 +1271,11 @@ static HRESULT WINAPI Global_InvokeEx(IDispatchEx *iface, DISPID id, LCID lcid, V_BOOL(pvarRes) = is_english ? VARIANT_TRUE : VARIANT_FALSE; return S_OK; + case DISPID_GLOBAL_MAXCHARSIZE: + V_VT(pvarRes) = VT_I4; + V_I4(pvarRes) = MaxCharSize; + return S_OK; + case DISPID_GLOBAL_WEEKSTARTDAY: V_VT(pvarRes) = VT_I4; V_I4(pvarRes) = first_day_of_week;
1
0
0
0
Eric Pouech : kernel32/tests: Extend share right for debugger's black box tests.
by Alexandre Julliard
18 Jan '23
18 Jan '23
Module: wine Branch: master Commit: ce083b37f9a67a7d15902268f554e572a8d6045f URL:
https://gitlab.winehq.org/wine/wine/-/commit/ce083b37f9a67a7d15902268f554e5…
Author: Eric Pouech <eric.pouech(a)gmail.com> Date: Tue Jan 17 18:10:05 2023 +0100 kernel32/tests: Extend share right for debugger's black box tests. Trying to improve upon previous attempt: 2486f5a0028de8bfd23c46e8f1d95064cf994be5 Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=53456
Signed-off-by: Eric Pouech <eric.pouech(a)gmail.com> --- dlls/kernel32/tests/debugger.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/kernel32/tests/debugger.c b/dlls/kernel32/tests/debugger.c index a3f09abaa70..a190fc6f3f3 100644 --- a/dlls/kernel32/tests/debugger.c +++ b/dlls/kernel32/tests/debugger.c @@ -134,7 +134,7 @@ static void save_blackbox(const char* logfile, void* blackbox, int size, const c DWORD written; BOOL ret; - hFile = CreateFileA(logfile, GENERIC_WRITE, FILE_SHARE_READ, NULL, CREATE_ALWAYS, 0, 0); + hFile = CreateFileA(logfile, GENERIC_WRITE, FILE_SHARE_READ|FILE_SHARE_WRITE, NULL, CREATE_ALWAYS, 0, 0); ok(hFile != INVALID_HANDLE_VALUE, "Couldn't create %s: %lu\n", logfile, GetLastError()); if (hFile == INVALID_HANDLE_VALUE) return; @@ -156,7 +156,7 @@ static int _load_blackbox(unsigned int line, const char* logfile, void* blackbox BOOL ret; char buf[4096]; - hFile = CreateFileA(logfile, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, 0); + hFile = CreateFileA(logfile, GENERIC_READ, FILE_SHARE_READ|FILE_SHARE_WRITE, NULL, OPEN_EXISTING, 0, 0); if (hFile == INVALID_HANDLE_VALUE) { ok_(__FILE__, line)(0, "unable to open '%s': %#lx\n", logfile, GetLastError());
1
0
0
0
← Newer
1
...
32
33
34
35
36
37
38
...
47
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
Results per page:
10
25
50
100
200