[PATCH 0/1] MR9791: dbghelp: {dwarf} Skip compilation units with attributes imported from .dwz.
This is just a workaround for linked bug, and just avoids the crash at the cost of dropping the whole compilation unit from debug information. Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=58414 Signed-off-by: Eric Pouech <epouech@codeweavers.com> -- https://gitlab.winehq.org/wine/wine/-/merge_requests/9791
From: Eric Pouech <epouech@codeweavers.com> This is just a workaround for linked bug, and just avoids the crash at the cost of dropping the whole compilation unit from debug information. Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=58414 Signed-off-by: Eric Pouech <epouech@codeweavers.com> --- dlls/dbghelp/dwarf.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/dlls/dbghelp/dwarf.c b/dlls/dbghelp/dwarf.c index 3fc3ec2bb45..4f1908aff09 100644 --- a/dlls/dbghelp/dwarf.c +++ b/dlls/dbghelp/dwarf.c @@ -3050,12 +3050,9 @@ static BOOL dwarf2_parse_compilation_unit(dwarf2_parse_context_t* ctx) struct attribute language; char *tmp; - if (!dwarf2_find_attribute(di, DW_AT_name, &name)) - name.u.string = NULL; - - /* get working directory of current compilation unit */ - if (!dwarf2_find_attribute(di, DW_AT_comp_dir, &comp_dir)) - comp_dir.u.string = NULL; + if (!dwarf2_find_attribute(di, DW_AT_name, &name) || + !dwarf2_find_attribute(di, DW_AT_comp_dir, &comp_dir)) + goto failure; if (!dwarf2_find_attribute(di, DW_AT_low_pc, &low_pc)) low_pc.u.uvalue = 0; @@ -3087,6 +3084,7 @@ static BOOL dwarf2_parse_compilation_unit(dwarf2_parse_context_t* ctx) } else FIXME("Should have a compilation unit here %Iu\n", di->abbrev->tag); } +failure: if (ctx->status == UNIT_BEINGLOADED) ctx->status = UNIT_LOADED_FAIL; return ret; } -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/9791
participants (2)
-
Eric Pouech -
eric pouech (@epo)