Skip to content

[lldb] skip duplicate DW_TAG_member DIEs when building a record layout - #13848

Open
charles-zablit wants to merge 1 commit into
swiftlang:stable/23.xfrom
charles-zablit:cz/lldb/fix-dwarf-duplicate-member-crash
Open

[lldb] skip duplicate DW_TAG_member DIEs when building a record layout#13848
charles-zablit wants to merge 1 commit into
swiftlang:stable/23.xfrom
charles-zablit:cz/lldb/fix-dwarf-duplicate-member-crash

Conversation

@charles-zablit

@charles-zablit charles-zablit commented Aug 14, 2026

Copy link
Copy Markdown

dsymutil's parallel DWARFLinker can emit two identical DW_TAG_member DIEs for the same field (observed for std::basic_string's internal compressed-pair member). LLDB registered a distinct FieldDecl for each, and Clang's record-layout builder crashes when two fields of the same type land at the same offset. Detect and skip an exact duplicate of the immediately preceding field.

Fixes:

  • lldb/test/API/lang/swift/cxx_interop/forward/stl-types/TestSwiftForwardInteropSTLTypes.py

@charles-zablit
charles-zablit force-pushed the cz/lldb/fix-dwarf-duplicate-member-crash branch from a77be34 to ba90197 Compare August 14, 2026 11:03
@adrian-prantl

Copy link
Copy Markdown

We should definitely fix that in dsymutil instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants