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
March 2024
----- 2025 -----
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
1 participants
775 discussions
Start a n
N
ew thread
Eric Pouech : dbghelp: Rework loading of PDB string table.
by Alexandre Julliard
05 Mar '24
05 Mar '24
Module: wine Branch: master Commit: feee77f84df4ee3e0d9df650df0ad199198ce9c9 URL:
https://gitlab.winehq.org/wine/wine/-/commit/feee77f84df4ee3e0d9df650df0ad1…
Author: Eric Pouech <epouech(a)codeweavers.com> Date: Fri Feb 16 15:10:48 2024 +0100 dbghelp: Rework loading of PDB string table. Signed-off-by: Eric Pouech <epouech(a)codeweavers.com> --- dlls/dbghelp/msc.c | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/dlls/dbghelp/msc.c b/dlls/dbghelp/msc.c index b495d4c24f2..ead0aec41d0 100644 --- a/dlls/dbghelp/msc.c +++ b/dlls/dbghelp/msc.c @@ -3141,21 +3141,22 @@ static void pdb_free_file(struct pdb_file_info* pdb_file) HeapFree(GetProcessHeap(), 0, pdb_file->stream_dict); } -static BOOL pdb_load_stream_name_table(struct pdb_file_info* pdb_file, const char* str, unsigned cb) +static struct pdb_stream_name* pdb_load_stream_name_table(const char* str, unsigned cb) { - DWORD* pdw; - DWORD* ok_bits; - DWORD count, numok; - unsigned i, j; - char* cpstr; + struct pdb_stream_name* stream_dict; + DWORD* pdw; + DWORD* ok_bits; + DWORD count, numok; + unsigned i, j; + char* cpstr; pdw = (DWORD*)(str + cb); numok = *pdw++; count = *pdw++; - pdb_file->stream_dict = HeapAlloc(GetProcessHeap(), 0, (numok + 1) * sizeof(struct pdb_stream_name) + cb); - if (!pdb_file->stream_dict) return FALSE; - cpstr = (char*)(pdb_file->stream_dict + numok + 1); + stream_dict = HeapAlloc(GetProcessHeap(), 0, (numok + 1) * sizeof(struct pdb_stream_name) + cb); + if (!stream_dict) return NULL; + cpstr = (char*)(stream_dict + numok + 1); memcpy(cpstr, str, cb); /* bitfield: first dword is len (in dword), then data */ @@ -3168,15 +3169,14 @@ static BOOL pdb_load_stream_name_table(struct pdb_file_info* pdb_file, const cha if (ok_bits[i / 32] & (1 << (i % 32))) { if (j >= numok) break; - pdb_file->stream_dict[j].name = &cpstr[*pdw++]; - pdb_file->stream_dict[j].index = *pdw++; + stream_dict[j].name = &cpstr[*pdw++]; + stream_dict[j].index = *pdw++; j++; } } /* add sentinel */ - pdb_file->stream_dict[numok].name = NULL; - pdb_file->fpoext_stream = -1; - return TRUE; + stream_dict[numok].name = NULL; + return stream_dict; } static unsigned pdb_get_stream_by_name(const struct pdb_file_info* pdb_file, const char* name) @@ -3494,8 +3494,6 @@ static const char PDB_DS_IDENT[] = "Microsoft C/C++ MSF 7.00\r\n\032DS\0"; static BOOL pdb_init(const struct pdb_lookup* pdb_lookup, struct pdb_file_info* pdb_file, const char* image, unsigned* matched) { - BOOL ret = TRUE; - /* check the file header, and if ok, load the TOC */ TRACE("PDB(%s): %.40s\n", pdb_lookup->filename, debugstr_an(image, 40)); @@ -3539,7 +3537,8 @@ static BOOL pdb_init(const struct pdb_lookup* pdb_lookup, struct pdb_file_info* pdb_lookup->filename, root->Age, pdb_lookup->age); TRACE("found JG for %s: age=%x timestamp=%x\n", pdb_lookup->filename, root->Age, root->TimeDateStamp); - ret = pdb_load_stream_name_table(pdb_file, &root->names[0], root->cbNames); + pdb_file->stream_dict = pdb_load_stream_name_table(&root->names[0], root->cbNames); + pdb_file->fpoext_stream = -1; pdb_free(root); } else if (!memcmp(image, PDB_DS_IDENT, sizeof(PDB_DS_IDENT))) @@ -3575,7 +3574,8 @@ static BOOL pdb_init(const struct pdb_lookup* pdb_lookup, struct pdb_file_info* pdb_lookup->filename, root->Age, pdb_lookup->age); TRACE("found DS for %s: age=%x guid=%s\n", pdb_lookup->filename, root->Age, debugstr_guid(&root->guid)); - ret = pdb_load_stream_name_table(pdb_file, &root->names[0], root->cbNames); + pdb_file->stream_dict = pdb_load_stream_name_table(&root->names[0], root->cbNames); + pdb_file->fpoext_stream = -1; pdb_free(root); } @@ -3599,7 +3599,7 @@ static BOOL pdb_init(const struct pdb_lookup* pdb_lookup, struct pdb_file_info* pdb_free(x); } } - return ret; + return pdb_file->stream_dict != NULL; } static BOOL pdb_process_internal(const struct process* pcs,
1
0
0
0
Eric Pouech : dbghelp: Always use SymGetSrvIndexFileInfo() for files lookup.
by Alexandre Julliard
05 Mar '24
05 Mar '24
Module: wine Branch: master Commit: f01474567695556803cf953113cfac7a4e01005c URL:
https://gitlab.winehq.org/wine/wine/-/commit/f01474567695556803cf953113cfac…
Author: Eric Pouech <epouech(a)codeweavers.com> Date: Sun Jan 28 09:53:40 2024 +0100 dbghelp: Always use SymGetSrvIndexFileInfo() for files lookup. This will help separate debug info files lookup from their actual loading once found and correctly matched. Signed-off-by: Eric Pouech <epouech(a)codeweavers.com> --- dlls/dbghelp/dbghelp_private.h | 1 - dlls/dbghelp/msc.c | 28 ----------------- dlls/dbghelp/path.c | 68 +++++------------------------------------- dlls/dbghelp/tests/path.c | 3 +- 4 files changed, 9 insertions(+), 91 deletions(-) diff --git a/dlls/dbghelp/dbghelp_private.h b/dlls/dbghelp/dbghelp_private.h index 4f14433c7c4..382d2d1ce5e 100644 --- a/dlls/dbghelp/dbghelp_private.h +++ b/dlls/dbghelp/dbghelp_private.h @@ -759,7 +759,6 @@ extern BOOL pe_load_debug_directory(const struct process* pcs, const IMAGE_DEBUG_DIRECTORY* dbg, int nDbg); extern DWORD msc_get_file_indexinfo(void* image, const IMAGE_DEBUG_DIRECTORY* dbgdir, DWORD size, SYMSRV_INDEX_INFOW* info); -extern BOOL pdb_fetch_file_info(const struct pdb_lookup* pdb_lookup, unsigned* matched); struct pdb_cmd_pair { const char* name; DWORD* pvalue; diff --git a/dlls/dbghelp/msc.c b/dlls/dbghelp/msc.c index 12ed93380b6..b495d4c24f2 100644 --- a/dlls/dbghelp/msc.c +++ b/dlls/dbghelp/msc.c @@ -3996,34 +3996,6 @@ static BOOL pdb_process_file(const struct process* pcs, return ret; } -BOOL pdb_fetch_file_info(const struct pdb_lookup* pdb_lookup, unsigned* matched) -{ - HANDLE hFile, hMap = NULL; - char* image = NULL; - BOOL ret; - struct pdb_file_info pdb_file; - - if ((hFile = CreateFileA(pdb_lookup->filename, GENERIC_READ, FILE_SHARE_READ, NULL, - OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL)) == INVALID_HANDLE_VALUE || - ((hMap = CreateFileMappingW(hFile, NULL, PAGE_READONLY, 0, 0, NULL)) == NULL) || - ((image = MapViewOfFile(hMap, FILE_MAP_READ, 0, 0, 0)) == NULL)) - { - WARN("Unable to open .PDB file: %s\n", pdb_lookup->filename); - ret = FALSE; - } - else - { - ret = pdb_init(pdb_lookup, &pdb_file, image, matched); - pdb_free_file(&pdb_file); - } - - if (image) UnmapViewOfFile(image); - if (hMap) CloseHandle(hMap); - if (hFile != INVALID_HANDLE_VALUE) CloseHandle(hFile); - - return ret; -} - /*======================================================================== * FPO unwinding code */ diff --git a/dlls/dbghelp/path.c b/dlls/dbghelp/path.c index f45807c634f..dd2587db99e 100644 --- a/dlls/dbghelp/path.c +++ b/dlls/dbghelp/path.c @@ -477,67 +477,15 @@ struct module_find static BOOL CALLBACK module_find_cb(PCWSTR buffer, PVOID user) { struct module_find* mf = user; - DWORD timestamp; unsigned matched = 0; + SYMSRV_INDEX_INFOW info; - /* the matching weights: - * +1 if a file with same name is found and is a decent file of expected type - * +1 if first parameter and second parameter match - */ - - if (mf->is_pdb) - { - struct pdb_lookup pdb_lookup; - char fn[MAX_PATH]; - - WideCharToMultiByte(CP_ACP, 0, buffer, -1, fn, MAX_PATH, NULL, NULL); - pdb_lookup.filename = fn; - - if (mf->guid) - { - pdb_lookup.kind = PDB_DS; - pdb_lookup.timestamp = 0; - pdb_lookup.guid = *mf->guid; - } - else - { - pdb_lookup.kind = PDB_JG; - pdb_lookup.timestamp = mf->dw1; - /* pdb_loopkup.guid = */ - } - pdb_lookup.age = mf->dw2; - - if (!pdb_fetch_file_info(&pdb_lookup, &matched)) return FALSE; - } - else - { - HANDLE hFile, hMap; - void* mapping; - - timestamp = ~mf->dw1; - hFile = CreateFileW(buffer, GENERIC_READ, FILE_SHARE_READ, NULL, - OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); - if (hFile == INVALID_HANDLE_VALUE) return FALSE; - if ((hMap = CreateFileMappingW(hFile, NULL, PAGE_READONLY, 0, 0, NULL)) != NULL) - { - if ((mapping = MapViewOfFile(hMap, FILE_MAP_READ, 0, 0, 0)) != NULL) - { - const IMAGE_SEPARATE_DEBUG_HEADER* hdr; - hdr = mapping; - - if (hdr->Signature == IMAGE_SEPARATE_DEBUG_SIGNATURE) - { - matched++; - timestamp = hdr->TimeDateStamp; - } - UnmapViewOfFile(mapping); - } - CloseHandle(hMap); - } - CloseHandle(hFile); - if (timestamp == mf->dw1) matched++; - else WARN("Found %s, but wrong timestamp\n", debugstr_w(buffer)); - } + info.sizeofstruct = sizeof(info); + if (!SymSrvGetFileIndexInfoW(buffer, &info, 0)) + return FALSE; + if (!memcmp(&info.guid, mf->guid, sizeof(GUID))) matched++; + if (info.timestamp == mf->dw1) matched++; + if (info.age == mf->dw2) matched++; if (matched > mf->matched) { @@ -547,7 +495,7 @@ static BOOL CALLBACK module_find_cb(PCWSTR buffer, PVOID user) /* yes, EnumDirTree/do_search and SymFindFileInPath callbacks use the opposite * convention to stop/continue enumeration. sigh. */ - return mf->matched == 2; + return mf->matched == 3; } BOOL path_find_symbol_file(const struct process* pcs, const struct module* module, diff --git a/dlls/dbghelp/tests/path.c b/dlls/dbghelp/tests/path.c index 92b2bd21c94..1a7ea1faa18 100644 --- a/dlls/dbghelp/tests/path.c +++ b/dlls/dbghelp/tests/path.c @@ -1592,7 +1592,7 @@ static void test_load_modules_path(void) todo_wine ok(im.PdbAge == test_files[test->found_file].age_or_timestamp, "Expected %lx as pdb-age, got %lx instead\n", test_files[test->found_file].age_or_timestamp, im.PdbAge); - todo_wine_if(i == 11 || i == 16 || i == 17) + todo_wine_if(i == 11) ok(im.PdbUnmatched == !(test_files[test->found_file].age_or_timestamp == 0x0030cafe), "Expecting matched PDB\n"); } todo_wine @@ -1813,7 +1813,6 @@ static void test_load_modules_details(void) "Unexpected loaded image name '%ls' (%ls)\n", im.LoadedImageName, loaded_img_name); todo_wine_if(i == 3 || i == 4 || i == 6 || i == 8 || i == 10 || i == 12 || i == 14) ok(im.SymType == test->sym_type, "Unexpected module type %u\n", im.SymType); - todo_wine_if(i == 8) ok(!im.TypeInfo, "No type info present\n"); if (test->mismatch_in) {
1
0
0
0
Eric Pouech : dbghelp/tests: Add more tests for SymLoadModule*.
by Alexandre Julliard
05 Mar '24
05 Mar '24
Module: wine Branch: master Commit: ec099b8ea34c6417fe3417899c1480ab1521c881 URL:
https://gitlab.winehq.org/wine/wine/-/commit/ec099b8ea34c6417fe3417899c1480…
Author: Eric Pouech <epouech(a)codeweavers.com> Date: Mon Jan 8 13:57:01 2024 +0100 dbghelp/tests: Add more tests for SymLoadModule*. - SymLoadModules flags (SLMFLAG_VIRTUAL and SLMFLAG_NO_SYMBOLS), - handling of load details (SymType, ImageName vs LoadedImageName, various instances of module name). Signed-off-by: Eric Pouech <epouech(a)codeweavers.com> --- dlls/dbghelp/tests/path.c | 292 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 292 insertions(+)
1
0
0
0
Alexandre Julliard : ntdll: Use a common wrapper to call unwind handlers on ARM.
by Alexandre Julliard
05 Mar '24
05 Mar '24
Module: wine Branch: master Commit: a9428fe390146a9fb3b8037bb08753a5233c3552 URL:
https://gitlab.winehq.org/wine/wine/-/commit/a9428fe390146a9fb3b8037bb08753…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Tue Mar 5 11:57:55 2024 +0100 ntdll: Use a common wrapper to call unwind handlers on ARM. --- dlls/ntdll/signal_arm.c | 120 +++++++++++++++++------------------------------- 1 file changed, 42 insertions(+), 78 deletions(-) diff --git a/dlls/ntdll/signal_arm.c b/dlls/ntdll/signal_arm.c index f57ae55f6ee..af33c6c08b6 100644 --- a/dlls/ntdll/signal_arm.c +++ b/dlls/ntdll/signal_arm.c @@ -180,78 +180,20 @@ EXCEPTION_DISPOSITION WINAPI unwind_exception_handler( EXCEPTION_RECORD *record, return ExceptionCollidedUnwind; } -/********************************************************************** - * unwind_handler_wrapper - */ -extern DWORD WINAPI unwind_handler_wrapper( EXCEPTION_RECORD *rec, DISPATCHER_CONTEXT *dispatch ); -__ASM_GLOBAL_FUNC( unwind_handler_wrapper, - "push {r1,lr}\n\t" - ".seh_save_regs {r1,lr}\n\t" - ".seh_endprologue\n\t" - ".seh_handler " __ASM_NAME("unwind_exception_handler") ", %except, %unwind\n\t" - "mov r3, r1\n\t" /* dispatch */ - "ldr r1, [r3, #0x0c]\n\t" /* dispatch->EstablisherFrame */ - "ldr r2, [r3, #0x14]\n\t" /* dispatch->ContextRecord */ - "ldr ip, [r3, #0x18]\n\t" /* dispatch->LanguageHandler */ - "blx ip\n\t" - "pop {r1,pc}\n\t" ) - /********************************************************************** * call_unwind_handler - * - * Call a single unwind handler. - */ -static DWORD call_unwind_handler( EXCEPTION_RECORD *rec, DISPATCHER_CONTEXT *dispatch ) -{ - DWORD res; - - TRACE( "calling handler %p (rec=%p, frame=0x%lx context=%p, dispatch=%p)\n", - dispatch->LanguageHandler, rec, dispatch->EstablisherFrame, dispatch->ContextRecord, dispatch ); - res = unwind_handler_wrapper( rec, dispatch ); - TRACE( "handler %p returned %lx\n", dispatch->LanguageHandler, res ); - - switch (res) - { - case ExceptionContinueSearch: - case ExceptionCollidedUnwind: - break; - default: - raise_status( STATUS_INVALID_DISPOSITION, rec ); - break; - } - - return res; -} - - -/********************************************************************** - * call_teb_unwind_handler - * - * Call a single unwind handler from the TEB chain. */ -static DWORD call_teb_unwind_handler( EXCEPTION_RECORD *rec, DISPATCHER_CONTEXT *dispatch, - EXCEPTION_REGISTRATION_RECORD *teb_frame ) -{ - DWORD res; - - TRACE( "calling TEB handler %p (rec=%p, frame=%p context=%p, dispatch=%p)\n", - teb_frame->Handler, rec, teb_frame, dispatch->ContextRecord, dispatch ); - res = teb_frame->Handler( rec, teb_frame, dispatch->ContextRecord, (EXCEPTION_REGISTRATION_RECORD**)dispatch ); - TRACE( "handler at %p returned %lu\n", teb_frame->Handler, res ); - - switch (res) - { - case ExceptionContinueSearch: - case ExceptionCollidedUnwind: - break; - default: - raise_status( STATUS_INVALID_DISPOSITION, rec ); - break; - } - - return res; -} +DWORD WINAPI call_unwind_handler( EXCEPTION_RECORD *rec, ULONG_PTR frame, + CONTEXT *context, void *dispatch, PEXCEPTION_ROUTINE handler ); +__ASM_GLOBAL_FUNC( call_unwind_handler, + "push {r3,lr}\n\t" + ".seh_save_regs {r3,lr}\n\t" + ".seh_endprologue\n\t" + ".seh_handler unwind_exception_handler, %except\n\t" + "ldr ip, [sp, #8]\n\t" /* handler */ + "blx ip\n\t" + "pop {r3,pc}\n\t" ) /*********************************************************************** @@ -528,7 +470,7 @@ void WINAPI RtlUnwindEx( PVOID end_frame, PVOID target_ip, EXCEPTION_RECORD *rec CONTEXT new_context; NTSTATUS status; ULONG_PTR frame; - DWORD i; + DWORD i, res; RtlCaptureContext( context ); new_context = *context; @@ -581,8 +523,20 @@ void WINAPI RtlUnwindEx( PVOID end_frame, PVOID target_ip, EXCEPTION_RECORD *rec raise_status( STATUS_INVALID_UNWIND_TARGET, rec ); } if (dispatch.EstablisherFrame == (DWORD)end_frame) rec->ExceptionFlags |= EXCEPTION_TARGET_UNWIND; - if (call_unwind_handler( rec, &dispatch ) == ExceptionCollidedUnwind) + + TRACE( "calling handler %p (rec=%p, frame=0x%lx context=%p, dispatch=%p)\n", + dispatch.LanguageHandler, rec, dispatch.EstablisherFrame, + dispatch.ContextRecord, &dispatch ); + res = call_unwind_handler( rec, dispatch.EstablisherFrame, dispatch.ContextRecord, + &dispatch, dispatch.LanguageHandler ); + TRACE( "handler %p returned %lx\n", dispatch.LanguageHandler, res ); + + switch (res) { + case ExceptionContinueSearch: + rec->ExceptionFlags &= ~EXCEPTION_COLLIDED_UNWIND; + break; + case ExceptionCollidedUnwind: new_context = *context; RtlVirtualUnwind( UNW_FLAG_NHANDLER, dispatch.ImageBase, dispatch.ControlPc, dispatch.FunctionEntry, @@ -590,21 +544,30 @@ void WINAPI RtlUnwindEx( PVOID end_frame, PVOID target_ip, EXCEPTION_RECORD *rec NULL ); rec->ExceptionFlags |= EXCEPTION_COLLIDED_UNWIND; goto unwind_done; + default: + raise_status( STATUS_INVALID_DISPOSITION, rec ); + break; } - rec->ExceptionFlags &= ~EXCEPTION_COLLIDED_UNWIND; } else /* hack: call builtin handlers registered in the tib list */ { - DWORD backup_frame = dispatch.EstablisherFrame; while (is_valid_frame( (ULONG_PTR)teb_frame ) && (DWORD)teb_frame < new_context.Sp && (DWORD)teb_frame < (DWORD)end_frame) { - TRACE( "found builtin frame %p handler %p\n", teb_frame, teb_frame->Handler ); - dispatch.EstablisherFrame = (DWORD)teb_frame; - if (call_teb_unwind_handler( rec, &dispatch, teb_frame ) == ExceptionCollidedUnwind) + TRACE( "calling TEB handler %p (rec=%p, frame=%p context=%p, dispatch=%p)\n", + teb_frame->Handler, rec, teb_frame, dispatch.ContextRecord, &dispatch ); + res = call_unwind_handler( rec, (ULONG_PTR)teb_frame, dispatch.ContextRecord, &dispatch, + (PEXCEPTION_ROUTINE)teb_frame->Handler ); + TRACE( "handler at %p returned %lu\n", teb_frame->Handler, res ); + teb_frame = __wine_pop_frame( teb_frame ); + + switch (res) { - teb_frame = __wine_pop_frame( teb_frame ); + case ExceptionContinueSearch: + rec->ExceptionFlags &= ~EXCEPTION_COLLIDED_UNWIND; + break; + case ExceptionCollidedUnwind: new_context = *context; RtlVirtualUnwind( UNW_FLAG_NHANDLER, dispatch.ImageBase, dispatch.ControlPc, dispatch.FunctionEntry, @@ -612,11 +575,12 @@ void WINAPI RtlUnwindEx( PVOID end_frame, PVOID target_ip, EXCEPTION_RECORD *rec &frame, NULL ); rec->ExceptionFlags |= EXCEPTION_COLLIDED_UNWIND; goto unwind_done; + default: + raise_status( STATUS_INVALID_DISPOSITION, rec ); + break; } - teb_frame = __wine_pop_frame( teb_frame ); } if ((DWORD)teb_frame == (DWORD)end_frame && (DWORD)end_frame < new_context.Sp) break; - dispatch.EstablisherFrame = backup_frame; } if (dispatch.EstablisherFrame == (DWORD)end_frame) break;
1
0
0
0
Alexandre Julliard : ntdll: Use a common wrapper to call unwind handlers on ARM64.
by Alexandre Julliard
05 Mar '24
05 Mar '24
Module: wine Branch: master Commit: 5f890e3ce9b8119cef1a8a8a84aa37e525753514 URL:
https://gitlab.winehq.org/wine/wine/-/commit/5f890e3ce9b8119cef1a8a8a84aa37…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Tue Mar 5 10:54:47 2024 +0100 ntdll: Use a common wrapper to call unwind handlers on ARM64. --- dlls/ntdll/signal_arm64.c | 118 ++++++++++++++++------------------------------ 1 file changed, 40 insertions(+), 78 deletions(-) diff --git a/dlls/ntdll/signal_arm64.c b/dlls/ntdll/signal_arm64.c index d48c65a5f36..32aca81b198 100644 --- a/dlls/ntdll/signal_arm64.c +++ b/dlls/ntdll/signal_arm64.c @@ -200,82 +200,22 @@ EXCEPTION_DISPOSITION WINAPI unwind_exception_handler( EXCEPTION_RECORD *record, return ExceptionCollidedUnwind; } + /********************************************************************** - * unwind_handler_wrapper + * call_unwind_handler */ -extern DWORD WINAPI unwind_handler_wrapper( EXCEPTION_RECORD *rec, DISPATCHER_CONTEXT *dispatch ); -__ASM_GLOBAL_FUNC( unwind_handler_wrapper, +DWORD WINAPI call_unwind_handler( EXCEPTION_RECORD *rec, ULONG_PTR frame, + CONTEXT *context, void *dispatch, PEXCEPTION_ROUTINE handler ); +__ASM_GLOBAL_FUNC( call_unwind_handler, "stp x29, x30, [sp, #-32]!\n\t" ".seh_save_fplr_x 32\n\t" - "mov x29, sp\n\t" - ".seh_set_fp\n\t" ".seh_endprologue\n\t" - ".seh_handler " __ASM_NAME("unwind_exception_handler") ", @except, @unwind\n\t" - "str x1, [sp, #16]\n\t" /* frame[-2] = dispatch */ - "mov x3, x1\n\t" - "ldr x1, [x3, #0x18]\n\t" /* dispatch->EstablisherFrame */ - "ldr x2, [x3, #0x28]\n\t" /* dispatch->ContextRecord */ - "ldr x15, [x3, #0x30]\n\t" /* dispatch->LanguageHandler */ - "blr x15\n\t" + ".seh_handler unwind_exception_handler, @except\n\t" + "str x3, [sp, #16]\n\t" /* frame[-2] = dispatch */ + "blr x4\n\t" "ldp x29, x30, [sp], #32\n\t" "ret" ) -/********************************************************************** - * call_unwind_handler - * - * Call a single unwind handler. - */ -static DWORD call_unwind_handler( EXCEPTION_RECORD *rec, DISPATCHER_CONTEXT *dispatch ) -{ - DWORD res; - - TRACE( "calling handler %p (rec=%p, frame=%I64x context=%p, dispatch=%p)\n", - dispatch->LanguageHandler, rec, dispatch->EstablisherFrame, dispatch->ContextRecord, dispatch ); - res = unwind_handler_wrapper( rec, dispatch ); - TRACE( "handler %p returned %lx\n", dispatch->LanguageHandler, res ); - - switch (res) - { - case ExceptionContinueSearch: - case ExceptionCollidedUnwind: - break; - default: - raise_status( STATUS_INVALID_DISPOSITION, rec ); - break; - } - - return res; -} - - -/********************************************************************** - * call_teb_unwind_handler - * - * Call a single unwind handler from the TEB chain. - */ -static DWORD call_teb_unwind_handler( EXCEPTION_RECORD *rec, DISPATCHER_CONTEXT *dispatch, - EXCEPTION_REGISTRATION_RECORD *teb_frame ) -{ - DWORD res; - - TRACE( "calling TEB handler %p (rec=%p, frame=%p context=%p, dispatch=%p)\n", - teb_frame->Handler, rec, teb_frame, dispatch->ContextRecord, dispatch ); - res = teb_frame->Handler( rec, teb_frame, dispatch->ContextRecord, (EXCEPTION_REGISTRATION_RECORD**)dispatch ); - TRACE( "handler at %p returned %lu\n", teb_frame->Handler, res ); - - switch (res) - { - case ExceptionContinueSearch: - case ExceptionCollidedUnwind: - break; - default: - raise_status( STATUS_INVALID_DISPOSITION, rec ); - break; - } - - return res; -} - /*********************************************************************** * call_seh_handler @@ -601,7 +541,7 @@ void WINAPI RtlUnwindEx( PVOID end_frame, PVOID target_ip, EXCEPTION_RECORD *rec CONTEXT new_context; NTSTATUS status; ULONG_PTR frame; - DWORD i; + DWORD i, res; RtlCaptureContext( context ); new_context = *context; @@ -654,8 +594,20 @@ void WINAPI RtlUnwindEx( PVOID end_frame, PVOID target_ip, EXCEPTION_RECORD *rec raise_status( STATUS_INVALID_UNWIND_TARGET, rec ); } if (dispatch.EstablisherFrame == (ULONG64)end_frame) rec->ExceptionFlags |= EXCEPTION_TARGET_UNWIND; - if (call_unwind_handler( rec, &dispatch ) == ExceptionCollidedUnwind) + + TRACE( "calling handler %p (rec=%p, frame=%I64x context=%p, dispatch=%p)\n", + dispatch.LanguageHandler, rec, dispatch.EstablisherFrame, + dispatch.ContextRecord, &dispatch ); + res = call_unwind_handler( rec, dispatch.EstablisherFrame, dispatch.ContextRecord, + &dispatch, dispatch.LanguageHandler ); + TRACE( "handler %p returned %lx\n", dispatch.LanguageHandler, res ); + + switch (res) { + case ExceptionContinueSearch: + rec->ExceptionFlags &= ~EXCEPTION_COLLIDED_UNWIND; + break; + case ExceptionCollidedUnwind: new_context = *context; RtlVirtualUnwind( UNW_FLAG_NHANDLER, dispatch.ImageBase, dispatch.ControlPc, dispatch.FunctionEntry, @@ -663,21 +615,30 @@ void WINAPI RtlUnwindEx( PVOID end_frame, PVOID target_ip, EXCEPTION_RECORD *rec NULL ); rec->ExceptionFlags |= EXCEPTION_COLLIDED_UNWIND; goto unwind_done; + default: + raise_status( STATUS_INVALID_DISPOSITION, rec ); + break; } - rec->ExceptionFlags &= ~EXCEPTION_COLLIDED_UNWIND; } else /* hack: call builtin handlers registered in the tib list */ { - DWORD64 backup_frame = dispatch.EstablisherFrame; while (is_valid_frame( (ULONG_PTR)teb_frame ) && (ULONG64)teb_frame < new_context.Sp && (ULONG64)teb_frame < (ULONG64)end_frame) { - TRACE( "found builtin frame %p handler %p\n", teb_frame, teb_frame->Handler ); - dispatch.EstablisherFrame = (ULONG64)teb_frame; - if (call_teb_unwind_handler( rec, &dispatch, teb_frame ) == ExceptionCollidedUnwind) + TRACE( "calling TEB handler %p (rec=%p, frame=%p context=%p, dispatch=%p)\n", + teb_frame->Handler, rec, teb_frame, dispatch.ContextRecord, &dispatch ); + res = call_unwind_handler( rec, (ULONG_PTR)teb_frame, dispatch.ContextRecord, &dispatch, + (PEXCEPTION_ROUTINE)teb_frame->Handler ); + TRACE( "handler at %p returned %lu\n", teb_frame->Handler, res ); + teb_frame = __wine_pop_frame( teb_frame ); + + switch (res) { - teb_frame = __wine_pop_frame( teb_frame ); + case ExceptionContinueSearch: + rec->ExceptionFlags &= ~EXCEPTION_COLLIDED_UNWIND; + break; + case ExceptionCollidedUnwind: new_context = *context; RtlVirtualUnwind( UNW_FLAG_NHANDLER, dispatch.ImageBase, dispatch.ControlPc, dispatch.FunctionEntry, @@ -685,11 +646,12 @@ void WINAPI RtlUnwindEx( PVOID end_frame, PVOID target_ip, EXCEPTION_RECORD *rec &frame, NULL ); rec->ExceptionFlags |= EXCEPTION_COLLIDED_UNWIND; goto unwind_done; + default: + raise_status( STATUS_INVALID_DISPOSITION, rec ); + break; } - teb_frame = __wine_pop_frame( teb_frame ); } if ((ULONG64)teb_frame == (ULONG64)end_frame && (ULONG64)end_frame < new_context.Sp) break; - dispatch.EstablisherFrame = backup_frame; } if (dispatch.EstablisherFrame == (ULONG64)end_frame) break;
1
0
0
0
Alexandre Julliard : ntdll: Use a common wrapper to call exception handlers on ARM.
by Alexandre Julliard
05 Mar '24
05 Mar '24
Module: wine Branch: master Commit: d6285af1fcb59f2b501cf975ded4a96c8addf163 URL:
https://gitlab.winehq.org/wine/wine/-/commit/d6285af1fcb59f2b501cf975ded4a9…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Tue Mar 5 10:30:26 2024 +0100 ntdll: Use a common wrapper to call exception handlers on ARM. --- dlls/ntdll/signal_arm.c | 73 +++++++++++++++---------------------------------- 1 file changed, 22 insertions(+), 51 deletions(-) diff --git a/dlls/ntdll/signal_arm.c b/dlls/ntdll/signal_arm.c index 81a4ecb3071..f57ae55f6ee 100644 --- a/dlls/ntdll/signal_arm.c +++ b/dlls/ntdll/signal_arm.c @@ -255,60 +255,20 @@ static DWORD call_teb_unwind_handler( EXCEPTION_RECORD *rec, DISPATCHER_CONTEXT /*********************************************************************** - * call_handler_wrapper + * call_seh_handler */ -extern DWORD WINAPI call_handler_wrapper( EXCEPTION_RECORD *rec, CONTEXT *context, DISPATCHER_CONTEXT *dispatch ); -__ASM_GLOBAL_FUNC( call_handler_wrapper, +DWORD WINAPI call_seh_handler( EXCEPTION_RECORD *rec, ULONG_PTR frame, + CONTEXT *context, void *dispatch, PEXCEPTION_ROUTINE handler ); +__ASM_GLOBAL_FUNC( call_seh_handler, "push {r4,lr}\n\t" ".seh_save_regs {r4,lr}\n\t" ".seh_endprologue\n\t" - ".seh_handler " __ASM_NAME("nested_exception_handler") ", %except\n\t" - "mov r3, r2\n\t" /* dispatch */ - "mov r2, r1\n\t" /* context */ - "ldr r1, [r3, #0x0c]\n\t" /* dispatch->EstablisherFrame */ - "ldr ip, [r3, #0x18]\n\t" /* dispatch->LanguageHandler */ + ".seh_handler nested_exception_handler, %except\n\t" + "ldr ip, [sp, #8]\n\t" /* handler */ "blx ip\n\t" "pop {r4,pc}\n\t" ) -/********************************************************************** - * call_handler - * - * Call a single exception handler. - */ -static DWORD call_handler( EXCEPTION_RECORD *rec, CONTEXT *context, DISPATCHER_CONTEXT *dispatch ) -{ - DWORD res; - - TRACE( "calling handler %p (rec=%p, frame=0x%lx context=%p, dispatch=%p)\n", - dispatch->LanguageHandler, rec, dispatch->EstablisherFrame, dispatch->ContextRecord, dispatch ); - res = call_handler_wrapper( rec, context, dispatch ); - TRACE( "handler at %p returned %lu\n", dispatch->LanguageHandler, res ); - - rec->ExceptionFlags &= EXCEPTION_NONCONTINUABLE; - return res; -} - - -/********************************************************************** - * call_teb_handler - * - * Call a single exception handler from the TEB chain. - * FIXME: Handle nested exceptions. - */ -static DWORD call_teb_handler( EXCEPTION_RECORD *rec, CONTEXT *context, DISPATCHER_CONTEXT *dispatch, - EXCEPTION_REGISTRATION_RECORD *teb_frame ) -{ - DWORD res; - - TRACE( "calling TEB handler %p (rec=%p, frame=%p context=%p, dispatch=%p)\n", - teb_frame->Handler, rec, teb_frame, dispatch->ContextRecord, dispatch ); - res = teb_frame->Handler( rec, teb_frame, context, (EXCEPTION_REGISTRATION_RECORD**)dispatch ); - TRACE( "handler at %p returned %lu\n", teb_frame->Handler, res ); - return res; -} - - /********************************************************************** * call_seh_handlers * @@ -323,6 +283,7 @@ NTSTATUS call_seh_handlers( EXCEPTION_RECORD *rec, CONTEXT *orig_context ) CONTEXT context; NTSTATUS status; ULONG_PTR frame; + DWORD res; context = *orig_context; dispatch.TargetPc = 0; @@ -348,7 +309,14 @@ NTSTATUS call_seh_handlers( EXCEPTION_RECORD *rec, CONTEXT *orig_context ) if (dispatch.LanguageHandler) { - switch (call_handler( rec, orig_context, &dispatch )) + TRACE( "calling handler %p (rec=%p, frame=%lx context=%p, dispatch=%p)\n", + dispatch.LanguageHandler, rec, dispatch.EstablisherFrame, orig_context, &dispatch ); + res = call_seh_handler( rec, dispatch.EstablisherFrame, orig_context, + &dispatch, dispatch.LanguageHandler ); + rec->ExceptionFlags &= EXCEPTION_NONCONTINUABLE; + TRACE( "handler at %p returned %lu\n", dispatch.LanguageHandler, res ); + + switch (res) { case ExceptionContinueExecution: if (rec->ExceptionFlags & EXCEPTION_NONCONTINUABLE) return STATUS_NONCONTINUABLE_EXCEPTION; @@ -371,10 +339,13 @@ NTSTATUS call_seh_handlers( EXCEPTION_RECORD *rec, CONTEXT *orig_context ) /* hack: call wine handlers registered in the tib list */ else while (is_valid_frame( (ULONG_PTR)teb_frame ) && (DWORD)teb_frame < context.Sp) { - TRACE( "found wine frame %p rsp %lx handler %p\n", - teb_frame, context.Sp, teb_frame->Handler ); - dispatch.EstablisherFrame = (DWORD)teb_frame; - switch (call_teb_handler( rec, orig_context, &dispatch, teb_frame )) + TRACE( "calling TEB handler %p (rec=%p frame=%p context=%p dispatch=%p) sp=%lx\n", + teb_frame->Handler, rec, teb_frame, orig_context, &dispatch, context.Sp ); + res = call_seh_handler( rec, (ULONG_PTR)teb_frame, orig_context, + &dispatch, (PEXCEPTION_ROUTINE)teb_frame->Handler ); + TRACE( "TEB handler at %p returned %lu\n", teb_frame->Handler, res ); + + switch (res) { case ExceptionContinueExecution: if (rec->ExceptionFlags & EXCEPTION_NONCONTINUABLE) return STATUS_NONCONTINUABLE_EXCEPTION;
1
0
0
0
Alexandre Julliard : ntdll: Use a common wrapper to call exception handlers on ARM64.
by Alexandre Julliard
05 Mar '24
05 Mar '24
Module: wine Branch: master Commit: 8d8c10fe9298e2920ccd8b744be9acbac8378d04 URL:
https://gitlab.winehq.org/wine/wine/-/commit/8d8c10fe9298e2920ccd8b744be9ac…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Tue Mar 5 10:29:10 2024 +0100 ntdll: Use a common wrapper to call exception handlers on ARM64. --- dlls/ntdll/signal_arm64.c | 76 ++++++++++++++--------------------------------- 1 file changed, 22 insertions(+), 54 deletions(-) diff --git a/dlls/ntdll/signal_arm64.c b/dlls/ntdll/signal_arm64.c index 7c5b003a893..d48c65a5f36 100644 --- a/dlls/ntdll/signal_arm64.c +++ b/dlls/ntdll/signal_arm64.c @@ -278,63 +278,20 @@ static DWORD call_teb_unwind_handler( EXCEPTION_RECORD *rec, DISPATCHER_CONTEXT /*********************************************************************** - * call_handler_wrapper + * call_seh_handler */ -extern DWORD WINAPI call_handler_wrapper( EXCEPTION_RECORD *rec, CONTEXT *context, DISPATCHER_CONTEXT *dispatch ); -__ASM_GLOBAL_FUNC( call_handler_wrapper, +DWORD WINAPI call_seh_handler( EXCEPTION_RECORD *rec, ULONG_PTR frame, + CONTEXT *context, void *dispatch, PEXCEPTION_ROUTINE handler ); +__ASM_GLOBAL_FUNC( call_seh_handler, "stp x29, x30, [sp, #-16]!\n\t" ".seh_save_fplr_x 16\n\t" - "mov x29, sp\n\t" - ".seh_set_fp\n\t" ".seh_endprologue\n\t" - ".seh_handler " __ASM_NAME("nested_exception_handler") ", @except\n\t" - "mov x3, x2\n\t" /* dispatch */ - "mov x2, x1\n\t" /* context */ - "ldr x1, [x3, #0x18]\n\t" /* dispatch->EstablisherFrame */ - "ldr x15, [x3, #0x30]\n\t" /* dispatch->LanguageHandler */ - "blr x15\n\t" + ".seh_handler nested_exception_handler, @except\n\t" + "blr x4\n\t" "ldp x29, x30, [sp], #16\n\t" "ret" ) -/********************************************************************** - * call_handler - * - * Call a single exception handler. - */ -static DWORD call_handler( EXCEPTION_RECORD *rec, CONTEXT *context, DISPATCHER_CONTEXT *dispatch ) -{ - DWORD res; - - TRACE( "calling handler %p (rec=%p, frame=%I64x context=%p, dispatch=%p)\n", - dispatch->LanguageHandler, rec, dispatch->EstablisherFrame, dispatch->ContextRecord, dispatch ); - res = call_handler_wrapper( rec, context, dispatch ); - TRACE( "handler at %p returned %lu\n", dispatch->LanguageHandler, res ); - - rec->ExceptionFlags &= EXCEPTION_NONCONTINUABLE; - return res; -} - - -/********************************************************************** - * call_teb_handler - * - * Call a single exception handler from the TEB chain. - * FIXME: Handle nested exceptions. - */ -static DWORD call_teb_handler( EXCEPTION_RECORD *rec, CONTEXT *context, DISPATCHER_CONTEXT *dispatch, - EXCEPTION_REGISTRATION_RECORD *teb_frame ) -{ - DWORD res; - - TRACE( "calling TEB handler %p (rec=%p, frame=%p context=%p, dispatch=%p)\n", - teb_frame->Handler, rec, teb_frame, dispatch->ContextRecord, dispatch ); - res = teb_frame->Handler( rec, teb_frame, context, (EXCEPTION_REGISTRATION_RECORD**)dispatch ); - TRACE( "handler at %p returned %lu\n", teb_frame->Handler, res ); - return res; -} - - /********************************************************************** * call_seh_handlers * @@ -349,6 +306,7 @@ NTSTATUS call_seh_handlers( EXCEPTION_RECORD *rec, CONTEXT *orig_context ) CONTEXT context; NTSTATUS status; ULONG_PTR frame; + DWORD res; context = *orig_context; dispatch.TargetPc = 0; @@ -374,7 +332,14 @@ NTSTATUS call_seh_handlers( EXCEPTION_RECORD *rec, CONTEXT *orig_context ) if (dispatch.LanguageHandler) { - switch (call_handler( rec, orig_context, &dispatch )) + TRACE( "calling handler %p (rec=%p, frame=%I64x context=%p, dispatch=%p)\n", + dispatch.LanguageHandler, rec, dispatch.EstablisherFrame, orig_context, &dispatch ); + res = call_seh_handler( rec, dispatch.EstablisherFrame, orig_context, + &dispatch, dispatch.LanguageHandler ); + rec->ExceptionFlags &= EXCEPTION_NONCONTINUABLE; + TRACE( "handler at %p returned %lu\n", dispatch.LanguageHandler, res ); + + switch (res) { case ExceptionContinueExecution: if (rec->ExceptionFlags & EXCEPTION_NONCONTINUABLE) return STATUS_NONCONTINUABLE_EXCEPTION; @@ -397,10 +362,13 @@ NTSTATUS call_seh_handlers( EXCEPTION_RECORD *rec, CONTEXT *orig_context ) /* hack: call wine handlers registered in the tib list */ else while (is_valid_frame( (ULONG_PTR)teb_frame ) && (ULONG64)teb_frame < context.Sp) { - TRACE( "found wine frame %p rsp %I64x handler %p\n", - teb_frame, context.Sp, teb_frame->Handler ); - dispatch.EstablisherFrame = (ULONG64)teb_frame; - switch (call_teb_handler( rec, orig_context, &dispatch, teb_frame )) + TRACE( "calling TEB handler %p (rec=%p frame=%p context=%p dispatch=%p) sp=%I64x\n", + teb_frame->Handler, rec, teb_frame, orig_context, &dispatch, context.Sp ); + res = call_seh_handler( rec, (ULONG_PTR)teb_frame, orig_context, + &dispatch, (PEXCEPTION_ROUTINE)teb_frame->Handler ); + TRACE( "TEB handler at %p returned %lu\n", teb_frame->Handler, res ); + + switch (res) { case ExceptionContinueExecution: if (rec->ExceptionFlags & EXCEPTION_NONCONTINUABLE) return STATUS_NONCONTINUABLE_EXCEPTION;
1
0
0
0
Alexandre Julliard : ntdll: Also copy non-volatile regs on collided unwind.
by Alexandre Julliard
05 Mar '24
05 Mar '24
Module: wine Branch: master Commit: 5c98412929c4d0953fc23ab22c9c9009ccd0f992 URL:
https://gitlab.winehq.org/wine/wine/-/commit/5c98412929c4d0953fc23ab22c9c90…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Tue Mar 5 10:09:40 2024 +0100 ntdll: Also copy non-volatile regs on collided unwind. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=56401
--- dlls/ntdll/signal_arm.c | 48 ++++++++++++++++++----------------------------- dlls/ntdll/signal_arm64.c | 48 ++++++++++++++++++----------------------------- 2 files changed, 36 insertions(+), 60 deletions(-)
1
0
0
0
Paul Gofman : ntdll: Respect red zone in usr1_handler() on x64.
by Alexandre Julliard
05 Mar '24
05 Mar '24
Module: wine Branch: master Commit: 6f55a13169797dd073575c052a6418e3cecbcfad URL:
https://gitlab.winehq.org/wine/wine/-/commit/6f55a13169797dd073575c052a6418…
Author: Paul Gofman <pgofman(a)codeweavers.com> Date: Mon Mar 4 19:54:54 2024 -0600 ntdll: Respect red zone in usr1_handler() on x64. Fixes a regression introduced by efd3d31082645fab83c6a4994705654edafa9163. --- dlls/ntdll/unix/signal_x86_64.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/ntdll/unix/signal_x86_64.c b/dlls/ntdll/unix/signal_x86_64.c index fb1bca99f3d..d071120af85 100644 --- a/dlls/ntdll/unix/signal_x86_64.c +++ b/dlls/ntdll/unix/signal_x86_64.c @@ -2152,7 +2152,7 @@ static void usr1_handler( int signal, siginfo_t *siginfo, void *sigcontext ) ULONG64 saved_compaction = 0; struct xcontext *context; - context = (struct xcontext *)(((ULONG_PTR)RSP_sig(ucontext) - sizeof(*context)) & ~15); + context = (struct xcontext *)(((ULONG_PTR)RSP_sig(ucontext) - 128 /* red zone */ - sizeof(*context)) & ~15); if ((char *)context < (char *)ntdll_get_thread_data()->kernel_stack) { ERR_(seh)( "kernel stack overflow.\n" );
1
0
0
0
Tag vkd3d-1.11 : Alexandre Julliard : Release 1.11
by Alexandre Julliard
05 Mar '24
05 Mar '24
Module: vkd3d Branch: refs/tags/vkd3d-1.11 Tag: 28c40f8e7f7433e3df157a389f8f50aeb19ea1f6 URL:
https://gitlab.winehq.org/wine/vkd3d/-/tags/28c40f8e7f7433e3df157a389f8f50a…
Tagger: Alexandre Julliard <julliard(a)winehq.org> Date: Tue Mar 5 21:00:39 2024 +0100 Release 1.11
1
0
0
0
← Newer
1
...
66
67
68
69
70
71
72
...
78
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
Results per page:
10
25
50
100
200