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 2014
----- 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
397 discussions
Start a n
N
ew thread
Jacek Caban : jscript: Don' t use builtin property for exposing ActiveXObject constructor.
by Alexandre Julliard
13 Oct '14
13 Oct '14
Module: wine Branch: master Commit: 0eec97e29bed40ea0770e06714eecf11eff43282 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=0eec97e29bed40ea0770e0671…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Mon Oct 13 12:36:30 2014 +0200 jscript: Don't use builtin property for exposing ActiveXObject constructor. --- dlls/jscript/global.c | 24 ++++++++++-------------- dlls/jscript/jscript.h | 1 - dlls/jscript/tests/lang.js | 3 +++ 3 files changed, 13 insertions(+), 15 deletions(-) diff --git a/dlls/jscript/global.c b/dlls/jscript/global.c index 4d1350f..5ae6019 100644 --- a/dlls/jscript/global.c +++ b/dlls/jscript/global.c @@ -249,14 +249,6 @@ static HRESULT JSGlobal_RegExp(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, u return constructor_call(ctx->regexp_constr, flags, argc, argv, r); } -static HRESULT JSGlobal_ActiveXObject(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, unsigned argc, jsval_t *argv, - jsval_t *r) -{ - TRACE("\n"); - - return constructor_call(ctx->activex_constr, flags, argc, argv, r); -} - static HRESULT JSGlobal_VBArray(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, unsigned argc, jsval_t *argv, jsval_t *r) { @@ -1087,7 +1079,6 @@ static HRESULT JSGlobal_decodeURIComponent(script_ctx_t *ctx, vdisp_t *jsthis, W } static const builtin_prop_t JSGlobal_props[] = { - {ActiveXObjectW, JSGlobal_ActiveXObject, PROPF_CONSTR|1}, {ArrayW, JSGlobal_Array, PROPF_CONSTR|1}, {BooleanW, JSGlobal_Boolean, PROPF_CONSTR|1}, {CollectGarbageW, JSGlobal_CollectGarbage, PROPF_METHOD}, @@ -1146,10 +1137,6 @@ static HRESULT init_constructors(script_ctx_t *ctx, jsdisp_t *object_prototype) if(FAILED(hres)) return hres; - hres = create_activex_constr(ctx, &ctx->activex_constr); - if(FAILED(hres)) - return hres; - hres = create_array_constr(ctx, object_prototype, &ctx->array_constr); if(FAILED(hres)) return hres; @@ -1187,7 +1174,7 @@ static HRESULT init_constructors(script_ctx_t *ctx, jsdisp_t *object_prototype) HRESULT init_global(script_ctx_t *ctx) { - jsdisp_t *math, *object_prototype; + jsdisp_t *math, *object_prototype, *constr; HRESULT hres; if(ctx->global) @@ -1215,6 +1202,15 @@ HRESULT init_global(script_ctx_t *ctx) if(FAILED(hres)) return hres; + hres = create_activex_constr(ctx, &constr); + if(FAILED(hres)) + return hres; + + hres = jsdisp_propput_dontenum(ctx->global, ActiveXObjectW, jsval_obj(constr)); + jsdisp_release(constr); + if(FAILED(hres)) + return hres; + hres = jsdisp_propput_dontenum(ctx->global, undefinedW, jsval_undefined()); if(FAILED(hres)) return hres; diff --git a/dlls/jscript/jscript.h b/dlls/jscript/jscript.h index 0273b00..1e306b6 100644 --- a/dlls/jscript/jscript.h +++ b/dlls/jscript/jscript.h @@ -395,7 +395,6 @@ struct _script_ctx_t { jsdisp_t *global; jsdisp_t *function_constr; - jsdisp_t *activex_constr; jsdisp_t *array_constr; jsdisp_t *bool_constr; jsdisp_t *date_constr; diff --git a/dlls/jscript/tests/lang.js b/dlls/jscript/tests/lang.js index ccbdb51..a55bf75 100644 --- a/dlls/jscript/tests/lang.js +++ b/dlls/jscript/tests/lang.js @@ -1450,6 +1450,9 @@ function returnTest() { ok(returnTest() === undefined, "returnTest = " + returnTest()); +ActiveXObject = 1; +ok(ActiveXObject === 1, "ActiveXObject = " + ActiveXObject); + /* Keep this test in the end of file */ undefined = 6; ok(undefined === 6, "undefined = " + undefined);
1
0
0
0
Sebastian Lackner : ntdll: Only check for ATL thunk if allowed by execute option flags.
by Alexandre Julliard
13 Oct '14
13 Oct '14
Module: wine Branch: master Commit: 1c957ceb96efd6dbea58460af1561effa6c7c8ed URL:
http://source.winehq.org/git/wine.git/?a=commit;h=1c957ceb96efd6dbea58460af…
Author: Sebastian Lackner <sebastian(a)fds-team.de> Date: Sat Oct 11 00:08:41 2014 +0200 ntdll: Only check for ATL thunk if allowed by execute option flags. Checking for ATL thunks can be disabled by setting MEM_EXECUTE_OPTION_DISABLE_THUNK_EMULATION. --- dlls/kernel32/tests/virtual.c | 4 ---- dlls/ntdll/signal_i386.c | 7 ++++--- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/dlls/kernel32/tests/virtual.c b/dlls/kernel32/tests/virtual.c index 4627c5a..434d880 100644 --- a/dlls/kernel32/tests/virtual.c +++ b/dlls/kernel32/tests/virtual.c @@ -1997,7 +1997,6 @@ static void test_atl_thunk_emulation( ULONG dep_flags ) ok( ret == 43, "call returned wrong result, expected 43, got %d\n", ret ); ok( num_guard_page_calls == 0, "expected no STATUS_GUARD_PAGE_VIOLATION exception, got %d exceptions\n", num_guard_page_calls ); if ((dep_flags & MEM_EXECUTE_OPTION_DISABLE) && (dep_flags & MEM_EXECUTE_OPTION_DISABLE_THUNK_EMULATION)) - todo_wine ok( num_execute_fault_calls == 1, "expected one STATUS_ACCESS_VIOLATION exception, got %d exceptions\n", num_execute_fault_calls ); else ok( num_execute_fault_calls == 0, "expected no STATUS_ACCESS_VIOLATION exception, got %d exceptions\n", num_execute_fault_calls ); @@ -2013,7 +2012,6 @@ static void test_atl_thunk_emulation( ULONG dep_flags ) ok( ret == 43, "call returned wrong result, expected 43, got %d\n", ret ); ok( num_guard_page_calls == 1, "expected one STATUS_GUARD_PAGE_VIOLATION exception, got %d exceptions\n", num_guard_page_calls ); if ((dep_flags & MEM_EXECUTE_OPTION_DISABLE) && (dep_flags & MEM_EXECUTE_OPTION_DISABLE_THUNK_EMULATION)) - todo_wine ok( num_execute_fault_calls == 1, "expected one STATUS_ACCESS_VIOLATION exception, got %d exceptions\n", num_execute_fault_calls ); else ok( num_execute_fault_calls == 0, "expected no STATUS_ACCESS_VIOLATION exception, got %d exceptions\n", num_execute_fault_calls ); @@ -2164,7 +2162,6 @@ static void test_atl_thunk_emulation( ULONG dep_flags ) ok( ret == 43, "call returned wrong result, expected 43, got %d\n", ret ); ok( num_guard_page_calls == 0, "expected no STATUS_GUARD_PAGE_VIOLATION exception, got %d exceptions\n", num_guard_page_calls ); if ((dep_flags & MEM_EXECUTE_OPTION_DISABLE) && (dep_flags & MEM_EXECUTE_OPTION_DISABLE_THUNK_EMULATION)) - todo_wine ok( num_execute_fault_calls == 1, "expected one STATUS_ACCESS_VIOLATION exception, got %d exceptions\n", num_execute_fault_calls ); else ok( num_execute_fault_calls == 0, "expected no STATUS_ACCESS_VIOLATION exception, got %d exceptions\n", num_execute_fault_calls ); @@ -2193,7 +2190,6 @@ static void test_atl_thunk_emulation( ULONG dep_flags ) ok( ret == 43, "call returned wrong result, expected 43, got %d\n", ret ); ok( num_guard_page_calls == 1, "expected one STATUS_GUARD_PAGE_VIOLATION exception, got %d exceptions\n", num_guard_page_calls ); if ((dep_flags & MEM_EXECUTE_OPTION_DISABLE) && (dep_flags & MEM_EXECUTE_OPTION_DISABLE_THUNK_EMULATION)) - todo_wine ok( num_execute_fault_calls == 1, "expected one STATUS_ACCESS_VIOLATION exception, got %d exceptions\n", num_execute_fault_calls ); else ok( num_execute_fault_calls == 0, "expected no STATUS_ACCESS_VIOLATION exception, got %d exceptions\n", num_execute_fault_calls ); diff --git a/dlls/ntdll/signal_i386.c b/dlls/ntdll/signal_i386.c index b9b45a8..7f01554 100644 --- a/dlls/ntdll/signal_i386.c +++ b/dlls/ntdll/signal_i386.c @@ -1830,12 +1830,13 @@ static void WINAPI raise_segv_exception( EXCEPTION_RECORD *rec, CONTEXT *context rec->ExceptionInformation[0] == EXCEPTION_EXECUTE_FAULT) { ULONG flags; - if (check_atl_thunk( rec, context )) + NtQueryInformationProcess( GetCurrentProcess(), ProcessExecuteFlags, + &flags, sizeof(flags), NULL ); + + if (!(flags & MEM_EXECUTE_OPTION_DISABLE_THUNK_EMULATION) && check_atl_thunk( rec, context )) goto done; /* send EXCEPTION_EXECUTE_FAULT only if data execution prevention is enabled */ - NtQueryInformationProcess( GetCurrentProcess(), ProcessExecuteFlags, - &flags, sizeof(flags), NULL ); if (!(flags & MEM_EXECUTE_OPTION_DISABLE)) rec->ExceptionInformation[0] = EXCEPTION_READ_FAULT; }
1
0
0
0
Sebastian Lackner : ntdll: reset_write_watches shouldn' t remove enforced exec permissions.
by Alexandre Julliard
13 Oct '14
13 Oct '14
Module: wine Branch: master Commit: e16996bb3d5d5f12d2a5524bb86a2503d61d44ee URL:
http://source.winehq.org/git/wine.git/?a=commit;h=e16996bb3d5d5f12d2a5524bb…
Author: Sebastian Lackner <sebastian(a)fds-team.de> Date: Wed Oct 8 21:28:25 2014 +0200 ntdll: reset_write_watches shouldn't remove enforced exec permissions. --- dlls/kernel32/tests/virtual.c | 6 +----- dlls/ntdll/virtual.c | 4 ++-- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/dlls/kernel32/tests/virtual.c b/dlls/kernel32/tests/virtual.c index 2d2554b..4627c5a 100644 --- a/dlls/kernel32/tests/virtual.c +++ b/dlls/kernel32/tests/virtual.c @@ -2112,11 +2112,7 @@ static void test_atl_thunk_emulation( ULONG dep_flags ) ret = send_message_excpt( hWnd, WM_USER, 0, 0 ); ok( ret == 42, "call returned wrong result, expected 42, got %d\n", ret ); ok( num_guard_page_calls == 0, "expected no STATUS_GUARD_PAGE_VIOLATION exception, got %d exceptions\n", num_guard_page_calls ); - if (dep_flags & MEM_EXECUTE_OPTION_DISABLE) - ok( num_execute_fault_calls == 0, "expected no STATUS_ACCESS_VIOLATION exception, got %d exceptions\n", num_execute_fault_calls ); - else - todo_wine - ok( num_execute_fault_calls == 0, "expected no STATUS_ACCESS_VIOLATION exception, got %d exceptions\n", num_execute_fault_calls ); + ok( num_execute_fault_calls == 0, "expected no STATUS_ACCESS_VIOLATION exception, got %d exceptions\n", num_execute_fault_calls ); /* Now a bit more complicated, the page containing the code is protected with * PAGE_GUARD memory protection. */ diff --git a/dlls/ntdll/virtual.c b/dlls/ntdll/virtual.c index 3c9a4b5..d2bb152 100644 --- a/dlls/ntdll/virtual.c +++ b/dlls/ntdll/virtual.c @@ -693,12 +693,12 @@ static void reset_write_watches( struct file_view *view, void *base, SIZE_T size p[i] |= VPROT_WRITEWATCH; prot = VIRTUAL_GetUnixProt( p[i] ); if (prot == unix_prot) continue; - mprotect( addr, count << page_shift, unix_prot ); + mprotect_exec( addr, count << page_shift, unix_prot, view->protect ); addr += count << page_shift; unix_prot = prot; count = 0; } - if (count) mprotect( addr, count << page_shift, unix_prot ); + if (count) mprotect_exec( addr, count << page_shift, unix_prot, view->protect ); }
1
0
0
0
Sebastian Lackner : ntdll: Ensure force_exec_prot is also used for views with write watch permissions.
by Alexandre Julliard
13 Oct '14
13 Oct '14
Module: wine Branch: master Commit: aa3c6111d9361d3fddb4cdbe2365e356e740f1b9 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=aa3c6111d9361d3fddb4cdbe2…
Author: Sebastian Lackner <sebastian(a)fds-team.de> Date: Wed Oct 8 21:26:28 2014 +0200 ntdll: Ensure force_exec_prot is also used for views with write watch permissions. --- dlls/kernel32/tests/virtual.c | 8 +++++--- dlls/ntdll/virtual.c | 36 +++++++++++++++++++++++------------- 2 files changed, 28 insertions(+), 16 deletions(-) diff --git a/dlls/kernel32/tests/virtual.c b/dlls/kernel32/tests/virtual.c index 4d8277d..2d2554b 100644 --- a/dlls/kernel32/tests/virtual.c +++ b/dlls/kernel32/tests/virtual.c @@ -2102,7 +2102,6 @@ static void test_atl_thunk_emulation( ULONG dep_flags ) if (dep_flags & MEM_EXECUTE_OPTION_DISABLE) ok( num_execute_fault_calls == 1, "expected one STATUS_ACCESS_VIOLATION exception, got %d exceptions\n", num_execute_fault_calls ); else - todo_wine ok( num_execute_fault_calls == 0, "expected no STATUS_ACCESS_VIOLATION exception, got %d exceptions\n", num_execute_fault_calls ); count = 64; @@ -2113,7 +2112,11 @@ static void test_atl_thunk_emulation( ULONG dep_flags ) ret = send_message_excpt( hWnd, WM_USER, 0, 0 ); ok( ret == 42, "call returned wrong result, expected 42, got %d\n", ret ); ok( num_guard_page_calls == 0, "expected no STATUS_GUARD_PAGE_VIOLATION exception, got %d exceptions\n", num_guard_page_calls ); - ok( num_execute_fault_calls == 0, "expected no STATUS_ACCESS_VIOLATION exception, got %d exceptions\n", num_execute_fault_calls ); + if (dep_flags & MEM_EXECUTE_OPTION_DISABLE) + ok( num_execute_fault_calls == 0, "expected no STATUS_ACCESS_VIOLATION exception, got %d exceptions\n", num_execute_fault_calls ); + else + todo_wine + ok( num_execute_fault_calls == 0, "expected no STATUS_ACCESS_VIOLATION exception, got %d exceptions\n", num_execute_fault_calls ); /* Now a bit more complicated, the page containing the code is protected with * PAGE_GUARD memory protection. */ @@ -2127,7 +2130,6 @@ static void test_atl_thunk_emulation( ULONG dep_flags ) if (dep_flags & MEM_EXECUTE_OPTION_DISABLE) ok( num_execute_fault_calls == 1, "expected one STATUS_ACCESS_VIOLATION exception, got %d exceptions\n", num_execute_fault_calls ); else - todo_wine ok( num_execute_fault_calls == 0, "expected no STATUS_ACCESS_VIOLATION exception, got %d exceptions\n", num_execute_fault_calls ); ret = send_message_excpt( hWnd, WM_USER, 0, 0 ); diff --git a/dlls/ntdll/virtual.c b/dlls/ntdll/virtual.c index f8a5dd3..3c9a4b5 100644 --- a/dlls/ntdll/virtual.c +++ b/dlls/ntdll/virtual.c @@ -591,6 +591,25 @@ static NTSTATUS get_vprot_flags( DWORD protect, unsigned int *vprot, BOOL image /*********************************************************************** + * mprotect_exec + * + * Wrapper for mprotect, adds PROT_EXEC if forced by force_exec_prot + */ +static inline int mprotect_exec( void *base, size_t size, int unix_prot, unsigned int view_protect ) +{ + if (force_exec_prot && !(view_protect & VPROT_NOEXEC) && + (unix_prot & PROT_READ) && !(unix_prot & PROT_EXEC)) + { + TRACE( "forcing exec permission on %p-%p\n", base, (char *)base + size - 1 ); + if (!mprotect( base, size, unix_prot | PROT_EXEC )) return 0; + /* exec + write may legitimately fail, in that case fall back to write only */ + if (!(unix_prot & PROT_WRITE)) return -1; + } + + return mprotect( base, size, unix_prot ); +} + +/*********************************************************************** * VIRTUAL_SetProt * * Change the protection of a range of pages. @@ -624,12 +643,12 @@ static BOOL VIRTUAL_SetProt( struct file_view *view, /* [in] Pointer to view */ p[i] = vprot | (p[i] & VPROT_WRITEWATCH); prot = VIRTUAL_GetUnixProt( p[i] ); if (prot == unix_prot) continue; - mprotect( addr, count << page_shift, unix_prot ); + mprotect_exec( addr, count << page_shift, unix_prot, view->protect ); addr += count << page_shift; unix_prot = prot; count = 0; } - if (count) mprotect( addr, count << page_shift, unix_prot ); + if (count) mprotect_exec( addr, count << page_shift, unix_prot, view->protect ); VIRTUAL_DEBUG_DUMP_VIEW( view ); return TRUE; } @@ -646,18 +665,9 @@ static BOOL VIRTUAL_SetProt( struct file_view *view, /* [in] Pointer to view */ return TRUE; } - if (force_exec_prot && !(view->protect & VPROT_NOEXEC) && - (unix_prot & PROT_READ) && !(unix_prot & PROT_EXEC)) - { - TRACE( "forcing exec permission on %p-%p\n", base, (char *)base + size - 1 ); - if (!mprotect( base, size, unix_prot | PROT_EXEC )) goto done; - /* exec + write may legitimately fail, in that case fall back to write only */ - if (!(unix_prot & PROT_WRITE)) return FALSE; - } - - if (mprotect( base, size, unix_prot )) return FALSE; /* FIXME: last error */ + if (mprotect_exec( base, size, unix_prot, view->protect )) /* FIXME: last error */ + return FALSE; -done: memset( p, vprot, size >> page_shift ); VIRTUAL_DEBUG_DUMP_VIEW( view ); return TRUE;
1
0
0
0
Sebastian Lackner : ntdll: Avoid recursive exception handler calls when handling guard pages.
by Alexandre Julliard
13 Oct '14
13 Oct '14
Module: wine Branch: master Commit: 0cf3d78167cef061aa8d187ea051a1402bdf45fa URL:
http://source.winehq.org/git/wine.git/?a=commit;h=0cf3d78167cef061aa8d187ea…
Author: Sebastian Lackner <sebastian(a)fds-team.de> Date: Wed Oct 8 21:11:55 2014 +0200 ntdll: Avoid recursive exception handler calls when handling guard pages. The ATL check leads to problems when a page is protected with guard page protection. raise_segv_exception is called with EXCEPTION_EXECUTE_FAULT. The ATL check tries to read the memory, and triggers another exception handler. This time the virtual_handle_fault check is executed, and removes the guard page protection. Afterwards, when the ATL check returns, the exception is _not_ catched by virtual_handle_fault, but instead passed to the application. --- dlls/kernel32/tests/virtual.c | 2 -- dlls/ntdll/signal_i386.c | 10 ++++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/dlls/kernel32/tests/virtual.c b/dlls/kernel32/tests/virtual.c index 501934d..4d8277d 100644 --- a/dlls/kernel32/tests/virtual.c +++ b/dlls/kernel32/tests/virtual.c @@ -1818,7 +1818,6 @@ static DWORD execute_fault_seh_handler( EXCEPTION_RECORD *rec, EXCEPTION_REGISTR if (rec->ExceptionCode == STATUS_GUARD_PAGE_VIOLATION) { - todo_wine ok( rec->ExceptionInformation[0] == EXCEPTION_EXECUTE_FAULT || broken(!(flags & MEM_EXECUTE_OPTION_DISABLE) && rec->ExceptionInformation[0] == EXCEPTION_READ_FAULT), /* Windows 2000 */ "ExceptionInformation[0] is %d instead of %d\n", (DWORD)rec->ExceptionInformation[0], EXCEPTION_EXECUTE_FAULT ); @@ -1971,7 +1970,6 @@ static void test_atl_thunk_emulation( ULONG dep_flags ) if (dep_flags & MEM_EXECUTE_OPTION_DISABLE) ok( num_execute_fault_calls == 1, "expected one STATUS_ACCESS_VIOLATION exception, got %d exceptions\n", num_execute_fault_calls ); else - todo_wine ok( num_execute_fault_calls == 0, "expected no STATUS_ACCESS_VIOLATION exception, got %d exceptions\n", num_execute_fault_calls ); ret = send_message_excpt( hWnd, WM_USER, 0, 0 ); diff --git a/dlls/ntdll/signal_i386.c b/dlls/ntdll/signal_i386.c index 12aa5a4..b9b45a8 100644 --- a/dlls/ntdll/signal_i386.c +++ b/dlls/ntdll/signal_i386.c @@ -1821,17 +1821,19 @@ static void WINAPI raise_segv_exception( EXCEPTION_RECORD *rec, CONTEXT *context case EXCEPTION_ACCESS_VIOLATION: if (rec->NumberParameters == 2) { - if (rec->ExceptionInformation[0] == EXCEPTION_EXECUTE_FAULT && check_atl_thunk( rec, context )) - goto done; if (rec->ExceptionInformation[1] == 0xffffffff && check_invalid_gs( context )) goto done; if (!(rec->ExceptionCode = virtual_handle_fault( (void *)rec->ExceptionInformation[1], rec->ExceptionInformation[0] ))) goto done; - /* send EXCEPTION_EXECUTE_FAULT only if data execution prevention is enabled */ - if (rec->ExceptionInformation[0] == EXCEPTION_EXECUTE_FAULT) + if (rec->ExceptionCode == EXCEPTION_ACCESS_VIOLATION && + rec->ExceptionInformation[0] == EXCEPTION_EXECUTE_FAULT) { ULONG flags; + if (check_atl_thunk( rec, context )) + goto done; + + /* send EXCEPTION_EXECUTE_FAULT only if data execution prevention is enabled */ NtQueryInformationProcess( GetCurrentProcess(), ProcessExecuteFlags, &flags, sizeof(flags), NULL ); if (!(flags & MEM_EXECUTE_OPTION_DISABLE))
1
0
0
0
Sebastian Lackner : kernel32/tests: Add tests for DEP combined with guard pages and write watches.
by Alexandre Julliard
13 Oct '14
13 Oct '14
Module: wine Branch: master Commit: 9a806d0f1c10289241500519beda73f1ac556586 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=9a806d0f1c10289241500519b…
Author: Sebastian Lackner <sebastian(a)fds-team.de> Date: Wed Oct 8 20:54:50 2014 +0200 kernel32/tests: Add tests for DEP combined with guard pages and write watches. --- dlls/kernel32/tests/virtual.c | 449 ++++++++++++++++++++++++++++++++++++++++++ include/winternl.h | 1 + 2 files changed, 450 insertions(+) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=9a806d0f1c10289241500…
1
0
0
0
Qian Hong : mshtml: Add DIID_DispHTMLFormElement support for HTMLFormElement_QI.
by Alexandre Julliard
13 Oct '14
13 Oct '14
Module: wine Branch: master Commit: ef63bacf2d1deadd95127aec993defbebd7499eb URL:
http://source.winehq.org/git/wine.git/?a=commit;h=ef63bacf2d1deadd95127aec9…
Author: Qian Hong <qhong(a)codeweavers.com> Date: Sat Oct 11 09:18:36 2014 +0800 mshtml: Add DIID_DispHTMLFormElement support for HTMLFormElement_QI. --- dlls/mshtml/htmlform.c | 3 +++ dlls/mshtml/tests/dom.c | 1 + 2 files changed, 4 insertions(+) diff --git a/dlls/mshtml/htmlform.c b/dlls/mshtml/htmlform.c index b85cf4d..e901dbe 100644 --- a/dlls/mshtml/htmlform.c +++ b/dlls/mshtml/htmlform.c @@ -582,6 +582,9 @@ static HRESULT HTMLFormElement_QI(HTMLDOMNode *iface, REFIID riid, void **ppv) }else if(IsEqualGUID(&IID_IHTMLFormElement, riid)) { TRACE("(%p)->(IID_IHTMLFormElement %p)\n", This, ppv); *ppv = &This->IHTMLFormElement_iface; + }else if(IsEqualGUID(&DIID_DispHTMLFormElement, riid)) { + TRACE("(%p)->(DIID_DispHTMLFormElement %p)\n", This, ppv); + *ppv = &This->IHTMLFormElement_iface; } if(*ppv) { diff --git a/dlls/mshtml/tests/dom.c b/dlls/mshtml/tests/dom.c index 304a575..e1e18dc 100644 --- a/dlls/mshtml/tests/dom.c +++ b/dlls/mshtml/tests/dom.c @@ -381,6 +381,7 @@ static const IID * const form_iids[] = { ELEM_IFACES, &IID_IHTMLFormElement, &IID_IConnectionPointContainer, + &DIID_DispHTMLFormElement, NULL };
1
0
0
0
André Hentschel : winedump: Improved dumping of exception info on ARM.
by Alexandre Julliard
13 Oct '14
13 Oct '14
Module: wine Branch: master Commit: 9006dcb059e40452b4a35c4c553b8425c941f998 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=9006dcb059e40452b4a35c4c5…
Author: André Hentschel <nerv(a)dawncrow.de> Date: Mon Oct 13 01:34:11 2014 +0200 winedump: Improved dumping of exception info on ARM. --- tools/winedump/pe.c | 454 +++++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 429 insertions(+), 25 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=9006dcb059e40452b4a35…
1
0
0
0
André Hentschel : server: Update CPU type dumping.
by Alexandre Julliard
13 Oct '14
13 Oct '14
Module: wine Branch: master Commit: 8b07523c561e17feb8f5ced1173950e960609d32 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=8b07523c561e17feb8f5ced11…
Author: André Hentschel <nerv(a)dawncrow.de> Date: Mon Oct 13 01:32:26 2014 +0200 server: Update CPU type dumping. --- server/trace.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/server/trace.c b/server/trace.c index cb8da0c..8458f22 100644 --- a/server/trace.c +++ b/server/trace.c @@ -127,6 +127,8 @@ static void dump_cpu_type( const char *prefix, const cpu_type_t *code ) CASE(x86); CASE(x86_64); CASE(POWERPC); + CASE(ARM); + CASE(ARM64); default: fprintf( stderr, "%s%u", prefix, *code ); break; #undef CASE }
1
0
0
0
Jacek Caban : mshtml: Use proper codepage in nsIIOService::NewURI.
by Alexandre Julliard
13 Oct '14
13 Oct '14
Module: wine Branch: master Commit: 0d023f1968eb325f5ef58d1cc589d67cc39c1671 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=0d023f1968eb325f5ef58d1cc…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Sat Oct 11 17:35:19 2014 +0200 mshtml: Use proper codepage in nsIIOService::NewURI. --- dlls/mshtml/main.c | 32 ++++++++++++++++++++++++++++++++ dlls/mshtml/mshtml_private.h | 1 + dlls/mshtml/nsio.c | 19 ++++++++++++++++--- 3 files changed, 49 insertions(+), 3 deletions(-) diff --git a/dlls/mshtml/main.c b/dlls/mshtml/main.c index ce9222f..e5cf325 100644 --- a/dlls/mshtml/main.c +++ b/dlls/mshtml/main.c @@ -35,6 +35,7 @@ #include "optary.h" #include "rpcproxy.h" #include "shlguid.h" +#include "mlang.h" #include "wine/debug.h" @@ -50,6 +51,35 @@ DWORD mshtml_tls = TLS_OUT_OF_INDEXES; static HINSTANCE shdoclc = NULL; static HDC display_dc; static WCHAR *status_strings[IDS_STATUS_LAST-IDS_STATUS_FIRST+1]; +static IMultiLanguage2 *mlang; + +UINT cp_from_charset_string(BSTR charset) +{ + MIMECSETINFO info; + HRESULT hres; + + if(!mlang) { + IMultiLanguage2 *new_mlang; + + hres = CoCreateInstance(&CLSID_CMultiLanguage, NULL, CLSCTX_INPROC_SERVER, + &IID_IMultiLanguage2, (void**)&new_mlang); + if(FAILED(hres)) { + ERR("Could not create CMultiLanguage instance\n"); + return CP_UTF8; + } + + if(InterlockedCompareExchangePointer((void**)&mlang, new_mlang, NULL)) + IMultiLanguage2_Release(new_mlang); + } + + hres = IMultiLanguage2_GetCharsetInfo(mlang, charset, &info); + if(FAILED(hres)) { + FIXME("GetCharsetInfo failed: %08x\n", hres); + return CP_UTF8; + } + + return info.uiInternetEncoding; +} static void thread_detach(void) { @@ -83,6 +113,8 @@ static void process_detach(void) TlsFree(mshtml_tls); if(display_dc) DeleteObject(display_dc); + if(mlang) + IMultiLanguage2_Release(mlang); free_strings(); } diff --git a/dlls/mshtml/mshtml_private.h b/dlls/mshtml/mshtml_private.h index 31c08ad..b69fd26 100644 --- a/dlls/mshtml/mshtml_private.h +++ b/dlls/mshtml/mshtml_private.h @@ -1195,6 +1195,7 @@ static inline void windowref_release(windowref_t *ref) heap_free(ref); } +UINT cp_from_charset_string(BSTR) DECLSPEC_HIDDEN; HDC get_display_dc(void) DECLSPEC_HIDDEN; HINSTANCE get_shdoclc(void) DECLSPEC_HIDDEN; void set_statustext(HTMLDocumentObj*,INT,LPCWSTR) DECLSPEC_HIDDEN; diff --git a/dlls/mshtml/nsio.c b/dlls/mshtml/nsio.c index b5c766c..78ad0a6 100644 --- a/dlls/mshtml/nsio.c +++ b/dlls/mshtml/nsio.c @@ -3317,6 +3317,7 @@ static nsresult NSAPI nsIOService_NewURI(nsIIOService *iface, const nsACString * WCHAR new_spec[INTERNET_MAX_URL_LENGTH]; HTMLOuterWindow *window = NULL; const char *spec = NULL; + UINT cp = CP_UTF8; IUri *urlmon_uri; nsresult nsres; HRESULT hres; @@ -3343,10 +3344,22 @@ static nsresult NSAPI nsIOService_NewURI(nsIIOService *iface, const nsACString * } } - if(aOriginCharset && strcasecmp(aOriginCharset, "utf-8")) - FIXME("Unsupported charset %s\n", debugstr_a(aOriginCharset)); + if(aOriginCharset && *aOriginCharset && strncasecmp(aOriginCharset, "utf", 3)) { + BSTR charset; + int len; - MultiByteToWideChar(CP_UTF8, 0, spec, -1, new_spec, sizeof(new_spec)/sizeof(WCHAR)); + len = MultiByteToWideChar(CP_UTF8, 0, aOriginCharset, -1, NULL, 0); + charset = SysAllocStringLen(NULL, len-1); + if(!charset) + return NS_ERROR_OUT_OF_MEMORY; + MultiByteToWideChar(CP_UTF8, 0, aOriginCharset, -1, charset, len); + + cp = cp_from_charset_string(charset); + + SysFreeString(charset); + } + + MultiByteToWideChar(cp, 0, spec, -1, new_spec, sizeof(new_spec)/sizeof(WCHAR)); if(base_wine_uri) { hres = combine_url(base_wine_uri->uri, new_spec, &urlmon_uri);
1
0
0
0
← Newer
1
...
21
22
23
24
25
26
27
...
40
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
Results per page:
10
25
50
100
200