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
July 2017
----- 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
632 discussions
Start a n
N
ew thread
Michael Stefaniuc : dmloader: Remove a now redundant helper function.
by Alexandre Julliard
26 Jul '17
26 Jul '17
Module: wine Branch: master Commit: cfb1f130fdaeb98b696e8a7605e4c9adaadc4fd3 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=cfb1f130fdaeb98b696e8a760…
Author: Michael Stefaniuc <mstefani(a)winehq.org> Date: Wed Jul 26 14:28:32 2017 +0200 dmloader: Remove a now redundant helper function. Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/dmloader/loader.c | 21 +-------------------- dlls/dmloader/tests/loader.c | 2 ++ 2 files changed, 3 insertions(+), 20 deletions(-) diff --git a/dlls/dmloader/loader.c b/dlls/dmloader/loader.c index 4b76f32..e44d2b9 100644 --- a/dlls/dmloader/loader.c +++ b/dlls/dmloader/loader.c @@ -111,25 +111,6 @@ static HRESULT DMUSIC_CopyDescriptor(DMUS_OBJECTDESC *pDst, DMUS_OBJECTDESC *pSr return S_OK; } - -static BOOL DMUSIC_IsValidLoadableClass (REFCLSID pClassID) { - if (IsEqualCLSID(pClassID, &CLSID_DirectMusicAudioPathConfig) || - IsEqualCLSID(pClassID, &CLSID_DirectMusicBand) || - IsEqualCLSID(pClassID, &CLSID_DirectMusicContainer) || - IsEqualCLSID(pClassID, &CLSID_DirectMusicCollection) || - IsEqualCLSID(pClassID, &CLSID_DirectMusicChordMap) || - IsEqualCLSID(pClassID, &CLSID_DirectMusicSegment) || - IsEqualCLSID(pClassID, &CLSID_DirectMusicScript) || - IsEqualCLSID(pClassID, &CLSID_DirectMusicSong) || - IsEqualCLSID(pClassID, &CLSID_DirectMusicStyle) || - IsEqualCLSID(pClassID, &CLSID_DirectMusicGraph) || - IsEqualCLSID(pClassID, &CLSID_DirectSoundWave) || - IsEqualCLSID(pClassID, &GUID_DirectMusicAllTypes)) - return TRUE; - else - return FALSE; -} - /***************************************************************************** * IDirectMusicLoaderImpl implementation */ @@ -599,7 +580,7 @@ static HRESULT WINAPI IDirectMusicLoaderImpl_ScanDirectory(IDirectMusicLoader8 * HRESULT result; TRACE("(%p, %s, %s, %s)\n", This, debugstr_dmguid(rguidClass), debugstr_w(pwzFileExtension), debugstr_w(pwzScanFileName)); - if (IsEqualGUID (rguidClass, &GUID_DirectMusicAllTypes) || !DMUSIC_IsValidLoadableClass(rguidClass)) { + if (index_from_class(rguidClass) <= 0) { ERR(": rguidClass invalid CLSID\n"); return REGDB_E_CLASSNOTREG; } diff --git a/dlls/dmloader/tests/loader.c b/dlls/dmloader/tests/loader.c index 5d5cff4..ff084b6 100644 --- a/dlls/dmloader/tests/loader.c +++ b/dlls/dmloader/tests/loader.c @@ -87,6 +87,8 @@ static void test_directory(void) IDirectMusicLoader_SetSearchDirectory(loader, NULL, path, 0); /* Crashes on Windows */ hr = IDirectMusicLoader_SetSearchDirectory(loader, &IID_IDirectMusicLoader8, path, 0); ok(hr == S_OK, "SetSearchDirectory failed with %#x\n", hr); + hr = IDirectMusicLoader_ScanDirectory(loader, &GUID_DirectMusicAllTypes, con, NULL); + ok(hr == REGDB_E_CLASSNOTREG, "ScanDirectory failed, received %#x\n", hr); /* NULL extension is not an error */ hr = IDirectMusicLoader_ScanDirectory(loader, &CLSID_DirectSoundWave, NULL, NULL);
1
0
0
0
Alexandre Julliard : ntdll/tests: Test hardware breakpoints in newly created thread.
by Alexandre Julliard
26 Jul '17
26 Jul '17
Module: wine Branch: master Commit: f680ccb898adf83ed10600a03d7c57f936362346 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=f680ccb898adf83ed10600a03…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Jul 26 11:29:24 2017 +0200 ntdll/tests: Test hardware breakpoints in newly created thread. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ntdll/tests/exception.c | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/dlls/ntdll/tests/exception.c b/dlls/ntdll/tests/exception.c index bdca452..7cb704c 100644 --- a/dlls/ntdll/tests/exception.c +++ b/dlls/ntdll/tests/exception.c @@ -822,12 +822,21 @@ static DWORD int3_handler( EXCEPTION_RECORD *rec, EXCEPTION_REGISTRATION_RECORD static const BYTE int3_code[] = { 0xCC, 0xc3 }; /* int 3, ret */ +static DWORD WINAPI hw_reg_exception_thread( void *arg ) +{ + int expect = (ULONG_PTR)arg; + got_exception = 0; + run_exception_test( bpx_handler, NULL, dummy_code, sizeof(dummy_code), 0 ); + ok( got_exception == expect, "expected %u exceptions, got %d\n", expect, got_exception ); + return 0; +} static void test_exceptions(void) { CONTEXT ctx; NTSTATUS res; struct dbgreg_test dreg_test; + HANDLE h; if (!pNtGetContextThread || !pNtSetContextThread) { @@ -881,6 +890,33 @@ static void test_exceptions(void) /* test int3 handling */ run_exception_test(int3_handler, NULL, int3_code, sizeof(int3_code), 0); + + /* test that hardware breakpoints are not inherited by created threads */ + res = pNtSetContextThread( GetCurrentThread(), &ctx ); + ok( res == STATUS_SUCCESS, "NtSetContextThread failed with %x\n", res ); + + h = CreateThread( NULL, 0, hw_reg_exception_thread, 0, 0, NULL ); + WaitForSingleObject( h, 10000 ); + CloseHandle( h ); + + h = CreateThread( NULL, 0, hw_reg_exception_thread, (void *)4, CREATE_SUSPENDED, NULL ); + ctx.ContextFlags = CONTEXT_DEBUG_REGISTERS; + res = pNtGetContextThread( h, &ctx ); + ok( res == STATUS_SUCCESS, "NtGetContextThread failed with %x\n", res ); + ok( ctx.Dr0 == 0, "dr0 %x\n", ctx.Dr0 ); + todo_wine ok( ctx.Dr7 == 0, "dr7 %x\n", ctx.Dr7 ); + ctx.Dr0 = (DWORD)code_mem; + ctx.Dr7 = 3; + res = pNtSetContextThread( h, &ctx ); + ok( res == STATUS_SUCCESS, "NtSetContextThread failed with %x\n", res ); + ResumeThread( h ); + WaitForSingleObject( h, 10000 ); + CloseHandle( h ); + + ctx.Dr0 = 0; + ctx.Dr7 = 0; + res = pNtSetContextThread( GetCurrentThread(), &ctx ); + ok( res == STATUS_SUCCESS, "NtSetContextThread failed with %x\n", res ); } static void test_debugger(void)
1
0
0
0
Michael Müller : ntdll/tests: Test debug register values in newly created thread.
by Alexandre Julliard
26 Jul '17
26 Jul '17
Module: wine Branch: master Commit: 26f9c73eb064c28e85eb5584a57f05aa6442849e URL:
http://source.winehq.org/git/wine.git/?a=commit;h=26f9c73eb064c28e85eb5584a…
Author: Michael Müller <michael(a)fds-team.de> Date: Wed Jul 26 11:28:53 2017 +0200 ntdll/tests: Test debug register values in newly created thread. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ntdll/tests/exception.c | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/dlls/ntdll/tests/exception.c b/dlls/ntdll/tests/exception.c index 6e901e9..bdca452 100644 --- a/dlls/ntdll/tests/exception.c +++ b/dlls/ntdll/tests/exception.c @@ -2118,8 +2118,23 @@ static void test___C_specific_handler(void) #if defined(__i386__) || defined(__x86_64__) -static DWORD WINAPI dummy_thread(void *arg) +static DWORD WINAPI register_check_thread(void *arg) { + NTSTATUS status; + CONTEXT ctx; + + memset(&ctx, 0, sizeof(ctx)); + ctx.ContextFlags = CONTEXT_DEBUG_REGISTERS; + + status = pNtGetContextThread(GetCurrentThread(), &ctx); + ok(status == STATUS_SUCCESS, "NtGetContextThread failed with %x\n", status); + ok(!ctx.Dr0, "expected 0, got %lx\n", (DWORD_PTR)ctx.Dr0); + ok(!ctx.Dr1, "expected 0, got %lx\n", (DWORD_PTR)ctx.Dr1); + ok(!ctx.Dr2, "expected 0, got %lx\n", (DWORD_PTR)ctx.Dr2); + ok(!ctx.Dr3, "expected 0, got %lx\n", (DWORD_PTR)ctx.Dr3); + todo_wine ok(!ctx.Dr6, "expected 0, got %lx\n", (DWORD_PTR)ctx.Dr6); + todo_wine ok(!ctx.Dr7, "expected 0, got %lx\n", (DWORD_PTR)ctx.Dr7); + return 0; } @@ -2176,8 +2191,10 @@ static void test_debug_registers(void) ctx.Dr7 = 0x00000400; status = pNtSetContextThread(GetCurrentThread(), &ctx); ok(status == STATUS_SUCCESS, "NtSetContextThread failed with %x\n", status); - thread = CreateThread(NULL, 0, dummy_thread, NULL, CREATE_SUSPENDED, NULL); + + thread = CreateThread(NULL, 0, register_check_thread, NULL, CREATE_SUSPENDED, NULL); ok(thread != INVALID_HANDLE_VALUE, "CreateThread failed with %d\n", GetLastError()); + ctx.ContextFlags = CONTEXT_DEBUG_REGISTERS; status = pNtGetContextThread(thread, &ctx); ok(status == STATUS_SUCCESS, "NtGetContextThread failed with %x\n", status); @@ -2187,7 +2204,9 @@ static void test_debug_registers(void) ok(!ctx.Dr3, "expected 0, got %lx\n", (DWORD_PTR)ctx.Dr3); todo_wine ok(!ctx.Dr6, "expected 0, got %lx\n", (DWORD_PTR)ctx.Dr6); todo_wine ok(!ctx.Dr7, "expected 0, got %lx\n", (DWORD_PTR)ctx.Dr7); - TerminateThread(thread, 0); + + ResumeThread(thread); + WaitForSingleObject(thread, 10000); CloseHandle(thread); }
1
0
0
0
Alexandre Julliard : winebuild: Remove 32-bit register function support.
by Alexandre Julliard
26 Jul '17
26 Jul '17
Module: wine Branch: master Commit: e3a236e6ce368e3d960cfbe3018d3a5cb52a0add URL:
http://source.winehq.org/git/wine.git/?a=commit;h=e3a236e6ce368e3d960cfbe30…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Jul 26 10:43:09 2017 +0200 winebuild: Remove 32-bit register function support. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- tools/winebuild/build.h | 1 - tools/winebuild/relay.c | 207 ----------------------------------------------- tools/winebuild/spec32.c | 1 - 3 files changed, 209 deletions(-) diff --git a/tools/winebuild/build.h b/tools/winebuild/build.h index 398d542..f01ae4f 100644 --- a/tools/winebuild/build.h +++ b/tools/winebuild/build.h @@ -304,7 +304,6 @@ extern void output_bin_res16_directory( DLLSPEC *spec, unsigned int data_offset extern void output_spec16_file( DLLSPEC *spec ); extern void output_fake_module16( DLLSPEC *spec16 ); extern void output_res_o_file( DLLSPEC *spec ); -extern void output_asm_relays(void); extern void output_asm_relays16(void); extern void BuildSpec32File( DLLSPEC *spec ); diff --git a/tools/winebuild/relay.c b/tools/winebuild/relay.c index 1cc6465..4b78f68 100644 --- a/tools/winebuild/relay.c +++ b/tools/winebuild/relay.c @@ -749,190 +749,6 @@ static void BuildCallTo32CBClient( int isEx ) /******************************************************************* - * build_call_from_regs_x86 - * - * Build a 32-bit-to-Wine call-back function for a 'register' function. - * 'args' is the number of dword arguments. - * - * Stack layout: - * ... - * (ebp+20) first arg - * (ebp+16) ret addr to user code - * (ebp+12) func to call (relative to relay code ret addr) - * (ebp+8) number of args - * (ebp+4) ret addr to relay code - * (ebp+0) saved ebp - * (ebp-128) buffer area to allow stack frame manipulation - * (ebp-332) CONTEXT86 struct - * (ebp-336) padding for stack alignment - * (ebp-336-n) CONTEXT86 *argument - * .... other arguments copied from (ebp+12) - * - * The entry point routine is called with a CONTEXT* extra argument, - * following the normal args. In this context structure, EIP_reg - * contains the return address to user code, and ESP_reg the stack - * pointer on return (with the return address and arguments already - * removed). - */ -static void build_call_from_regs_x86(void) -{ - static const int STACK_SPACE = 128 + 0x2cc /* sizeof(CONTEXT86) */; - - /* Function header */ - - output( "\t.text\n" ); - function_header( "__wine_call_from_regs" ); - - /* Allocate some buffer space on the stack */ - - output_cfi( ".cfi_startproc" ); - output( "\tpushl %%ebp\n" ); - output_cfi( ".cfi_adjust_cfa_offset 4" ); - output_cfi( ".cfi_rel_offset %%ebp,0" ); - output( "\tmovl %%esp,%%ebp\n" ); - output_cfi( ".cfi_def_cfa_register %%ebp" ); - output( "\tleal -%d(%%esp),%%esp\n", STACK_SPACE ); - - /* Build the context structure */ - - output( "\tmovl %%eax,0xb0(%%esp)\n" ); /* Eax */ - output( "\tpushfl\n" ); - output( "\tpopl %%eax\n" ); - output( "\tmovl %%eax,0xc0(%%esp)\n"); /* EFlags */ - output( "\tmovl 0(%%ebp),%%eax\n" ); - output( "\tmovl %%eax,0xb4(%%esp)\n"); /* Ebp */ - output( "\tmovl %%ebx,0xa4(%%esp)\n"); /* Ebx */ - output( "\tmovl %%ecx,0xac(%%esp)\n"); /* Ecx */ - output( "\tmovl %%edx,0xa8(%%esp)\n"); /* Edx */ - output( "\tmovl %%esi,0xa0(%%esp)\n"); /* Esi */ - output( "\tmovl %%edi,0x9c(%%esp)\n"); /* Edi */ - - output( "\txorl %%eax,%%eax\n" ); - output( "\tmovw %%cs,%%ax\n" ); - output( "\tmovl %%eax,0xbc(%%esp)\n"); /* SegCs */ - output( "\tmovw %%es,%%ax\n" ); - output( "\tmovl %%eax,0x94(%%esp)\n"); /* SegEs */ - output( "\tmovw %%fs,%%ax\n" ); - output( "\tmovl %%eax,0x90(%%esp)\n"); /* SegFs */ - output( "\tmovw %%gs,%%ax\n" ); - output( "\tmovl %%eax,0x8c(%%esp)\n"); /* SegGs */ - output( "\tmovw %%ss,%%ax\n" ); - output( "\tmovl %%eax,0xc8(%%esp)\n"); /* SegSs */ - output( "\tmovw %%ds,%%ax\n" ); - output( "\tmovl %%eax,0x98(%%esp)\n"); /* SegDs */ - output( "\tmovw %%ax,%%es\n" ); /* set %es equal to %ds just in case */ - - output( "\tmovl $0x10007,0(%%esp)\n"); /* ContextFlags */ - - output( "\tmovl 16(%%ebp),%%eax\n" ); /* Get %eip at time of call */ - output( "\tmovl %%eax,0xb8(%%esp)\n"); /* Eip */ - - /* Transfer the arguments */ - - output( "\tmovl 8(%%ebp),%%ecx\n" ); /* fetch number of args to copy */ - output( "\tleal 4(,%%ecx,4),%%edx\n" ); /* add 4 for context arg */ - output( "\tsubl %%edx,%%esp\n" ); - output( "\tandl $~15,%%esp\n" ); - output( "\tleal 20(%%ebp),%%esi\n" ); /* get %esp at time of call */ - output( "\tmovl %%esp,%%edi\n" ); - output( "\ttest %%ecx,%%ecx\n" ); - output( "\tjz 1f\n" ); - output( "\tcld\n" ); - output( "\trep\n\tmovsl\n" ); /* copy args */ - output( "1:\tleal %d(%%ebp),%%eax\n", -STACK_SPACE ); /* get addr of context struct */ - output( "\tmovl %%eax,(%%edi)\n" ); /* and pass it as extra arg */ - output( "\tmovl %%esi,%d(%%ebp)\n", 0xc4 /* Esp */ - STACK_SPACE ); - - /* Call the entry point */ - - output( "\tmovl 4(%%ebp),%%eax\n" ); /* get relay code addr */ - output( "\taddl 12(%%ebp),%%eax\n" ); - output( "\tcall *%%eax\n" ); - output( "\tleal -%d(%%ebp),%%ecx\n", STACK_SPACE ); - - /* Restore the context structure */ - - output( "2:\tpushl 0x94(%%ecx)\n" ); /* SegEs */ - output( "\tpopl %%es\n" ); - output( "\tpushl 0x90(%%ecx)\n" ); /* SegFs */ - output( "\tpopl %%fs\n" ); - output( "\tpushl 0x8c(%%ecx)\n" ); /* SegGs */ - output( "\tpopl %%gs\n" ); - - output( "\tmovw %%ss,%%ax\n" ); - output( "\tcmpw 0xc8(%%ecx),%%ax\n" ); /* SegSs */ - output( "\tjne 3f\n" ); - - /* As soon as we have switched stacks the context structure could - * be invalid (when signal handlers are executed for example). Copy - * values on the target stack before changing ESP. */ - - output( "\tmovl 0xc4(%%ecx),%%eax\n" ); /* Esp */ - output( "\tleal -4*4(%%eax),%%eax\n" ); - - output( "\tmovl 0xc0(%%ecx),%%edx\n" ); /* EFlags */ - output( "\t.byte 0x36\n\tmovl %%edx,3*4(%%eax)\n" ); - output( "\tmovl 0xbc(%%ecx),%%edx\n" ); /* SegCs */ - output( "\t.byte 0x36\n\tmovl %%edx,2*4(%%eax)\n" ); - output( "\tmovl 0xb8(%%ecx),%%edx\n" ); /* Eip */ - output( "\t.byte 0x36\n\tmovl %%edx,1*4(%%eax)\n" ); - output( "\tmovl 0xb0(%%ecx),%%edx\n" ); /* Eax */ - output( "\t.byte 0x36\n\tmovl %%edx,0*4(%%eax)\n" ); - - output( "\tpushl 0x98(%%ecx)\n" ); /* SegDs */ - - output( "\tmovl 0x9c(%%ecx),%%edi\n" ); /* Edi */ - output( "\tmovl 0xa0(%%ecx),%%esi\n" ); /* Esi */ - output( "\tmovl 0xa4(%%ecx),%%ebx\n" ); /* Ebx */ - output( "\tmovl 0xa8(%%ecx),%%edx\n" ); /* Edx */ - output( "\tmovl 0xb4(%%ecx),%%ebp\n" ); /* Ebp */ - output( "\tmovl 0xac(%%ecx),%%ecx\n" ); /* Ecx */ - - output( "\tpopl %%ds\n" ); - output( "\tmovl %%eax,%%esp\n" ); - - output( "\tpopl %%eax\n" ); - output( "\tiret\n" ); - - output("3:\n"); - - /* Restore the context when the stack segment changes. We can't use - * the same code as above because we do not know if the stack segment - * is 16 or 32 bit, and 'movl' will throw an exception when we try to - * access memory above the limit. */ - - output( "\tmovl 0x9c(%%ecx),%%edi\n" ); /* Edi */ - output( "\tmovl 0xa0(%%ecx),%%esi\n" ); /* Esi */ - output( "\tmovl 0xa4(%%ecx),%%ebx\n" ); /* Ebx */ - output( "\tmovl 0xa8(%%ecx),%%edx\n" ); /* Edx */ - output( "\tmovl 0xb0(%%ecx),%%eax\n" ); /* Eax */ - output( "\tmovl 0xb4(%%ecx),%%ebp\n" ); /* Ebp */ - - output( "\tpushl 0xc8(%%ecx)\n" ); /* SegSs */ - output( "\tpopl %%ss\n" ); - output( "\tmovl 0xc4(%%ecx),%%esp\n" ); /* Esp */ - - output( "\tpushl 0xc0(%%ecx)\n" ); /* EFlags */ - output( "\tpushl 0xbc(%%ecx)\n" ); /* SegCs */ - output( "\tpushl 0xb8(%%ecx)\n" ); /* Eip */ - output( "\tpushl 0x98(%%ecx)\n" ); /* SegDs */ - output( "\tmovl 0xac(%%ecx),%%ecx\n" ); /* Ecx */ - - output( "\tpopl %%ds\n" ); - output( "\tiret\n" ); - output_cfi( ".cfi_endproc" ); - output_function_size( "__wine_call_from_regs" ); - - function_header( "__wine_restore_regs" ); - output_cfi( ".cfi_startproc" ); - output( "\tmovl 4(%%esp),%%ecx\n" ); - output( "\tjmp 2b\n" ); - output_cfi( ".cfi_endproc" ); - output_function_size( "__wine_restore_regs" ); -} - - -/******************************************************************* * BuildPendingEventCheck * * Build a function that checks whether there are any @@ -1027,27 +843,4 @@ void output_asm_relays16(void) output( "\n\t.data\n\t.align %d\n", get_alignment(4) ); output( "%s\n\t.long 0\n", asm_globl("CallTo16_DataSelector") ); output( "%s\n\t.long 0\n", asm_globl("CallTo16_TebSelector") ); - - output( "\t.text\n" ); - output( "%s:\n", asm_name("__wine_spec_thunk_text_32") ); - build_call_from_regs_x86(); - output_function_size( "__wine_spec_thunk_text_32" ); -} - - -/******************************************************************* - * output_asm_relays - * - * Build all the assembly relay callbacks - */ -void output_asm_relays(void) -{ - switch (target_cpu) - { - case CPU_x86: - build_call_from_regs_x86(); - break; - default: - break; - } } diff --git a/tools/winebuild/spec32.c b/tools/winebuild/spec32.c index 6536cd8..4a01238 100644 --- a/tools/winebuild/spec32.c +++ b/tools/winebuild/spec32.c @@ -651,7 +651,6 @@ void BuildSpec32File( DLLSPEC *spec ) output_stubs( spec ); output_exports( spec ); output_imports( spec ); - if (is_undefined( "__wine_call_from_regs" )) output_asm_relays(); if (needs_get_pc_thunk) output_get_pc_thunk(); output_resources( spec ); output_gnu_stack_note();
1
0
0
0
Alexandre Julliard : winebuild: Disallow register functions in 32-bit modules.
by Alexandre Julliard
26 Jul '17
26 Jul '17
Module: wine Branch: master Commit: 9fd4647977b4ec17b827f563c675436e6ffe380b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=9fd4647977b4ec17b827f563c…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Jul 26 10:42:48 2017 +0200 winebuild: Disallow register functions in 32-bit modules. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- tools/winebuild/parser.c | 12 ++++++++++++ tools/winebuild/spec32.c | 24 ++++++------------------ 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/tools/winebuild/parser.c b/tools/winebuild/parser.c index 2762a8c..ad99654 100644 --- a/tools/winebuild/parser.c +++ b/tools/winebuild/parser.c @@ -498,6 +498,18 @@ static const char *parse_spec_flags( DLLSPEC *spec, ORDDEF *odp ) error( "Unknown flag '%s'\n", token ); return NULL; } + switch (1 << i) + { + case FLAG_RET16: + case FLAG_REGISTER: + if (spec->type == SPEC_WIN32) + error( "Flag '%s' is not supported in Win32\n", FlagNames[i] ); + break; + case FLAG_RET64: + if (spec->type == SPEC_WIN16) + error( "Flag '%s' is not supported in Win16\n", FlagNames[i] ); + break; + } odp->flags |= 1 << i; } token = GetToken(0); diff --git a/tools/winebuild/spec32.c b/tools/winebuild/spec32.c index 39733b2..6536cd8 100644 --- a/tools/winebuild/spec32.c +++ b/tools/winebuild/spec32.c @@ -68,8 +68,6 @@ static inline int needs_relay( const ORDDEF *odp ) } /* skip norelay and forward entry points */ if (odp->flags & (FLAG_NORELAY|FLAG_FORWARD)) return 0; - /* skip register entry points on x86_64 */ - if (target_cpu == CPU_x86_64 && (odp->flags & FLAG_REGISTER)) return 0; return 1; } @@ -179,10 +177,7 @@ static void output_relay_debug( DLLSPEC *spec ) output( "\tpushl %%eax\n" ); flags |= 2; } - if (odp->flags & FLAG_REGISTER) - output( "\tpushl %%eax\n" ); - else - output( "\tpushl %%esp\n" ); + output( "\tpushl %%esp\n" ); output_cfi( ".cfi_adjust_cfa_offset 4" ); if (odp->flags & FLAG_RET64) flags |= 1; @@ -199,19 +194,12 @@ static void output_relay_debug( DLLSPEC *spec ) output( "\tpushl %%eax\n" ); output_cfi( ".cfi_adjust_cfa_offset 4" ); - if (odp->flags & FLAG_REGISTER) - { - output( "\tcall *8(%%eax)\n" ); - } + output( "\tcall *4(%%eax)\n" ); + output_cfi( ".cfi_adjust_cfa_offset -12" ); + if (odp->type == TYPE_STDCALL || odp->type == TYPE_THISCALL) + output( "\tret $%u\n", args * get_ptr_size() ); else - { - output( "\tcall *4(%%eax)\n" ); - output_cfi( ".cfi_adjust_cfa_offset -12" ); - if (odp->type == TYPE_STDCALL || odp->type == TYPE_THISCALL) - output( "\tret $%u\n", args * get_ptr_size() ); - else - output( "\tret\n" ); - } + output( "\tret\n" ); break; case CPU_ARM:
1
0
0
0
Alexandre Julliard : ntdll: Remove support for relay debugging of register functions.
by Alexandre Julliard
26 Jul '17
26 Jul '17
Module: wine Branch: master Commit: ca20bddefc8c1c4331fc18cb0f7dc28f9288c7d8 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=ca20bddefc8c1c4331fc18cb0…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Jul 26 10:41:27 2017 +0200 ntdll: Remove support for relay debugging of register functions. The only remaining ones in krnl386 have been removed. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ntdll/ntdll_misc.h | 12 -------- dlls/ntdll/relay.c | 81 +------------------------------------------------ 2 files changed, 1 insertion(+), 92 deletions(-) diff --git a/dlls/ntdll/ntdll_misc.h b/dlls/ntdll/ntdll_misc.h index ba296d2..c97b1e1 100644 --- a/dlls/ntdll/ntdll_misc.h +++ b/dlls/ntdll/ntdll_misc.h @@ -239,18 +239,6 @@ static inline struct ntdll_thread_data *ntdll_get_thread_data(void) extern mode_t FILE_umask DECLSPEC_HIDDEN; extern HANDLE keyed_event DECLSPEC_HIDDEN; -/* Register functions */ - -#ifdef __i386__ -#define DEFINE_REGS_ENTRYPOINT( name, args ) \ - __ASM_GLOBAL_FUNC( name, \ - ".byte 0x68\n\t" /* pushl $__regs_func */ \ - ".long " __ASM_NAME("__regs_") #name "-.-11\n\t" \ - ".byte 0x6a," #args "\n\t" /* pushl $args */ \ - "call " __ASM_NAME("__wine_call_from_regs") "\n\t" \ - "ret $(4*" #args ")" ) /* fake ret to make copy protections happy */ -#endif - #define HASH_STRING_ALGORITHM_DEFAULT 0 #define HASH_STRING_ALGORITHM_X65599 1 #define HASH_STRING_ALGORITHM_INVALID 0xffffffff diff --git a/dlls/ntdll/relay.c b/dlls/ntdll/relay.c index 30cb953..f16b4fc 100644 --- a/dlls/ntdll/relay.c +++ b/dlls/ntdll/relay.c @@ -47,7 +47,7 @@ struct relay_descr /* descriptor for a module */ { void *magic; /* signature */ void *relay_call; /* functions to call from relay thunks */ - void *relay_call_regs; + void *relay_call_regs; /* no longer used */ void *private; /* reserved for the relay code private data */ const char *entry_point_base; /* base address of entry point thunks */ const unsigned int *entry_point_offsets; /* offsets of entry points thunks */ @@ -481,70 +481,6 @@ __ASM_GLOBAL_FUNC( relay_call, __ASM_CFI(".cfi_same_value %ebp\n\t") "ret $12" ) -void WINAPI DECLSPEC_HIDDEN __regs_relay_call_regs( struct relay_descr *descr, unsigned int idx, - unsigned int orig_eax, unsigned int ret_addr, - CONTEXT *context ) -{ - WORD ordinal = LOWORD(idx); - BYTE nb_args = LOBYTE(HIWORD(idx)); - struct relay_private_data *data = descr->private; - struct relay_entry_point *entry_point = data->entry_points + ordinal; - BYTE *orig_func = entry_point->orig_func; - INT_PTR *args = (INT_PTR *)context->Esp; - INT_PTR args_copy[32]; - - /* restore the context to what it was before the relay thunk */ - context->Eax = orig_eax; - context->Eip = ret_addr; - context->Esp += nb_args * sizeof(int); - - if (TRACE_ON(relay)) - { - if (entry_point->name) - DPRINTF( "%04x:Call %s.%s(", GetCurrentThreadId(), data->dllname, entry_point->name ); - else - DPRINTF( "%04x:Call %s.%u(", GetCurrentThreadId(), data->dllname, data->base + ordinal ); - RELAY_PrintArgs( args, nb_args, descr->arg_types[ordinal] ); - DPRINTF( ") ret=%08x\n", ret_addr ); - - DPRINTF( "%04x: eax=%08x ebx=%08x ecx=%08x edx=%08x esi=%08x edi=%08x " - "ebp=%08x esp=%08x ds=%04x es=%04x fs=%04x gs=%04x flags=%08x\n", - GetCurrentThreadId(), context->Eax, context->Ebx, context->Ecx, - context->Edx, context->Esi, context->Edi, context->Ebp, context->Esp, - context->SegDs, context->SegEs, context->SegFs, context->SegGs, context->EFlags ); - - assert( orig_func[0] == 0x68 /* pushl func */ ); - assert( orig_func[5] == 0x6a /* pushl args */ ); - assert( orig_func[7] == 0xe8 /* call */ ); - } - - /* now call the real function */ - - memcpy( args_copy, args, nb_args * sizeof(args[0]) ); - args_copy[nb_args++] = (INT_PTR)context; /* append context argument */ - - call_entry_point( orig_func + 12 + *(int *)(orig_func + 1), nb_args, args_copy, 0 ); - - if (TRACE_ON(relay)) - { - if (entry_point->name) - DPRINTF( "%04x:Ret %s.%s() retval=%08x ret=%08x\n", - GetCurrentThreadId(), data->dllname, entry_point->name, - context->Eax, context->Eip ); - else - DPRINTF( "%04x:Ret %s.%u() retval=%08x ret=%08x\n", - GetCurrentThreadId(), data->dllname, data->base + ordinal, - context->Eax, context->Eip ); - DPRINTF( "%04x: eax=%08x ebx=%08x ecx=%08x edx=%08x esi=%08x edi=%08x " - "ebp=%08x esp=%08x ds=%04x es=%04x fs=%04x gs=%04x flags=%08x\n", - GetCurrentThreadId(), context->Eax, context->Ebx, context->Ecx, - context->Edx, context->Esi, context->Edi, context->Ebp, context->Esp, - context->SegDs, context->SegEs, context->SegFs, context->SegGs, context->EFlags ); - } -} -extern void WINAPI relay_call_regs(void); -DEFINE_REGS_ENTRYPOINT( relay_call_regs, 4 ) - #elif defined(__arm__) extern LONGLONG CDECL call_entry_point( void *func, int nb_args, const INT_PTR *args, int flags ); @@ -591,10 +527,6 @@ static LONGLONG WINAPI relay_call( struct relay_descr *descr, unsigned int idx, return ret; } -static void WINAPI relay_call_regs( struct relay_descr *descr, INT_PTR idx, INT_PTR *stack ) -{ - assert(0); /* should never be called */ -} #elif defined(__aarch64__) extern LONGLONG CDECL call_entry_point( void *func, int nb_args, const INT_PTR *args, int flags ); @@ -650,11 +582,6 @@ static LONGLONG WINAPI relay_call( struct relay_descr *descr, unsigned int idx, return ret; } -static void WINAPI relay_call_regs( struct relay_descr *descr, INT_PTR idx, INT_PTR *stack ) -{ - assert(0); /* should never be called */ -} - #elif defined(__x86_64__) extern void * WINAPI relay_call( struct relay_descr *descr, unsigned int idx, const INT_PTR *stack ); @@ -719,11 +646,6 @@ __ASM_GLOBAL_FUNC( relay_call, __ASM_CFI(".cfi_same_value %rbp\n\t") "ret") -static void WINAPI relay_call_regs( struct relay_descr *descr, INT_PTR idx, INT_PTR *stack ) -{ - assert(0); /* should never be called */ -} - #else #error Not supported on this CPU #endif @@ -776,7 +698,6 @@ void RELAY_SetupDLL( HMODULE module ) return; descr->relay_call = relay_call; - descr->relay_call_regs = relay_call_regs; descr->private = data; data->module = module;
1
0
0
0
Alexandre Julliard : ntdll: Set thread context directly in assembly instead of using generated code.
by Alexandre Julliard
26 Jul '17
26 Jul '17
Module: wine Branch: master Commit: bab6ece6375fc0bf0ee62cd7519371360f114355 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=bab6ece6375fc0bf0ee62cd75…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Jul 26 10:22:05 2017 +0200 ntdll: Set thread context directly in assembly instead of using generated code. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ntdll/signal_i386.c | 61 ++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 57 insertions(+), 4 deletions(-) diff --git a/dlls/ntdll/signal_i386.c b/dlls/ntdll/signal_i386.c index 465ac1f..ca73e9a 100644 --- a/dlls/ntdll/signal_i386.c +++ b/dlls/ntdll/signal_i386.c @@ -480,8 +480,6 @@ static wine_signal_handler handlers[256]; static BOOL fpux_support; /* whether the CPU supports extended fpu context */ -extern void DECLSPEC_NORETURN __wine_restore_regs( const CONTEXT *context ); - enum i386_trap_code { TRAP_x86_UNKNOWN = -1, /* Unknown fault (TRAP_sig not defined) */ @@ -1252,6 +1250,61 @@ __ASM_STDCALL_FUNC( RtlCaptureContext, 4, __ASM_CFI(".cfi_adjust_cfa_offset -4\n\t") "ret $4" ) +/*********************************************************************** + * set_full_cpu_context + * + * Set the new CPU context. + */ +extern void set_full_cpu_context( const CONTEXT *context ); +__ASM_GLOBAL_FUNC( set_full_cpu_context, + "movl 4(%esp),%ecx\n\t" + "movw 0x8c(%ecx),%gs\n\t" /* SegGs */ + "movw 0x90(%ecx),%fs\n\t" /* SegFs */ + "movw 0x94(%ecx),%es\n\t" /* SegEs */ + "movl 0x9c(%ecx),%edi\n\t" /* Edi */ + "movl 0xa0(%ecx),%esi\n\t" /* Esi */ + "movl 0xa4(%ecx),%ebx\n\t" /* Ebx */ + "movl 0xb4(%ecx),%ebp\n\t" /* Ebp */ + "movw %ss,%ax\n\t" + "cmpw 0xc8(%ecx),%ax\n\t" /* SegSs */ + "jne 1f\n\t" + /* As soon as we have switched stacks the context structure could + * be invalid (when signal handlers are executed for example). Copy + * values on the target stack before changing ESP. */ + "movl 0xc4(%ecx),%eax\n\t" /* Esp */ + "leal -4*4(%eax),%eax\n\t" + "movl 0xc0(%ecx),%edx\n\t" /* EFlags */ + "movl %edx,3*4(%eax)\n\t" + "movl 0xbc(%ecx),%edx\n\t" /* SegCs */ + "movl %edx,2*4(%eax)\n\t" + "movl 0xb8(%ecx),%edx\n\t" /* Eip */ + "movl %edx,1*4(%eax)\n\t" + "movl 0xb0(%ecx),%edx\n\t" /* Eax */ + "movl %edx,0*4(%eax)\n\t" + "pushl 0x98(%ecx)\n\t" /* SegDs */ + "movl 0xa8(%ecx),%edx\n\t" /* Edx */ + "movl 0xac(%ecx),%ecx\n\t" /* Ecx */ + "popl %ds\n\t" + "movl %eax,%esp\n\t" + "popl %eax\n\t" + "iret\n" + /* Restore the context when the stack segment changes. We can't use + * the same code as above because we do not know if the stack segment + * is 16 or 32 bit, and 'movl' will throw an exception when we try to + * access memory above the limit. */ + "1:\n\t" + "movl 0xa8(%ecx),%edx\n\t" /* Edx */ + "movl 0xb0(%ecx),%eax\n\t" /* Eax */ + "movw 0xc8(%ecx),%ss\n\t" /* SegSs */ + "movl 0xc4(%ecx),%esp\n\t" /* Esp */ + "pushl 0xc0(%ecx)\n\t" /* EFlags */ + "pushl 0xbc(%ecx)\n\t" /* SegCs */ + "pushl 0xb8(%ecx)\n\t" /* Eip */ + "pushl 0x98(%ecx)\n\t" /* SegDs */ + "movl 0xac(%ecx),%ecx\n\t" /* Ecx */ + "popl %ds\n\t" + "iret" ) + /*********************************************************************** * set_cpu_context @@ -1279,7 +1332,7 @@ static void set_cpu_context( const CONTEXT *context ) if (!(flags & CONTEXT_CONTROL)) FIXME( "setting partial context (%x) not supported\n", flags ); else if (flags & CONTEXT_SEGMENTS) - __wine_restore_regs( context ); + set_full_cpu_context( context ); else { CONTEXT newcontext = *context; @@ -1287,7 +1340,7 @@ static void set_cpu_context( const CONTEXT *context ) newcontext.SegEs = wine_get_es(); newcontext.SegFs = wine_get_fs(); newcontext.SegGs = wine_get_gs(); - __wine_restore_regs( &newcontext ); + set_full_cpu_context( &newcontext ); } } }
1
0
0
0
Vincent Povirk : gdiplus/tests: Enable floating point exceptions.
by Alexandre Julliard
26 Jul '17
26 Jul '17
Module: wine Branch: master Commit: 8f54e2034e962950a47e762c73fdbf7762a14892 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=8f54e2034e962950a47e762c7…
Author: Vincent Povirk <vincent(a)codeweavers.com> Date: Tue Jul 25 15:15:48 2017 -0500 gdiplus/tests: Enable floating point exceptions. Signed-off-by: Vincent Povirk <vincent(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/gdiplus/tests/brush.c | 7 +++++++ dlls/gdiplus/tests/customlinecap.c | 7 +++++++ dlls/gdiplus/tests/font.c | 7 +++++++ dlls/gdiplus/tests/graphics.c | 7 +++++++ dlls/gdiplus/tests/graphicspath.c | 7 +++++++ dlls/gdiplus/tests/image.c | 7 +++++++ dlls/gdiplus/tests/matrix.c | 7 +++++++ dlls/gdiplus/tests/metafile.c | 7 +++++++ dlls/gdiplus/tests/pathiterator.c | 7 +++++++ dlls/gdiplus/tests/pen.c | 7 +++++++ dlls/gdiplus/tests/region.c | 7 +++++++ dlls/gdiplus/tests/stringformat.c | 7 +++++++ 12 files changed, 84 insertions(+) diff --git a/dlls/gdiplus/tests/brush.c b/dlls/gdiplus/tests/brush.c index 0942e88..9fd80d2 100644 --- a/dlls/gdiplus/tests/brush.c +++ b/dlls/gdiplus/tests/brush.c @@ -1273,6 +1273,13 @@ START_TEST(brush) { struct GdiplusStartupInput gdiplusStartupInput; ULONG_PTR gdiplusToken; + HMODULE hmsvcrt; + int (CDECL * _controlfp_s)(unsigned int *cur, unsigned int newval, unsigned int mask); + + /* Enable all FP exceptions except _EM_INEXACT, which gdi32 can trigger */ + hmsvcrt = LoadLibraryA("msvcrt"); + _controlfp_s = (void*)GetProcAddress(hmsvcrt, "_controlfp_s"); + if (_controlfp_s) _controlfp_s(0, 0, 0x0008001e); gdiplusStartupInput.GdiplusVersion = 1; gdiplusStartupInput.DebugEventCallback = NULL; diff --git a/dlls/gdiplus/tests/customlinecap.c b/dlls/gdiplus/tests/customlinecap.c index 704f70e..bac80ad 100644 --- a/dlls/gdiplus/tests/customlinecap.c +++ b/dlls/gdiplus/tests/customlinecap.c @@ -315,6 +315,13 @@ START_TEST(customlinecap) { struct GdiplusStartupInput gdiplusStartupInput; ULONG_PTR gdiplusToken; + HMODULE hmsvcrt; + int (CDECL * _controlfp_s)(unsigned int *cur, unsigned int newval, unsigned int mask); + + /* Enable all FP exceptions except _EM_INEXACT, which gdi32 can trigger */ + hmsvcrt = LoadLibraryA("msvcrt"); + _controlfp_s = (void*)GetProcAddress(hmsvcrt, "_controlfp_s"); + if (_controlfp_s) _controlfp_s(0, 0, 0x0008001e); gdiplusStartupInput.GdiplusVersion = 1; gdiplusStartupInput.DebugEventCallback = NULL; diff --git a/dlls/gdiplus/tests/font.c b/dlls/gdiplus/tests/font.c index dd624a4..2cae481 100644 --- a/dlls/gdiplus/tests/font.c +++ b/dlls/gdiplus/tests/font.c @@ -1114,6 +1114,13 @@ START_TEST(font) { struct GdiplusStartupInput gdiplusStartupInput; ULONG_PTR gdiplusToken; + HMODULE hmsvcrt; + int (CDECL * _controlfp_s)(unsigned int *cur, unsigned int newval, unsigned int mask); + + /* Enable all FP exceptions except _EM_INEXACT, which gdi32 can trigger */ + hmsvcrt = LoadLibraryA("msvcrt"); + _controlfp_s = (void*)GetProcAddress(hmsvcrt, "_controlfp_s"); + if (_controlfp_s) _controlfp_s(0, 0, 0x0008001e); gdiplusStartupInput.GdiplusVersion = 1; gdiplusStartupInput.DebugEventCallback = NULL; diff --git a/dlls/gdiplus/tests/graphics.c b/dlls/gdiplus/tests/graphics.c index 529f1a2..4dcfac8 100644 --- a/dlls/gdiplus/tests/graphics.c +++ b/dlls/gdiplus/tests/graphics.c @@ -6154,6 +6154,13 @@ START_TEST(graphics) struct GdiplusStartupInput gdiplusStartupInput; ULONG_PTR gdiplusToken; WNDCLASSA class; + HMODULE hmsvcrt; + int (CDECL * _controlfp_s)(unsigned int *cur, unsigned int newval, unsigned int mask); + + /* Enable all FP exceptions except _EM_INEXACT, which gdi32 can trigger */ + hmsvcrt = LoadLibraryA("msvcrt"); + _controlfp_s = (void*)GetProcAddress(hmsvcrt, "_controlfp_s"); + if (_controlfp_s) _controlfp_s(0, 0, 0x0008001e); memset( &class, 0, sizeof(class) ); class.lpszClassName = "gdiplus_test"; diff --git a/dlls/gdiplus/tests/graphicspath.c b/dlls/gdiplus/tests/graphicspath.c index 2a94e84..9a6dde3 100644 --- a/dlls/gdiplus/tests/graphicspath.c +++ b/dlls/gdiplus/tests/graphicspath.c @@ -1329,6 +1329,13 @@ START_TEST(graphicspath) { struct GdiplusStartupInput gdiplusStartupInput; ULONG_PTR gdiplusToken; + HMODULE hmsvcrt; + int (CDECL * _controlfp_s)(unsigned int *cur, unsigned int newval, unsigned int mask); + + /* Enable all FP exceptions except _EM_INEXACT, which gdi32 can trigger */ + hmsvcrt = LoadLibraryA("msvcrt"); + _controlfp_s = (void*)GetProcAddress(hmsvcrt, "_controlfp_s"); + if (_controlfp_s) _controlfp_s(0, 0, 0x0008001e); gdiplusStartupInput.GdiplusVersion = 1; gdiplusStartupInput.DebugEventCallback = NULL; diff --git a/dlls/gdiplus/tests/image.c b/dlls/gdiplus/tests/image.c index 0ef72b2..225dc54 100644 --- a/dlls/gdiplus/tests/image.c +++ b/dlls/gdiplus/tests/image.c @@ -4971,6 +4971,13 @@ START_TEST(image) HMODULE mod = GetModuleHandleA("gdiplus.dll"); struct GdiplusStartupInput gdiplusStartupInput; ULONG_PTR gdiplusToken; + HMODULE hmsvcrt; + int (CDECL * _controlfp_s)(unsigned int *cur, unsigned int newval, unsigned int mask); + + /* Enable all FP exceptions except _EM_INEXACT, which gdi32 can trigger */ + hmsvcrt = LoadLibraryA("msvcrt"); + _controlfp_s = (void*)GetProcAddress(hmsvcrt, "_controlfp_s"); + if (_controlfp_s) _controlfp_s(0, 0, 0x0008001e); gdiplusStartupInput.GdiplusVersion = 1; gdiplusStartupInput.DebugEventCallback = NULL; diff --git a/dlls/gdiplus/tests/matrix.c b/dlls/gdiplus/tests/matrix.c index a2e0595..1e4f48d 100644 --- a/dlls/gdiplus/tests/matrix.c +++ b/dlls/gdiplus/tests/matrix.c @@ -343,6 +343,13 @@ START_TEST(matrix) { struct GdiplusStartupInput gdiplusStartupInput; ULONG_PTR gdiplusToken; + HMODULE hmsvcrt; + int (CDECL * _controlfp_s)(unsigned int *cur, unsigned int newval, unsigned int mask); + + /* Enable all FP exceptions except _EM_INEXACT, which gdi32 can trigger */ + hmsvcrt = LoadLibraryA("msvcrt"); + _controlfp_s = (void*)GetProcAddress(hmsvcrt, "_controlfp_s"); + if (_controlfp_s) _controlfp_s(0, 0, 0x0008001e); gdiplusStartupInput.GdiplusVersion = 1; gdiplusStartupInput.DebugEventCallback = NULL; diff --git a/dlls/gdiplus/tests/metafile.c b/dlls/gdiplus/tests/metafile.c index 3b6bced..26716c4 100644 --- a/dlls/gdiplus/tests/metafile.c +++ b/dlls/gdiplus/tests/metafile.c @@ -2745,6 +2745,13 @@ START_TEST(metafile) ULONG_PTR gdiplusToken; int myARGC; char **myARGV; + HMODULE hmsvcrt; + int (CDECL * _controlfp_s)(unsigned int *cur, unsigned int newval, unsigned int mask); + + /* Enable all FP exceptions except _EM_INEXACT, which gdi32 can trigger */ + hmsvcrt = LoadLibraryA("msvcrt"); + _controlfp_s = (void*)GetProcAddress(hmsvcrt, "_controlfp_s"); + if (_controlfp_s) _controlfp_s(0, 0, 0x0008001e); gdiplusStartupInput.GdiplusVersion = 1; gdiplusStartupInput.DebugEventCallback = NULL; diff --git a/dlls/gdiplus/tests/pathiterator.c b/dlls/gdiplus/tests/pathiterator.c index e606be3..3f6292c 100644 --- a/dlls/gdiplus/tests/pathiterator.c +++ b/dlls/gdiplus/tests/pathiterator.c @@ -559,6 +559,13 @@ START_TEST(pathiterator) { struct GdiplusStartupInput gdiplusStartupInput; ULONG_PTR gdiplusToken; + HMODULE hmsvcrt; + int (CDECL * _controlfp_s)(unsigned int *cur, unsigned int newval, unsigned int mask); + + /* Enable all FP exceptions except _EM_INEXACT, which gdi32 can trigger */ + hmsvcrt = LoadLibraryA("msvcrt"); + _controlfp_s = (void*)GetProcAddress(hmsvcrt, "_controlfp_s"); + if (_controlfp_s) _controlfp_s(0, 0, 0x0008001e); gdiplusStartupInput.GdiplusVersion = 1; gdiplusStartupInput.DebugEventCallback = NULL; diff --git a/dlls/gdiplus/tests/pen.c b/dlls/gdiplus/tests/pen.c index 19a180b..ded6e64 100644 --- a/dlls/gdiplus/tests/pen.c +++ b/dlls/gdiplus/tests/pen.c @@ -455,6 +455,13 @@ START_TEST(pen) { struct GdiplusStartupInput gdiplusStartupInput; ULONG_PTR gdiplusToken; + HMODULE hmsvcrt; + int (CDECL * _controlfp_s)(unsigned int *cur, unsigned int newval, unsigned int mask); + + /* Enable all FP exceptions except _EM_INEXACT, which gdi32 can trigger */ + hmsvcrt = LoadLibraryA("msvcrt"); + _controlfp_s = (void*)GetProcAddress(hmsvcrt, "_controlfp_s"); + if (_controlfp_s) _controlfp_s(0, 0, 0x0008001e); test_startup(); diff --git a/dlls/gdiplus/tests/region.c b/dlls/gdiplus/tests/region.c index 2bf4470..06c47d9 100644 --- a/dlls/gdiplus/tests/region.c +++ b/dlls/gdiplus/tests/region.c @@ -2262,6 +2262,13 @@ START_TEST(region) { struct GdiplusStartupInput gdiplusStartupInput; ULONG_PTR gdiplusToken; + HMODULE hmsvcrt; + int (CDECL * _controlfp_s)(unsigned int *cur, unsigned int newval, unsigned int mask); + + /* Enable all FP exceptions except _EM_INEXACT, which gdi32 can trigger */ + hmsvcrt = LoadLibraryA("msvcrt"); + _controlfp_s = (void*)GetProcAddress(hmsvcrt, "_controlfp_s"); + if (_controlfp_s) _controlfp_s(0, 0, 0x0008001e); gdiplusStartupInput.GdiplusVersion = 1; gdiplusStartupInput.DebugEventCallback = NULL; diff --git a/dlls/gdiplus/tests/stringformat.c b/dlls/gdiplus/tests/stringformat.c index 0774e1b..71fb860 100644 --- a/dlls/gdiplus/tests/stringformat.c +++ b/dlls/gdiplus/tests/stringformat.c @@ -438,6 +438,13 @@ START_TEST(stringformat) { struct GdiplusStartupInput gdiplusStartupInput; ULONG_PTR gdiplusToken; + HMODULE hmsvcrt; + int (CDECL * _controlfp_s)(unsigned int *cur, unsigned int newval, unsigned int mask); + + /* Enable all FP exceptions except _EM_INEXACT, which gdi32 can trigger */ + hmsvcrt = LoadLibraryA("msvcrt"); + _controlfp_s = (void*)GetProcAddress(hmsvcrt, "_controlfp_s"); + if (_controlfp_s) _controlfp_s(0, 0, 0x0008001e); gdiplusStartupInput.GdiplusVersion = 1; gdiplusStartupInput.DebugEventCallback = NULL;
1
0
0
0
Vincent Povirk : gdiplus: Fix a possible floating point exception in path gradients.
by Alexandre Julliard
26 Jul '17
26 Jul '17
Module: wine Branch: master Commit: 331a7af37a432eb719c1c03400421172a820181b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=331a7af37a432eb719c1c0340…
Author: Vincent Povirk <vincent(a)codeweavers.com> Date: Tue Jul 25 14:55:36 2017 -0500 gdiplus: Fix a possible floating point exception in path gradients. Signed-off-by: Vincent Povirk <vincent(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/gdiplus/graphics.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/dlls/gdiplus/graphics.c b/dlls/gdiplus/graphics.c index 43cd6ac..543593e 100644 --- a/dlls/gdiplus/graphics.c +++ b/dlls/gdiplus/graphics.c @@ -1493,8 +1493,17 @@ static GpStatus brush_fill_pixels(GpGraphics *graphics, GpBrush *brush, REAL blend_amount, pdy, pdx; pdy = yf - center_point.Y; pdx = xf - center_point.X; - blend_amount = ( (center_point.Y - start_point.Y) * pdx + (start_point.X - center_point.X) * pdy ) / ( dy * pdx - dx * pdy ); - outer_color = blend_colors(start_color, end_color, blend_amount); + + if (fabs(pdx) <= 0.001 && fabs(pdy) <= 0.001) + { + /* Too close to center point, don't try to calculate outer color */ + outer_color = start_color; + } + else + { + blend_amount = ( (center_point.Y - start_point.Y) * pdx + (start_point.X - center_point.X) * pdy ) / ( dy * pdx - dx * pdy ); + outer_color = blend_colors(start_color, end_color, blend_amount); + } } distance = (end_point.Y - start_point.Y) * (start_point.X - xf) +
1
0
0
0
Rosanne DiMesio : Handle newlines and quotes in common replies
by Jeremy Newman
26 Jul '17
26 Jul '17
Module: appdb Branch: master Commit: 128c4a156bc4b81c270cce9c1958718b20cca763 URL:
http://source.winehq.org/git/appdb.git/?a=commit;h=128c4a156bc4b81c270cce9c…
Author: Rosanne DiMesio <dimesio(a)earthlink.net> Date: Wed Jul 26 13:18:31 2017 -0500 Handle newlines and quotes in common replies Fixes bug 28687. Signed-off-by: Rosanne DiMesio <dimesio(a)earthlink.net> Signed-off-by: Jeremy Newman <jnewman(a)codeweavers.com> --- css/styles.css | 4 ++++ include/objectManager.php | 9 +++++---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/css/styles.css b/css/styles.css index eaf2822..0ff3e35 100644 --- a/css/styles.css +++ b/css/styles.css @@ -357,6 +357,10 @@ A:hover { color: #FF6666; text-decoration: underline; } A:active { color: #FF0000; } A.hidden { text-decoration: none; color: #000000; } +/* Format a span to look like a hyperlink */ +.pseudolink { color: #A50D0D; cursor: pointer; } +.pseudolink:hover { text-decoration: underline; } + /* Padding and Margin Removal */ .nomargin { margin: 0px !important; } .nomargin-top { margin-top: 0px !important; } diff --git a/include/objectManager.php b/include/objectManager.php index 331992b..36df560 100644 --- a/include/objectManager.php +++ b/include/objectManager.php @@ -425,7 +425,7 @@ class ObjectManager if($this->getIsQueue()) { ///////////////////////////////////////////////// - // output radio buttons for some common responses + // output some common responses $oTag = new TagCommonReply(null, null, "_show_for_{$this->sClass}"); $aReplies = $oTag->getTaggedEntries(); @@ -444,10 +444,11 @@ class ObjectManager { $sReply = $oReply->getReply(); echo '<tr valign=top><td class="color0"></td>',"\n"; - echo '<td class="color0"><a onClick="document.forms[\'sQform\'][\'sReplyText\'].value += \''.$sReply.' \';">'.$sReply.'</a></td>',"\n"; - echo '</tr>',"\n"; + echo '<td class="color0">'; + echo '<span class="pseudolink" onClick="document.forms[\'sQform\'][\'sReplyText\'].value += \''.addcslashes(htmlspecialchars($sReply),"'\r\n").' \';">'.nl2br($sReply).'</span>'; + echo '</td>',"\n"; } - // end output radio buttons for common responses + // end output for common responses ///////////////////////////////////////////////// }
1
0
0
0
← Newer
1
2
3
4
5
6
7
...
64
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
Results per page:
10
25
50
100
200