[llvm] [LLVM][DWARF] Fix uniquness of AccelTable Values (PR #74391)
David Blaikie via llvm-commits
llvm-commits at lists.llvm.org
Tue May 7 14:34:59 PDT 2024
dwblaikie wrote:
So this "order" is the DIE offset - so I think this uniquing step implies that sometimes the same DIE might be inserted into the index more than once. I'm not sure where/why that'd happen (it should happen legitimately in simple cases - a single DIE might be in the index for multiple names (like it's simple DW_AT_name, and its DW_AT_linkage_name)) - but I don't know why that'd require sorting/uniquing in DWARFv5 tables, since I don't think the DIE entry is shared between name entries (it could be in limited cases, but can't be in general since each name entry needs to point to a contiguous list of entries that have that name - so unless two names share their entire list, I don't think they can share any part of it)
First thing might be to check the revision history for the sort/unique to see when it was introduced and if there was an explanation and test coverage.
Maybe the simplest thing to do might be to add an assertion that this uniquing operation doesn't reduce the size of the container (ie: that the uniquing is pointless/doesn't do anything) - then run check-lldb and see if any tests fail. If they don't, then the functionality is under-tested - then try something bigger, like recompiling the entirety of `clang` (maybe even with LTO if a simpler build doesn't find an assertion failure) - then you'd have some example of the problem, and can either automatically or manually reduce it to something commitable.
https://github.com/llvm/llvm-project/pull/74391
More information about the llvm-commits
mailing list