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
August 2009
----- 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
4 participants
1042 discussions
Start a n
N
ew thread
Alexandre Julliard : ntdll: Add support for unwinding the signal stack on x86_64.
by Alexandre Julliard
29 Aug '09
29 Aug '09
Module: wine Branch: master Commit: af22daf72ba5c25e1d9221a77004701a2d5c5893 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=af22daf72ba5c25e1d9221a77…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Fri Aug 28 18:24:06 2009 +0200 ntdll: Add support for unwinding the signal stack on x86_64. --- dlls/ntdll/signal_x86_64.c | 22 ++++++++++++++++++++-- 1 files changed, 20 insertions(+), 2 deletions(-) diff --git a/dlls/ntdll/signal_x86_64.c b/dlls/ntdll/signal_x86_64.c index 825fb47..eaa9970 100644 --- a/dlls/ntdll/signal_x86_64.c +++ b/dlls/ntdll/signal_x86_64.c @@ -976,6 +976,17 @@ static inline void *get_signal_stack(void) } /*********************************************************************** + * is_inside_signal_stack + * + * Check if pointer is inside the signal stack. + */ +static inline int is_inside_signal_stack( void *ptr ) +{ + return ((char *)ptr >= (char *)get_signal_stack() && + (char *)ptr < (char *)get_signal_stack() + signal_stack_size); +} + +/*********************************************************************** * save_context * * Set the register values from a sigcontext. @@ -1316,8 +1327,7 @@ static EXCEPTION_RECORD *setup_exception( ucontext_t *sigcontext, raise_func fun /* stack sanity checks */ - if ((char *)stack >= (char *)get_signal_stack() && - (char *)stack < (char *)get_signal_stack() + signal_stack_size) + if (is_inside_signal_stack( stack )) { ERR( "nested exception on signal stack in thread %04x eip %016lx esp %016lx stack %p-%p\n", GetCurrentThreadId(), RIP_sig(sigcontext), RSP_sig(sigcontext), @@ -2424,6 +2434,14 @@ void WINAPI RtlUnwindEx( ULONG64 end_frame, ULONG64 target_ip, EXCEPTION_RECORD if (!dispatch.EstablisherFrame) break; + if (is_inside_signal_stack( (void *)dispatch.EstablisherFrame )) + { + TRACE( "frame %lx is inside signal stack (%p-%p)\n", dispatch.EstablisherFrame, + get_signal_stack(), (char *)get_signal_stack() + signal_stack_size ); + context = new_context; + continue; + } + if ((dispatch.EstablisherFrame & 7) || dispatch.EstablisherFrame < (ULONG64)NtCurrentTeb()->Tib.StackLimit || dispatch.EstablisherFrame > (ULONG64)NtCurrentTeb()->Tib.StackBase)
1
0
0
0
Francois Gouget : mshtml: Remove the create_nsstream() prototype.
by Alexandre Julliard
28 Aug '09
28 Aug '09
Module: wine Branch: master Commit: ec078110566e1229d0cec9abebf0a951696bed9f URL:
http://source.winehq.org/git/wine.git/?a=commit;h=ec078110566e1229d0cec9abe…
Author: Francois Gouget <fgouget(a)free.fr> Date: Fri Aug 28 14:50:14 2009 +0200 mshtml: Remove the create_nsstream() prototype. --- dlls/mshtml/mshtml_private.h | 1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/dlls/mshtml/mshtml_private.h b/dlls/mshtml/mshtml_private.h index a28949b..c3be4b9 100644 --- a/dlls/mshtml/mshtml_private.h +++ b/dlls/mshtml/mshtml_private.h @@ -558,7 +558,6 @@ void nsAString_SetData(nsAString*,const PRUnichar*); PRUint32 nsAString_GetData(const nsAString*,const PRUnichar**); void nsAString_Finish(nsAString*); -nsIInputStream *create_nsstream(const char*,PRInt32); nsICommandParams *create_nscommand_params(void); HRESULT nsnode_to_nsstring(nsIDOMNode*,nsAString*); void get_editor_controller(NSContainer*);
1
0
0
0
Ge van Geldorp : netapi32/tests: Add acceptable error codes for Win7.
by Alexandre Julliard
28 Aug '09
28 Aug '09
Module: wine Branch: master Commit: 675799daf8831b8232d1e6c013edb18e7e70b819 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=675799daf8831b8232d1e6c01…
Author: Ge van Geldorp <ggeldorp(a)vmware.com> Date: Fri Aug 28 14:54:28 2009 +0200 netapi32/tests: Add acceptable error codes for Win7. --- dlls/netapi32/tests/access.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dlls/netapi32/tests/access.c b/dlls/netapi32/tests/access.c index 8c39a18..7886b36 100644 --- a/dlls/netapi32/tests/access.c +++ b/dlls/netapi32/tests/access.c @@ -155,16 +155,16 @@ static void run_usergetinfo_tests(void) todo_wine { /* FIXME - Currently Wine can't verify whether the network path is good or bad */ rc=pNetUserGetInfo(sBadNetPath, sTestUserName, 0, (LPBYTE *)&ui0); - ok(rc == ERROR_BAD_NETPATH || rc == ERROR_NETWORK_UNREACHABLE, + ok(rc == ERROR_BAD_NETPATH || rc == ERROR_NETWORK_UNREACHABLE || rc == RPC_S_SERVER_UNAVAILABLE, "Bad Network Path: rc=%d\n",rc); } rc=pNetUserGetInfo(sEmptyStr, sTestUserName, 0, (LPBYTE *)&ui0); ok(rc == ERROR_BAD_NETPATH || rc == NERR_Success, "Bad Network Path: rc=%d\n",rc); rc=pNetUserGetInfo(sInvalidName, sTestUserName, 0, (LPBYTE *)&ui0); - ok(rc == ERROR_INVALID_NAME,"Invalid Server Name: rc=%d\n",rc); + ok(rc == ERROR_INVALID_NAME || rc == ERROR_INVALID_HANDLE,"Invalid Server Name: rc=%d\n",rc); rc=pNetUserGetInfo(sInvalidName2, sTestUserName, 0, (LPBYTE *)&ui0); - ok(rc == ERROR_INVALID_NAME,"Invalid Server Name: rc=%d\n",rc); + ok(rc == ERROR_INVALID_NAME || rc == ERROR_INVALID_HANDLE,"Invalid Server Name: rc=%d\n",rc); if(delete_test_user() != NERR_Success) trace("Deleting the test user failed. You might have to manually delete it.\n");
1
0
0
0
Ge van Geldorp : msi/tests: Create only a single restore point.
by Alexandre Julliard
28 Aug '09
28 Aug '09
Module: wine Branch: master Commit: 167ef04727c177b29372a9abee194dada27bd194 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=167ef04727c177b29372a9abe…
Author: Ge van Geldorp <ggeldorp(a)vmware.com> Date: Fri Aug 28 12:31:25 2009 +0200 msi/tests: Create only a single restore point. --- dlls/msi/tests/package.c | 48 ++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 48 insertions(+), 0 deletions(-) diff --git a/dlls/msi/tests/package.c b/dlls/msi/tests/package.c index a7c0ed6..5fb5b53 100644 --- a/dlls/msi/tests/package.c +++ b/dlls/msi/tests/package.c @@ -26,6 +26,7 @@ #include <msidefs.h> #include <msi.h> #include <msiquery.h> +#include <srrestoreptapi.h> #include "wine/test.h" @@ -36,10 +37,14 @@ static UINT (WINAPI *pMsiApplyMultiplePatchesA)(LPCSTR, LPCSTR, LPCSTR); static BOOL (WINAPI *pConvertSidToStringSidA)(PSID, LPSTR*); +static BOOL (WINAPI *pSRRemoveRestorePoint)(DWORD); +static BOOL (WINAPI *pSRSetRestorePointA)(RESTOREPOINTINFOA*, STATEMGRSTATUS*); + static void init_functionpointers(void) { HMODULE hmsi = GetModuleHandleA("msi.dll"); HMODULE hadvapi32 = GetModuleHandleA("advapi32.dll"); + HMODULE hsrclient; #define GET_PROC(mod, func) \ p ## func = (void*)GetProcAddress(mod, #func); @@ -48,6 +53,9 @@ static void init_functionpointers(void) GET_PROC(hadvapi32, ConvertSidToStringSidA); + hsrclient = LoadLibraryA("srclient.dll"); + GET_PROC(hsrclient, SRRemoveRestorePoint); + GET_PROC(hsrclient, SRSetRestorePointA); #undef GET_PROC } @@ -774,6 +782,27 @@ done: return ret; } +static BOOL notify_system_change(DWORD event_type, STATEMGRSTATUS *status) +{ + RESTOREPOINTINFOA spec; + + spec.dwEventType = event_type; + spec.dwRestorePtType = APPLICATION_INSTALL; + spec.llSequenceNumber = status->llSequenceNumber; + lstrcpyA(spec.szDescription, "msitest restore point"); + + return pSRSetRestorePointA(&spec, status); +} + +static void remove_restore_point(DWORD seq_number) +{ + DWORD res; + + res = pSRRemoveRestorePoint(seq_number); + if (res != ERROR_SUCCESS) + trace("Failed to remove the restore point : %08x\n", res); +} + static void test_createpackage(void) { MSIHANDLE hPackage = 0; @@ -11870,10 +11899,22 @@ static void test_MsiApplyPatch(void) START_TEST(package) { + STATEMGRSTATUS status; + BOOL ret = FALSE; + init_functionpointers(); GetCurrentDirectoryA(MAX_PATH, CURR_DIR); + /* Create a restore point ourselves so we circumvent the multitude of restore points + * that would have been created by all the installation and removal tests. + */ + if (pSRSetRestorePointA) + { + memset(&status, 0, sizeof(status)); + ret = notify_system_change(BEGIN_NESTED_SYSTEM_CHANGE, &status); + } + test_createpackage(); test_doaction(); test_gettargetpath_bad(); @@ -11905,4 +11946,11 @@ START_TEST(package) test_MsiSetProperty(); test_MsiApplyMultiplePatches(); test_MsiApplyPatch(); + + if (pSRSetRestorePointA && ret) + { + ret = notify_system_change(END_NESTED_SYSTEM_CHANGE, &status); + if (ret) + remove_restore_point(status.llSequenceNumber); + } }
1
0
0
0
Vladimir Pankratov : shell32: Handle NULL path.
by Alexandre Julliard
28 Aug '09
28 Aug '09
Module: wine Branch: master Commit: 8777994882d1e811ca569e673ee7f90e34e4ca67 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=8777994882d1e811ca569e673…
Author: Vladimir Pankratov <scriptkid(a)mail.ru> Date: Fri Aug 28 15:38:11 2009 +0500 shell32: Handle NULL path. --- dlls/shell32/shell32_main.c | 3 +++ dlls/shell32/tests/shlfileop.c | 8 ++++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/dlls/shell32/shell32_main.c b/dlls/shell32/shell32_main.c index fdc22d2..f3f8725 100644 --- a/dlls/shell32/shell32_main.c +++ b/dlls/shell32/shell32_main.c @@ -350,6 +350,9 @@ DWORD_PTR WINAPI SHGetFileInfoW(LPCWSTR path,DWORD dwFileAttributes, (flags & SHGFI_PIDL)? "pidl" : debugstr_w(path), dwFileAttributes, psfi, psfi->dwAttributes, sizeofpsfi, flags); + if (!path) + return FALSE; + /* windows initializes these values regardless of the flags */ if (psfi != NULL) { diff --git a/dlls/shell32/tests/shlfileop.c b/dlls/shell32/tests/shlfileop.c index 3c126ed..f89fa49 100644 --- a/dlls/shell32/tests/shlfileop.c +++ b/dlls/shell32/tests/shlfileop.c @@ -207,11 +207,11 @@ static void test_get_file_info(void) memset(&shfiw, 0xcf, sizeof(shfiw)); memset(&unset_icon, 0xcf, sizeof(unset_icon)); rc=pSHGetFileInfoW(NULL, 0, &shfiw, sizeof(shfiw), 0); - todo_wine ok(!rc, "SHGetFileInfoW(NULL | 0) should fail\n"); + ok(!rc, "SHGetFileInfoW(NULL | 0) should fail\n"); ok(shfiw.hIcon == unset_icon, "SHGetFileInfoW(NULL | 0) should not clear hIcon\n"); - todo_wine ok(shfiw.szDisplayName[0] == 0xcfcf, "SHGetFileInfoW(NULL | 0) should not clear szDisplayName[0]\n"); - todo_wine ok(shfiw.szTypeName[0] == 0xcfcf, "SHGetFileInfoW(NULL | 0) should not clear szTypeName[0]\n"); - todo_wine ok(shfiw.iIcon == 0xcfcfcfcf, "SHGetFileInfoW(NULL | 0) should not clear iIcon\n"); + ok(shfiw.szDisplayName[0] == 0xcfcf, "SHGetFileInfoW(NULL | 0) should not clear szDisplayName[0]\n"); + ok(shfiw.szTypeName[0] == 0xcfcf, "SHGetFileInfoW(NULL | 0) should not clear szTypeName[0]\n"); + ok(shfiw.iIcon == 0xcfcfcfcf, "SHGetFileInfoW(NULL | 0) should not clear iIcon\n"); ok(shfiw.dwAttributes == 0xcfcfcfcf, "SHGetFileInfoW(NULL | 0) should not clear dwAttributes\n"); } else
1
0
0
0
Alexandre Julliard : ntdll: Unwind the stack before calling exit/ abort_thread.
by Alexandre Julliard
28 Aug '09
28 Aug '09
Module: wine Branch: master Commit: ecdcf060a57648f9ceb94fe2f6ac2b9c55176d68 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=ecdcf060a57648f9ceb94fe2f…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Fri Aug 28 12:13:21 2009 +0200 ntdll: Unwind the stack before calling exit/abort_thread. This prevents pthread_exit() from trying to do it and failing. --- dlls/ntdll/signal_x86_64.c | 99 ++++++++++++++++++++++++++++++++++++++++---- 1 files changed, 90 insertions(+), 9 deletions(-) diff --git a/dlls/ntdll/signal_x86_64.c b/dlls/ntdll/signal_x86_64.c index 9b138f0..825fb47 100644 --- a/dlls/ntdll/signal_x86_64.c +++ b/dlls/ntdll/signal_x86_64.c @@ -2552,29 +2552,100 @@ void WINAPI __regs_RtlRaiseException( EXCEPTION_RECORD *rec, CONTEXT *context ) DEFINE_REGS_ENTRYPOINT( RtlRaiseException, 1 ) +struct topmost_frame +{ + EXCEPTION_REGISTRATION_RECORD frame; + sigjmp_buf jmp; + int exit_code; +}; + +static void DECLSPEC_NORETURN topmost_exit_unwind_target(void) +{ + struct topmost_frame *topmost_frame = (struct topmost_frame *)__wine_get_frame(); + __wine_pop_frame( &topmost_frame->frame ); + siglongjmp( topmost_frame->jmp, 1 ); +} + +static void DECLSPEC_NORETURN topmost_abort_unwind_target(void) +{ + struct topmost_frame *topmost_frame = (struct topmost_frame *)__wine_get_frame(); + __wine_pop_frame( &topmost_frame->frame ); + siglongjmp( topmost_frame->jmp, 2 ); +} + +static DWORD topmost_handler( EXCEPTION_RECORD *record, + EXCEPTION_REGISTRATION_RECORD *frame, + CONTEXT *context, + EXCEPTION_REGISTRATION_RECORD **pdispatcher ) +{ + struct topmost_frame *topmost_frame = (struct topmost_frame *)frame; + EXCEPTION_POINTERS ptrs; + + if (record->ExceptionFlags & (EH_UNWINDING | EH_EXIT_UNWIND | EH_NESTED_CALL)) + return ExceptionContinueSearch; + + ptrs.ExceptionRecord = record; + ptrs.ContextRecord = context; + switch (unhandled_exception_filter( &ptrs )) + { + case EXCEPTION_CONTINUE_SEARCH: + return ExceptionContinueSearch; + case EXCEPTION_CONTINUE_EXECUTION: + return ExceptionContinueExecution; + case EXCEPTION_EXECUTE_HANDLER: + break; + } + /* send the exit code to the server */ + /* we can't simply call NtTerminateThread since it's a WINAPI function */ + /* and libgcc unwinding doesn't handle those correctly */ + SERVER_START_REQ( terminate_thread ) + { + req->handle = wine_server_obj_handle( GetCurrentThread() ); + req->exit_code = record->ExceptionCode; + wine_server_call( req ); + } + SERVER_END_REQ; + topmost_frame->exit_code = record->ExceptionCode; + for (;;) RtlUnwind( frame, topmost_abort_unwind_target, record, 0 ); +} + /*********************************************************************** * call_thread_entry_point */ void call_thread_entry_point( LPTHREAD_START_ROUTINE entry, void *arg ) { - __TRY - { - exit_thread( entry( arg )); - } - __EXCEPT(unhandled_exception_filter) + struct topmost_frame frame; + + frame.frame.Handler = topmost_handler; + switch (sigsetjmp( frame.jmp, 0 )) { - NtTerminateThread( GetCurrentThread(), GetExceptionCode() ); + case 0: + __wine_push_frame( &frame.frame ); + frame.exit_code = entry( arg ); + __wine_pop_frame( &frame.frame ); + /* fall through */ + case 1: + exit_thread( frame.exit_code ); + default: + terminate_thread( frame.exit_code ); } - __ENDTRY - abort(); /* should not be reached */ } - /*********************************************************************** * RtlExitUserThread (NTDLL.@) */ void WINAPI RtlExitUserThread( ULONG status ) { + EXCEPTION_REGISTRATION_RECORD *teb_frame = NtCurrentTeb()->Tib.ExceptionList; + + /* hack: find the top TEB frame and use it as unwind target */ + if (teb_frame != (EXCEPTION_REGISTRATION_RECORD *)~0UL) + { + while (teb_frame->Prev != (EXCEPTION_REGISTRATION_RECORD *)~0UL) teb_frame = teb_frame->Prev; + TRACE( "unwinding to frame %p for thread exit\n", teb_frame ); + ((struct topmost_frame *)teb_frame)->exit_code = status; + RtlUnwind( teb_frame, topmost_exit_unwind_target, NULL, 0 ); + } exit_thread( status ); } @@ -2583,6 +2654,16 @@ void WINAPI RtlExitUserThread( ULONG status ) */ void abort_thread( int status ) { + EXCEPTION_REGISTRATION_RECORD *teb_frame = NtCurrentTeb()->Tib.ExceptionList; + + /* hack: find the top TEB frame and use it as unwind target */ + if (teb_frame != (EXCEPTION_REGISTRATION_RECORD *)~0UL) + { + while (teb_frame->Prev != (EXCEPTION_REGISTRATION_RECORD *)~0UL) teb_frame = teb_frame->Prev; + TRACE( "unwinding to frame %p for thread exit\n", teb_frame ); + ((struct topmost_frame *)teb_frame)->exit_code = status; + RtlUnwind( teb_frame, topmost_abort_unwind_target, NULL, 0 ); + } terminate_thread( status ); }
1
0
0
0
Alexandre Julliard : ntdll: Move the abort_thread() function to the CPU-specific files to allow redefining it.
by Alexandre Julliard
28 Aug '09
28 Aug '09
Module: wine Branch: master Commit: 8101a2fa1e9124e4e2f5f2677719733dd8f1fd12 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=8101a2fa1e9124e4e2f5f2677…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Fri Aug 28 11:52:21 2009 +0200 ntdll: Move the abort_thread() function to the CPU-specific files to allow redefining it. --- dlls/ntdll/ntdll_misc.h | 1 + dlls/ntdll/signal_i386.c | 8 ++++++++ dlls/ntdll/signal_powerpc.c | 8 ++++++++ dlls/ntdll/signal_sparc.c | 8 ++++++++ dlls/ntdll/signal_x86_64.c | 7 +++++++ dlls/ntdll/thread.c | 13 ++++--------- 6 files changed, 36 insertions(+), 9 deletions(-) diff --git a/dlls/ntdll/ntdll_misc.h b/dlls/ntdll/ntdll_misc.h index 06b5d4c..faafd20 100644 --- a/dlls/ntdll/ntdll_misc.h +++ b/dlls/ntdll/ntdll_misc.h @@ -79,6 +79,7 @@ extern size_t server_init_thread( void *entry_point ); extern void DECLSPEC_NORETURN server_protocol_error( const char *err, ... ); extern void DECLSPEC_NORETURN server_protocol_perror( const char *err ); extern void DECLSPEC_NORETURN abort_thread( int status ); +extern void DECLSPEC_NORETURN terminate_thread( int status ); extern void DECLSPEC_NORETURN exit_thread( int status ); extern sigset_t server_block_set; extern void server_enter_uninterrupted_section( RTL_CRITICAL_SECTION *cs, sigset_t *sigset ); diff --git a/dlls/ntdll/signal_i386.c b/dlls/ntdll/signal_i386.c index 3d7c8e1..f70448a 100644 --- a/dlls/ntdll/signal_i386.c +++ b/dlls/ntdll/signal_i386.c @@ -2321,6 +2321,14 @@ void WINAPI RtlExitUserThread( ULONG status ) exit_thread( status ); } +/*********************************************************************** + * abort_thread + */ +void abort_thread( int status ) +{ + terminate_thread( status ); +} + /********************************************************************** * DbgBreakPoint (NTDLL.@) */ diff --git a/dlls/ntdll/signal_powerpc.c b/dlls/ntdll/signal_powerpc.c index 92288ad..ccd64f9 100644 --- a/dlls/ntdll/signal_powerpc.c +++ b/dlls/ntdll/signal_powerpc.c @@ -1111,6 +1111,14 @@ void WINAPI RtlExitUserThread( ULONG status ) exit_thread( status ); } +/*********************************************************************** + * abort_thread + */ +void abort_thread( int status ) +{ + terminate_thread( status ); +} + /********************************************************************** * DbgBreakPoint (NTDLL.@) */ diff --git a/dlls/ntdll/signal_sparc.c b/dlls/ntdll/signal_sparc.c index 55b2a79..a38d34e 100644 --- a/dlls/ntdll/signal_sparc.c +++ b/dlls/ntdll/signal_sparc.c @@ -853,6 +853,14 @@ void WINAPI RtlExitUserThread( ULONG status ) exit_thread( status ); } +/*********************************************************************** + * abort_thread + */ +void abort_thread( int status ) +{ + terminate_thread( status ); +} + /********************************************************************** * DbgBreakPoint (NTDLL.@) */ diff --git a/dlls/ntdll/signal_x86_64.c b/dlls/ntdll/signal_x86_64.c index 5cb2c9e..9b138f0 100644 --- a/dlls/ntdll/signal_x86_64.c +++ b/dlls/ntdll/signal_x86_64.c @@ -2578,6 +2578,13 @@ void WINAPI RtlExitUserThread( ULONG status ) exit_thread( status ); } +/*********************************************************************** + * abort_thread + */ +void abort_thread( int status ) +{ + terminate_thread( status ); +} /********************************************************************** * __wine_enter_vm86 (NTDLL.@) diff --git a/dlls/ntdll/thread.c b/dlls/ntdll/thread.c index 438d798..70ab2bf 100644 --- a/dlls/ntdll/thread.c +++ b/dlls/ntdll/thread.c @@ -364,9 +364,9 @@ HANDLE thread_init(void) /*********************************************************************** - * abort_thread + * terminate_thread */ -void abort_thread( int status ) +void terminate_thread( int status ) { pthread_sigmask( SIG_BLOCK, &server_block_set, NULL ); if (interlocked_xchg_add( &nb_threads, -1 ) <= 1) _exit( status ); @@ -698,7 +698,7 @@ NTSTATUS WINAPI NtAlertThread( HANDLE handle ) NTSTATUS WINAPI NtTerminateThread( HANDLE handle, LONG exit_code ) { NTSTATUS ret; - BOOL self, last; + BOOL self; SERVER_START_REQ( terminate_thread ) { @@ -706,15 +706,10 @@ NTSTATUS WINAPI NtTerminateThread( HANDLE handle, LONG exit_code ) req->exit_code = exit_code; ret = wine_server_call( req ); self = !ret && reply->self; - last = reply->last; } SERVER_END_REQ; - if (self) - { - if (last) _exit( exit_code ); - else abort_thread( exit_code ); - } + if (self) abort_thread( exit_code ); return ret; }
1
0
0
0
Vincent Povirk : gdiplus: Implement GdipCreateHBITMAPFromBitmap.
by Alexandre Julliard
28 Aug '09
28 Aug '09
Module: wine Branch: master Commit: 28e345882cc866b9902effb94bc8e51686bb9903 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=28e345882cc866b9902effb94…
Author: Vincent Povirk <vincent(a)codeweavers.com> Date: Thu Aug 27 16:58:11 2009 -0500 gdiplus: Implement GdipCreateHBITMAPFromBitmap. --- dlls/gdiplus/image.c | 64 +++++++++++++++++++++++++++++++++++++++++-- dlls/gdiplus/tests/image.c | 6 ++-- 2 files changed, 64 insertions(+), 6 deletions(-) diff --git a/dlls/gdiplus/image.c b/dlls/gdiplus/image.c index 7fb76b0..e65182f 100644 --- a/dlls/gdiplus/image.c +++ b/dlls/gdiplus/image.c @@ -447,11 +447,69 @@ GpStatus WINGDIPAPI GdipCreateBitmapFromResource(HINSTANCE hInstance, GpStatus WINGDIPAPI GdipCreateHBITMAPFromBitmap(GpBitmap* bitmap, HBITMAP* hbmReturn, ARGB background) { - FIXME("stub\n"); + GpStatus stat; + HBITMAP result, oldbitmap; + UINT width, height; + HDC hdc; + GpGraphics *graphics; + BITMAPINFOHEADER bih; + void *bits; + TRACE("(%p,%p,%x)\n", bitmap, hbmReturn, background); + + if (!bitmap || !hbmReturn) return InvalidParameter; + + GdipGetImageWidth((GpImage*)bitmap, &width); + GdipGetImageHeight((GpImage*)bitmap, &height); + + bih.biSize = sizeof(bih); + bih.biWidth = width; + bih.biHeight = height; + bih.biPlanes = 1; + bih.biBitCount = 32; + bih.biCompression = BI_RGB; + bih.biSizeImage = 0; + bih.biXPelsPerMeter = 0; + bih.biYPelsPerMeter = 0; + bih.biClrUsed = 0; + bih.biClrImportant = 0; + + hdc = CreateCompatibleDC(NULL); + if (!hdc) return GenericError; + + result = CreateDIBSection(hdc, (BITMAPINFO*)&bih, DIB_RGB_COLORS, &bits, + NULL, 0); + + if (result) + { + oldbitmap = SelectObject(hdc, result); + + stat = GdipCreateFromHDC(hdc, &graphics); + if (stat == Ok) + { + stat = GdipGraphicsClear(graphics, background); - if (hbmReturn) *hbmReturn = NULL; + if (stat == Ok) + stat = GdipDrawImage(graphics, (GpImage*)bitmap, 0, 0); - return NotImplemented; + GdipDeleteGraphics(graphics); + } + + SelectObject(hdc, oldbitmap); + } + else + stat = GenericError; + + DeleteDC(hdc); + + if (stat != Ok && result) + { + DeleteObject(result); + result = NULL; + } + + *hbmReturn = result; + + return stat; } GpStatus WINGDIPAPI GdipConvertToEmfPlus(const GpGraphics* ref, diff --git a/dlls/gdiplus/tests/image.c b/dlls/gdiplus/tests/image.c index d566c36..e624e53 100644 --- a/dlls/gdiplus/tests/image.c +++ b/dlls/gdiplus/tests/image.c @@ -760,14 +760,14 @@ static void test_createhbitmap(void) /* test NULL values */ stat = GdipCreateHBITMAPFromBitmap(NULL, &hbitmap, 0); - todo_wine expect(InvalidParameter, stat); + expect(InvalidParameter, stat); stat = GdipCreateHBITMAPFromBitmap(bitmap, NULL, 0); - todo_wine expect(InvalidParameter, stat); + expect(InvalidParameter, stat); /* create HBITMAP */ stat = GdipCreateHBITMAPFromBitmap(bitmap, &hbitmap, 0); - todo_wine expect(Ok, stat); + expect(Ok, stat); if (stat == Ok) {
1
0
0
0
Vincent Povirk : gdiplus: Add test for GdipCreateHBITMAPFromBitmap.
by Alexandre Julliard
28 Aug '09
28 Aug '09
Module: wine Branch: master Commit: 88bc3426125893a4878e52458b83f5d7ec4901d2 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=88bc3426125893a4878e52458…
Author: Vincent Povirk <vincent(a)codeweavers.com> Date: Thu Aug 27 16:38:07 2009 -0500 gdiplus: Add test for GdipCreateHBITMAPFromBitmap. --- dlls/gdiplus/tests/image.c | 59 ++++++++++++++++++++++++++++++++++++++++++++ include/gdiplusflat.h | 1 + 2 files changed, 60 insertions(+), 0 deletions(-) diff --git a/dlls/gdiplus/tests/image.c b/dlls/gdiplus/tests/image.c index 4443f88..d566c36 100644 --- a/dlls/gdiplus/tests/image.c +++ b/dlls/gdiplus/tests/image.c @@ -741,6 +741,64 @@ static void test_getrawformat(void) test_bufferrawformat((void*)jpgimage, sizeof(jpgimage), &ImageFormatJPEG, __LINE__, TRUE); } +static void test_createhbitmap(void) +{ + GpStatus stat; + GpBitmap *bitmap; + HBITMAP hbitmap, oldhbitmap; + BITMAP bm; + int ret; + HDC hdc; + COLORREF pixel; + BYTE bits[640]; + + memset(bits, 0x68, 640); + + /* create Bitmap */ + stat = GdipCreateBitmapFromScan0(10, 20, 32, PixelFormat24bppRGB, bits, &bitmap); + expect(Ok, stat); + + /* test NULL values */ + stat = GdipCreateHBITMAPFromBitmap(NULL, &hbitmap, 0); + todo_wine expect(InvalidParameter, stat); + + stat = GdipCreateHBITMAPFromBitmap(bitmap, NULL, 0); + todo_wine expect(InvalidParameter, stat); + + /* create HBITMAP */ + stat = GdipCreateHBITMAPFromBitmap(bitmap, &hbitmap, 0); + todo_wine expect(Ok, stat); + + if (stat == Ok) + { + ret = GetObjectA(hbitmap, sizeof(BITMAP), &bm); + expect(sizeof(BITMAP), ret); + + expect(0, bm.bmType); + expect(10, bm.bmWidth); + expect(20, bm.bmHeight); + expect(40, bm.bmWidthBytes); + expect(1, bm.bmPlanes); + expect(32, bm.bmBitsPixel); + ok(bm.bmBits != NULL, "got DDB, expected DIB\n"); + + hdc = CreateCompatibleDC(NULL); + + oldhbitmap = SelectObject(hdc, hbitmap); + pixel = GetPixel(hdc, 5, 5); + SelectObject(hdc, oldhbitmap); + + DeleteDC(hdc); + + expect(0x686868, pixel); + + DeleteObject(hbitmap); + } + + stat = GdipDisposeImage((GpImage*)bitmap); + expect(Ok, stat); +} + START_TEST(image) { struct GdiplusStartupInput gdiplusStartupInput; @@ -766,6 +824,7 @@ START_TEST(image) test_testcontrol(); test_fromhicon(); test_getrawformat(); + test_createhbitmap(); GdiplusShutdown(gdiplusToken); } diff --git a/include/gdiplusflat.h b/include/gdiplusflat.h index 6bad8bd..c06d951 100644 --- a/include/gdiplusflat.h +++ b/include/gdiplusflat.h @@ -59,6 +59,7 @@ GpStatus WINGDIPAPI GdipCreateBitmapFromScan0(INT,INT,INT,PixelFormat,BYTE*, GpBitmap**); GpStatus WINGDIPAPI GdipCreateBitmapFromStream(IStream*,GpBitmap**); GpStatus WINGDIPAPI GdipCreateBitmapFromStreamICM(IStream*,GpBitmap**); +GpStatus WINGDIPAPI GdipCreateHBITMAPFromBitmap(GpBitmap*,HBITMAP*,ARGB); GpStatus WINGDIPAPI GdipCreateHICONFromBitmap(GpBitmap*,HICON*); GpStatus WINGDIPAPI GdipDeleteEffect(CGpEffect*);
1
0
0
0
Henri Verbeet : d3d9: Remove trailing spaces.
by Alexandre Julliard
28 Aug '09
28 Aug '09
Module: wine Branch: master Commit: e7d14d02d0ddb61760b4a8268b8e09a7359165d9 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=e7d14d02d0ddb61760b4a8268…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Fri Aug 28 10:23:11 2009 +0200 d3d9: Remove trailing spaces. --- dlls/d3d9/d3d9_private.h | 3 +- dlls/d3d9/device.c | 65 ++++++++++++++++-------------- dlls/d3d9/indexbuffer.c | 9 ++-- dlls/d3d9/pixelshader.c | 2 +- dlls/d3d9/stateblock.c | 30 +++++++------- dlls/d3d9/tests/device.c | 10 ++-- dlls/d3d9/tests/shader.c | 6 +- dlls/d3d9/tests/stateblock.c | 74 +++++++++++++++------------------- dlls/d3d9/tests/vertexdeclaration.c | 25 +++++------- dlls/d3d9/texture.c | 2 +- dlls/d3d9/vertexbuffer.c | 7 +-- dlls/d3d9/vertexdeclaration.c | 8 ++-- dlls/d3d9/volumetexture.c | 9 ++-- 13 files changed, 120 insertions(+), 130 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=e7d14d02d0ddb61760b4a…
1
0
0
0
← Newer
1
...
7
8
9
10
11
12
13
...
105
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
Results per page:
10
25
50
100
200