winehq.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
November 2015
----- 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
2 participants
623 discussions
Start a n
N
ew thread
Dmitry Timoshkov : widl: Fixup the defaultvalue(BSTR) expression type like midl does.
by Alexandre Julliard
30 Nov '15
30 Nov '15
Module: wine Branch: master Commit: b53c5b30b2f2c2d8ad21bbb4097b1a63b43136b0 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b53c5b30b2f2c2d8ad21bbb40…
Author: Dmitry Timoshkov <dmitry(a)baikal.ru> Date: Fri Nov 27 18:00:27 2015 +0800 widl: Fixup the defaultvalue(BSTR) expression type like midl does. Signed-off-by: Dmitry Timoshkov <dmitry(a)baikal.ru> Signed-off-by: Huw Davies <huw(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- tools/widl/header.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tools/widl/header.c b/tools/widl/header.c index cb4601e..7b97158 100644 --- a/tools/widl/header.c +++ b/tools/widl/header.c @@ -35,6 +35,7 @@ #include "header.h" #include "expr.h" #include "typetree.h" +#include "typelib.h" static int indentation = 0; static int is_object_interface = 0; @@ -1009,6 +1010,16 @@ void write_args(FILE *h, const var_list_t *args, const char *name, int method, i /* Output default value only if all following arguments also have default value. */ LIST_FOR_EACH_ENTRY_REV( tail_arg, args, const var_t, entry ) { if(tail_arg == arg) { + expr_t bstr; + + /* Fixup the expression type for a BSTR like midl does. */ + if (get_type_vt(arg->type) == VT_BSTR && expr->type == EXPR_STRLIT) + { + bstr = *expr; + bstr.type = EXPR_WSTRLIT; + expr = &bstr; + } + fprintf(h, " = "); write_expr( h, expr, 0, 1, NULL, NULL, "" ); break;
1
0
0
0
Jactry Zeng : riched20/tests: Test EM_REPLACESEL with rtf stream.
by Alexandre Julliard
30 Nov '15
30 Nov '15
Module: wine Branch: master Commit: 7365f557b6bc792efb4f73523c318cfce0625092 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=7365f557b6bc792efb4f73523…
Author: Jactry Zeng <jzeng(a)codeweavers.com> Date: Fri Nov 27 16:44:20 2015 +0800 riched20/tests: Test EM_REPLACESEL with rtf stream. Signed-off-by: Jactry Zeng <jzeng(a)codeweavers.com> Signed-off-by: Huw Davies <huw(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/riched20/tests/editor.c | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/dlls/riched20/tests/editor.c b/dlls/riched20/tests/editor.c index 31af4b2..46d93aa 100644 --- a/dlls/riched20/tests/editor.c +++ b/dlls/riched20/tests/editor.c @@ -4561,6 +4561,8 @@ static void test_EM_REPLACESEL(int redraw) int r; GETTEXTEX getText; CHARRANGE cr; + CHAR rtfstream[] = "{\\rtf1 TestSomeText}"; + CHAR urtfstream[] = "{\\urtf1 TestSomeText}"; /* sending some text to the window */ SendMessageA(hwndRichEdit, WM_SETTEXT, 0, (LPARAM)"testing selection"); @@ -4833,6 +4835,48 @@ static void test_EM_REPLACESEL(int redraw) r = SendMessageA(hwndRichEdit, EM_GETLINECOUNT, 0, 0); ok(r == 7, "EM_GETLINECOUNT returned %d, expected 7\n", r); + SendMessageA(hwndRichEdit, WM_SETTEXT, 0, 0); + r = SendMessageA(hwndRichEdit, EM_REPLACESEL, 0, (LPARAM)rtfstream); + todo_wine ok(r == 12, "EM_REPLACESEL returned %d, expected 12\n", r); + r = SendMessageA(hwndRichEdit, EM_EXGETSEL, 0, (LPARAM)&cr); + ok(0 == r, "EM_EXGETSEL returned %d, expected 0\n", r); + todo_wine ok(cr.cpMin == 12, "EM_EXGETSEL returned cpMin=%d, expected 12\n", cr.cpMin); + todo_wine ok(cr.cpMax == 12, "EM_EXGETSEL returned cpMax=%d, expected 12\n", cr.cpMax); + SendMessageA(hwndRichEdit, WM_GETTEXT, 1024, (LPARAM)buffer); + todo_wine ok(!strcmp(buffer, "TestSomeText"), "WM_GETTEXT returned incorrect string\n"); + + SendMessageA(hwndRichEdit, WM_SETTEXT, 0, 0); + r = SendMessageA(hwndRichEdit, EM_REPLACESEL, 0, (LPARAM)urtfstream); + todo_wine ok(r == 12, "EM_REPLACESEL returned %d, expected 12\n", r); + r = SendMessageA(hwndRichEdit, EM_EXGETSEL, 0, (LPARAM)&cr); + ok(0 == r, "EM_EXGETSEL returned %d, expected 0\n", r); + todo_wine ok(cr.cpMin == 12, "EM_EXGETSEL returned cpMin=%d, expected 12\n", cr.cpMin); + todo_wine ok(cr.cpMax == 12, "EM_EXGETSEL returned cpMax=%d, expected 12\n", cr.cpMax); + SendMessageA(hwndRichEdit, WM_GETTEXT, 1024, (LPARAM)buffer); + todo_wine ok(!strcmp(buffer, "TestSomeText"), "WM_GETTEXT returned incorrect string\n"); + + SendMessageA(hwndRichEdit, WM_SETTEXT, 0, (LPARAM)"Wine"); + SendMessageA(hwndRichEdit, EM_SETSEL, 1, 2); + todo_wine r = SendMessageA(hwndRichEdit, EM_REPLACESEL, 0, (LPARAM)rtfstream); + todo_wine ok(r == 12, "EM_REPLACESEL returned %d, expected 12\n", r); + r = SendMessageA(hwndRichEdit, EM_EXGETSEL, 0, (LPARAM)&cr); + ok(0 == r, "EM_EXGETSEL returned %d, expected 0\n", r); + todo_wine ok(cr.cpMin == 13, "EM_EXGETSEL returned cpMin=%d, expected 13\n", cr.cpMin); + todo_wine ok(cr.cpMax == 13, "EM_EXGETSEL returned cpMax=%d, expected 13\n", cr.cpMax); + SendMessageA(hwndRichEdit, WM_GETTEXT, 1024, (LPARAM)buffer); + todo_wine ok(!strcmp(buffer, "WTestSomeTextne"), "WM_GETTEXT returned incorrect string\n"); + + SendMessageA(hwndRichEdit, WM_SETTEXT, 0, (LPARAM)"{\\rtf1 Wine}"); + SendMessageA(hwndRichEdit, EM_SETSEL, 1, 2); + todo_wine r = SendMessageA(hwndRichEdit, EM_REPLACESEL, 0, (LPARAM)rtfstream); + todo_wine ok(r == 12, "EM_REPLACESEL returned %d, expected 12\n", r); + r = SendMessageA(hwndRichEdit, EM_EXGETSEL, 0, (LPARAM)&cr); + ok(0 == r, "EM_EXGETSEL returned %d, expected 0\n", r); + todo_wine ok(cr.cpMin == 13, "EM_EXGETSEL returned cpMin=%d, expected 13\n", cr.cpMin); + todo_wine ok(cr.cpMax == 13, "EM_EXGETSEL returned cpMax=%d, expected 13\n", cr.cpMax); + SendMessageA(hwndRichEdit, WM_GETTEXT, 1024, (LPARAM)buffer); + todo_wine ok(!strcmp(buffer, "WTestSomeTextne"), "WM_GETTEXT returned incorrect string\n"); + if (!redraw) /* This is needed to avoid interferring with keybd_event calls * on other tests that simulate keyboard events. */
1
0
0
0
Gerald Pfeifer : user32: Avoid shift overflow in nulldrv_GetKeyboardLayoutList.
by Alexandre Julliard
30 Nov '15
30 Nov '15
Module: wine Branch: master Commit: 1e803cb1df11a2750b2eac26df55907999ca226f URL:
http://source.winehq.org/git/wine.git/?a=commit;h=1e803cb1df11a2750b2eac26d…
Author: Gerald Pfeifer <gerald(a)pfeifer.com> Date: Sat Nov 28 22:54:52 2015 +0100 user32: Avoid shift overflow in nulldrv_GetKeyboardLayoutList. Signed-off-by: Gerald Pfeifer <gerald(a)pfeifer.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/user32/driver.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/user32/driver.c b/dlls/user32/driver.c index dbac3ef..201988c 100644 --- a/dlls/user32/driver.c +++ b/dlls/user32/driver.c @@ -216,7 +216,7 @@ static UINT CDECL nulldrv_GetKeyboardLayoutList( INT size, HKL *layouts ) baselayout = GetUserDefaultLCID(); langid = PRIMARYLANGID(LANGIDFROMLCID(baselayout)); if (langid == LANG_CHINESE || langid == LANG_JAPANESE || langid == LANG_KOREAN) - baselayout |= 0xe001 << 16; /* IME */ + baselayout = MAKELONG( baselayout, 0xe001 ); /* IME */ else baselayout |= baselayout << 16;
1
0
0
0
Gerald Pfeifer : krnl386.exe16: Avoid shift overflows in DMA_ioport_out.
by Alexandre Julliard
30 Nov '15
30 Nov '15
Module: wine Branch: master Commit: 99b83bf385cb7ea7ac7ecce756f3c3631e382e8d URL:
http://source.winehq.org/git/wine.git/?a=commit;h=99b83bf385cb7ea7ac7ecce75…
Author: Gerald Pfeifer <gerald(a)pfeifer.com> Date: Sat Nov 28 22:51:18 2015 +0100 krnl386.exe16: Avoid shift overflows in DMA_ioport_out. Signed-off-by: Gerald Pfeifer <gerald(a)pfeifer.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/krnl386.exe16/dma.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/dlls/krnl386.exe16/dma.c b/dlls/krnl386.exe16/dma.c index 6734a25..9a255ce 100644 --- a/dlls/krnl386.exe16/dma.c +++ b/dlls/krnl386.exe16/dma.c @@ -210,13 +210,13 @@ void DMA_ioport_out( WORD port, BYTE val ) case 0x8A: DMA_BaseAddress[7]=(DMA_BaseAddress[7] & (~0xFF << 16))|((val & 0xFF) << 16); break; /* Low Page Base Address (only 4 lower bits are significant) */ - case 0x487: DMA_BaseAddress[0]=(DMA_BaseAddress[0] & (~0xFF << 24))|((val & 0x0F) << 24); break; - case 0x483: DMA_BaseAddress[1]=(DMA_BaseAddress[1] & (~0xFF << 24))|((val & 0x0F) << 24); break; - case 0x481: DMA_BaseAddress[2]=(DMA_BaseAddress[2] & (~0xFF << 24))|((val & 0x0F) << 24); break; - case 0x482: DMA_BaseAddress[3]=(DMA_BaseAddress[3] & (~0xFF << 24))|((val & 0x0F) << 24); break; - case 0x48B: DMA_BaseAddress[5]=(DMA_BaseAddress[5] & (~0xFF << 24))|((val & 0x0F) << 24); break; - case 0x489: DMA_BaseAddress[6]=(DMA_BaseAddress[6] & (~0xFF << 24))|((val & 0x0F) << 24); break; - case 0x48A: DMA_BaseAddress[7]=(DMA_BaseAddress[7] & (~0xFF << 24))|((val & 0x0F) << 24); break; + case 0x487: DMA_BaseAddress[0]=(DMA_BaseAddress[0] & (~0xFFu << 24))|((val & 0x0F) << 24); break; + case 0x483: DMA_BaseAddress[1]=(DMA_BaseAddress[1] & (~0xFFu << 24))|((val & 0x0F) << 24); break; + case 0x481: DMA_BaseAddress[2]=(DMA_BaseAddress[2] & (~0xFFu << 24))|((val & 0x0F) << 24); break; + case 0x482: DMA_BaseAddress[3]=(DMA_BaseAddress[3] & (~0xFFu << 24))|((val & 0x0F) << 24); break; + case 0x48B: DMA_BaseAddress[5]=(DMA_BaseAddress[5] & (~0xFFu << 24))|((val & 0x0F) << 24); break; + case 0x489: DMA_BaseAddress[6]=(DMA_BaseAddress[6] & (~0xFFu << 24))|((val & 0x0F) << 24); break; + case 0x48A: DMA_BaseAddress[7]=(DMA_BaseAddress[7] & (~0xFFu << 24))|((val & 0x0F) << 24); break; case 0x08: case 0xD0:
1
0
0
0
Dmitry Timoshkov : oleaut32: Simplify 'for' loop.
by Alexandre Julliard
30 Nov '15
30 Nov '15
Module: wine Branch: master Commit: 1616f0ede9d55cfa7a57a6968b4351bc35b40e9e URL:
http://source.winehq.org/git/wine.git/?a=commit;h=1616f0ede9d55cfa7a57a6968…
Author: Dmitry Timoshkov <dmitry(a)baikal.ru> Date: Mon Nov 30 12:26:33 2015 +0800 oleaut32: Simplify 'for' loop. Variable 'i' is not used neither in the loop nor at its end. Signed-off-by: Dmitry Timoshkov <dmitry(a)baikal.ru> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/oleaut32/typelib.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/oleaut32/typelib.c b/dlls/oleaut32/typelib.c index 0891098..0a83b79 100644 --- a/dlls/oleaut32/typelib.c +++ b/dlls/oleaut32/typelib.c @@ -4486,9 +4486,9 @@ static ITypeLib2* ITypeLib2_Constructor_SLTG(LPVOID pLib, DWORD dwTLBLength) /* We'll set up a ptr to the main library block, which is the last one. */ - for(pBlk = pFirstBlk, order = pHeader->first_blk - 1, i = 0; + for(pBlk = pFirstBlk, order = pHeader->first_blk - 1; pBlkEntry[order].next != 0; - order = pBlkEntry[order].next - 1, i++) { + order = pBlkEntry[order].next - 1) { pBlk = (char*)pBlk + pBlkEntry[order].len; } pLibBlk = pBlk;
1
0
0
0
Sebastian Lackner : maintainers: Add section for timezone database.
by Alexandre Julliard
30 Nov '15
30 Nov '15
Module: wine Branch: master Commit: 137ca91f47ba637952cf82ef2b33f858f414578b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=137ca91f47ba637952cf82ef2…
Author: Sebastian Lackner <sebastian(a)fds-team.de> Date: Sat Nov 28 22:00:45 2015 +0100 maintainers: Add section for timezone database. Signed-off-by: Sebastian Lackner <sebastian(a)fds-team.de> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- MAINTAINERS | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index b00ee7b..a32c686 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -200,6 +200,10 @@ Threadpool M: Sebastian Lackner <sebastian(a)fds-team.de> F: dlls/ntdll/threadpool.c +Timezone database +M: Sebastian Lackner <sebastian(a)fds-team.de> +F: loader/wine.inf.in + Uniscribe M: Aric Stewart <aric(a)codeweavers.com> F: dlls/usp10/
1
0
0
0
Sebastian Lackner : wine.inf: Add information for delayed end of DST in Europe/Istanbul.
by Alexandre Julliard
30 Nov '15
30 Nov '15
Module: wine Branch: master Commit: be730c5de2e1cf9a3f0ac0ea880c954a6a51ee9f URL:
http://source.winehq.org/git/wine.git/?a=commit;h=be730c5de2e1cf9a3f0ac0ea8…
Author: Sebastian Lackner <sebastian(a)fds-team.de> Date: Sat Nov 28 22:00:28 2015 +0100 wine.inf: Add information for delayed end of DST in Europe/Istanbul. Signed-off-by: Sebastian Lackner <sebastian(a)fds-team.de> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- loader/wine.inf.in | 1 + 1 file changed, 1 insertion(+) diff --git a/loader/wine.inf.in b/loader/wine.inf.in index 7773377..58a8d1d 100644 --- a/loader/wine.inf.in +++ b/loader/wine.inf.in @@ -3084,6 +3084,7 @@ HKLM,%CurrentVersionNT%\Time Zones\Turkey Standard Time,"Display",,"Europe/Istan HKLM,%CurrentVersionNT%\Time Zones\Turkey Standard Time,"Dlt",,"Turkey Daylight Time" HKLM,%CurrentVersionNT%\Time Zones\Turkey Standard Time,"Std",,"Turkey Standard Time" HKLM,%CurrentVersionNT%\Time Zones\Turkey Standard Time,"TZI",1,88,ff,ff,ff,00,00,00,00,c4,ff,ff,ff,00,00,0a,00,00,00,05,00,04,00,00,00,00,00,00,00,00,00,03,00,00,00,05,00,03,00,00,00,00,00,00,00 +HKLM,%CurrentVersionNT%\Time Zones\Turkey Standard Time\Dynamic DST,"2015",1,88,ff,ff,ff,00,00,00,00,c4,ff,ff,ff,df,07,0b,00,00,00,08,00,04,00,00,00,00,00,00,00,df,07,03,00,00,00,1d,00,03,00,00,00,00,00,00,00 HKLM,%CurrentVersionNT%\Time Zones\Ulaanbaatar Standard Time,"Display",,"Asia/Ulaanbaatar" HKLM,%CurrentVersionNT%\Time Zones\Ulaanbaatar Standard Time,"Dlt",,"Ulaanbaatar Daylight Time" HKLM,%CurrentVersionNT%\Time Zones\Ulaanbaatar Standard Time,"Std",,"Ulaanbaatar Standard Time"
1
0
0
0
Sebastian Lackner : kernel32/tests: Add tests for committing stack guard pages.
by Alexandre Julliard
30 Nov '15
30 Nov '15
Module: wine Branch: master Commit: 03460408894899b7cb073c8d7e4d7b3a130d7d5f URL:
http://source.winehq.org/git/wine.git/?a=commit;h=03460408894899b7cb073c8d7…
Author: Sebastian Lackner <sebastian(a)fds-team.de> Date: Sat Nov 28 21:28:48 2015 +0100 kernel32/tests: Add tests for committing stack guard pages. Signed-off-by: Sebastian Lackner <sebastian(a)fds-team.de> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/kernel32/tests/virtual.c | 76 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 76 insertions(+) diff --git a/dlls/kernel32/tests/virtual.c b/dlls/kernel32/tests/virtual.c index e80ba38..e614bde 100644 --- a/dlls/kernel32/tests/virtual.c +++ b/dlls/kernel32/tests/virtual.c @@ -2048,6 +2048,81 @@ static void test_guard_page(void) VirtualFree( base, 0, MEM_FREE ); } +static DWORD WINAPI stack_commit_func( void *arg ) +{ + volatile char *p = (char *)&p; + + /* trigger all guard pages, to ensure that the pages are committed */ + while (p >= (char *)pNtCurrentTeb()->DeallocationStack + 3 * 0x1000) + { + p[0] |= 0; + p -= 0x1000; + } + + ok( arg == (void *)0xdeadbeef, "expected 0xdeadbeef, got %p\n", arg ); + return 42; +} + +static void test_stack_commit(void) +{ + static const char code_call_on_stack[] = { + 0x55, /* pushl %ebp */ + 0x56, /* pushl %esi */ + 0x89, 0xe6, /* movl %esp,%esi */ + 0x8b, 0x4c, 0x24, 0x0c, /* movl 12(%esp),%ecx - func */ + 0x8b, 0x54, 0x24, 0x10, /* movl 16(%esp),%edx - arg */ + 0x8b, 0x44, 0x24, 0x14, /* movl 20(%esp),%eax - stack */ + 0x83, 0xe0, 0xf0, /* andl $~15,%eax */ + 0x83, 0xe8, 0x0c, /* subl $12,%eax */ + 0x89, 0xc4, /* movl %eax,%esp */ + 0x52, /* pushl %edx */ + 0x31, 0xed, /* xorl %ebp,%ebp */ + 0xff, 0xd1, /* call *%ecx */ + 0x89, 0xf4, /* movl %esi,%esp */ + 0x5e, /* popl %esi */ + 0x5d, /* popl %ebp */ + 0xc2, 0x0c, 0x00 }; /* ret $12 */ + + DWORD (WINAPI *call_on_stack)( DWORD (WINAPI *func)(void *), void *arg, void *stack ); + void *old_stack, *old_stack_base, *old_stack_limit; + void *new_stack, *new_stack_base; + DWORD result; + + if (!pNtCurrentTeb) + { + win_skip( "NtCurrentTeb not supported\n" ); + return; + } + + call_on_stack = VirtualAlloc( 0, 0x1000, MEM_RESERVE | MEM_COMMIT, PAGE_EXECUTE_READWRITE ); + ok( call_on_stack != NULL, "VirtualAlloc failed %u\n", GetLastError() ); + memcpy( call_on_stack, code_call_on_stack, sizeof(code_call_on_stack) ); + + /* allocate a new stack, only the first guard page is committed */ + new_stack = VirtualAlloc( 0, 0x400000, MEM_RESERVE, PAGE_READWRITE ); + ok( new_stack != NULL, "VirtualAlloc failed %u\n", GetLastError() ); + new_stack_base = (char *)new_stack + 0x400000; + VirtualAlloc( (char *)new_stack_base - 0x1000, 0x1000, MEM_COMMIT, PAGE_READWRITE | PAGE_GUARD ); + + old_stack = pNtCurrentTeb()->DeallocationStack; + old_stack_base = pNtCurrentTeb()->Tib.StackBase; + old_stack_limit = pNtCurrentTeb()->Tib.StackLimit; + + pNtCurrentTeb()->DeallocationStack = new_stack; + pNtCurrentTeb()->Tib.StackBase = new_stack_base; + pNtCurrentTeb()->Tib.StackLimit = new_stack_base; + + result = call_on_stack( stack_commit_func, (void *)0xdeadbeef, new_stack_base ); + ok( result == 42, "expected 42, got %u\n", result ); + + pNtCurrentTeb()->DeallocationStack = old_stack; + pNtCurrentTeb()->Tib.StackBase = old_stack_base; + pNtCurrentTeb()->Tib.StackLimit = old_stack_limit; + + VirtualFree( new_stack, 0, MEM_FREE ); + VirtualFree( call_on_stack, 0, MEM_FREE ); +} + DWORD num_execute_fault_calls; static DWORD execute_fault_seh_handler( EXCEPTION_RECORD *rec, EXCEPTION_REGISTRATION_RECORD *frame, @@ -3772,6 +3847,7 @@ START_TEST(virtual) test_write_watch(); #ifdef __i386__ test_guard_page(); + test_stack_commit(); /* The following tests should be executed as a last step, and in exactly this * order, since ATL thunk emulation cannot be enabled anymore on Windows. */ test_atl_thunk_emulation( MEM_EXECUTE_OPTION_ENABLE );
1
0
0
0
Sebastian Lackner : ntdll: Commit new guard pages in virtual_handle_stack_fault.
by Alexandre Julliard
30 Nov '15
30 Nov '15
Module: wine Branch: master Commit: 7b66f9f6b475f95aaabdc4c2a2d44fa755ddac06 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=7b66f9f6b475f95aaabdc4c2a…
Author: Sebastian Lackner <sebastian(a)fds-team.de> Date: Sat Nov 28 21:28:26 2015 +0100 ntdll: Commit new guard pages in virtual_handle_stack_fault. Signed-off-by: Sebastian Lackner <sebastian(a)fds-team.de> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ntdll/virtual.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/ntdll/virtual.c b/dlls/ntdll/virtual.c index 4d4bc3b..d6319d82 100644 --- a/dlls/ntdll/virtual.c +++ b/dlls/ntdll/virtual.c @@ -1550,7 +1550,7 @@ BOOL virtual_handle_stack_fault( void *addr ) if ((char *)page >= (char *)NtCurrentTeb()->DeallocationStack + 2*page_size) { vprot = view->prot[((char *)page - page_size - (char *)view->base) >> page_shift]; - VIRTUAL_SetProt( view, (char *)page - page_size, page_size, vprot | VPROT_GUARD ); + VIRTUAL_SetProt( view, (char *)page - page_size, page_size, vprot | VPROT_COMMITTED | VPROT_GUARD ); } ret = TRUE; }
1
0
0
0
Matteo Bruni : d3dx9: Don' t take the fastpath when converting between texture formats of different type.
by Alexandre Julliard
30 Nov '15
30 Nov '15
Module: wine Branch: master Commit: d71970f658fbf9a7278f159e13c9851b0edee4d4 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=d71970f658fbf9a7278f159e1…
Author: Matteo Bruni <mbruni(a)codeweavers.com> Date: Fri Nov 27 20:39:32 2015 +0100 d3dx9: Don't take the fastpath when converting between texture formats of different type. Signed-off-by: Matteo Bruni <mbruni(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/d3dx9_36/surface.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/d3dx9_36/surface.c b/dlls/d3dx9_36/surface.c index b8bb710..b14f5e7 100644 --- a/dlls/d3dx9_36/surface.c +++ b/dlls/d3dx9_36/surface.c @@ -1525,7 +1525,6 @@ void copy_pixels(const BYTE *src, UINT src_row_pitch, UINT src_slice_pitch, * Copies the source buffer to the destination buffer, performing * any necessary format conversion and color keying. * Pixels outsize the source rect are blacked out. - * Works only for ARGB formats with 1 - 4 bytes per pixel. */ void convert_argb_pixels(const BYTE *src, UINT src_row_pitch, UINT src_slice_pitch, const struct volume *src_size, const struct pixel_format_desc *src_format, BYTE *dst, UINT dst_row_pitch, UINT dst_slice_pitch, @@ -1562,6 +1561,7 @@ void convert_argb_pixels(const BYTE *src, UINT src_row_pitch, UINT src_slice_pit for (x = 0; x < min_width; x++) { if (!src_format->to_rgba && !dst_format->from_rgba + && src_format->type == dst_format->type && src_format->bytes_per_pixel <= 4 && dst_format->bytes_per_pixel <= 4) { DWORD val; @@ -1628,7 +1628,6 @@ void convert_argb_pixels(const BYTE *src, UINT src_row_pitch, UINT src_slice_pit * Copies the source buffer to the destination buffer, performing * any necessary format conversion, color keying and stretching * using a point filter. - * Works only for ARGB formats with 1 - 4 bytes per pixel. */ void point_filter_argb_pixels(const BYTE *src, UINT src_row_pitch, UINT src_slice_pitch, const struct volume *src_size, const struct pixel_format_desc *src_format, BYTE *dst, UINT dst_row_pitch, UINT dst_slice_pitch, @@ -1665,6 +1664,7 @@ void point_filter_argb_pixels(const BYTE *src, UINT src_row_pitch, UINT src_slic const BYTE *src_ptr = src_row_ptr + (x * src_size->width / dst_size->width) * src_format->bytes_per_pixel; if (!src_format->to_rgba && !dst_format->from_rgba + && src_format->type == dst_format->type && src_format->bytes_per_pixel <= 4 && dst_format->bytes_per_pixel <= 4) { DWORD val;
1
0
0
0
← Newer
1
2
3
4
5
...
63
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
Results per page:
10
25
50
100
200