Repository navigation
Fix NativeAOT DWARF for EH regions and funclets - #137511
Merged
Merged
Conversation
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
EH regions were emitted as a flat list of sibling
DW_TAG_try_blockandDW_TAG_catch_blockentries. Nested try regions, and try regions inside handlers, then overlapped their siblings, which is whatllvm-dwarfdump --verifyreported as "DIEs have overlapping address ranges" inil.cpp. Emit each try region as a child of the innermost region that contains it instead. Handlers are funclets with their own subprograms, so a catch entry can't follow its try block as a sibling (DWARF 5 §3.8) andDW_TAG_catch_blockis no longer emitted.Methods with funclets were also described by a single subprogram that covered the main body and all funclets, although each funclet has its own FDE. lldb picks the unwind plan from the FDE at the start of the enclosing function, so it unwound funclet frames with the main body's CFI and could not get past them. It also merges adjacent DW_AT_ranges entries, so emit one subprogram per FDE range instead, all carrying the method's variables. Funclet subprograms are named
<method>$funcletN, like the outlined.coldparts clang emits, so that breakpoints on the method resolve to its entry only in both gdb and lldb.The DwarfDump smoke test now requires zero errors in
il.cpp.Fixes #90209