[PATCH 0/1] MR7879: dbghelp: Bail out when encountering managed symbols.
This avoids asserts later down the line and makes WineHQ Bug 34990 less problematic for now, until a full managed implementation can be done. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/7879
From: Marc-Aurel Zent <mzent(a)codeweavers.com> This avoids asserts later down the line and makes WineHQ Bug 34990 less problematic for now, until a full managed implementation can be done. --- dlls/dbghelp/msc.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/dlls/dbghelp/msc.c b/dlls/dbghelp/msc.c index 09b36803be8..7be40c6f58e 100644 --- a/dlls/dbghelp/msc.c +++ b/dlls/dbghelp/msc.c @@ -2845,6 +2845,13 @@ static BOOL codeview_snarf(const struct msc_debug_info* msc_dbg, FIXME("Unexpected S_FRAMEPROC %d (%p %p) %x\n", top_frame_size, top_func, curr_func, i); break; + /* bail out when encountering managed debug symbols, in order to avoid asserts later */ + case S_TOKENREF: + case S_GMANPROC: + case S_LMANPROC: + ERR("Unsupported mamaged symbol id %x, stopping pdb parsing\n", sym->generic.id); + return FALSE; + /* the symbols we can safely ignore for now */ case S_SKIP: case S_TRAMPOLINE: -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/7879
eric pouech (@epo) commented about dlls/dbghelp/msc.c:
FIXME("Unexpected S_FRAMEPROC %d (%p %p) %x\n", top_frame_size, top_func, curr_func, i); break;
+ /* bail out when encountering managed debug symbols, in order to avoid asserts later */ + case S_TOKENREF: + case S_GMANPROC: + case S_LMANPROC: + ERR("Unsupported mamaged symbol id %x, stopping pdb parsing\n", sym->generic.id); + return FALSE;
the issue of returning FALSE is that it will also drop all codeview symbols following that entry. isn't moving the 3 codeview symbols in the block of 'the symbols we can safely ignore for now' sufficient ? -- https://gitlab.winehq.org/wine/wine/-/merge_requests/7879#note_101631
On Tue Apr 22 17:25:02 2025 +0000, eric pouech wrote:
the issue of returning FALSE is that it will also drop all codeview symbols following that entry. isn't moving the 3 codeview symbols in the block of 'the symbols we can safely ignore for now' sufficient ? just moving them into the ignore block will cause multiple assertions down the line...
this is even sort of intentional to drop all code view symbols following the entry, since these managed pdbs will not be parsed properly anyways, as far as I could tell. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/7879#note_101647
This merge request was closed by Marc-Aurel Zent. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/7879
Closing this in favor of the PDB rewrite #12. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/7879#note_101801
participants (3)
-
eric pouech (@epo) -
Marc-Aurel Zent -
Marc-Aurel Zent (@mzent)