[all-commits] [llvm/llvm-project] d199ab: [LLVM][DWARF] Fix accelerator table switching betw...

Alexander Yermolovich via All-commits all-commits at lists.llvm.org
Fri Jan 12 07:01:29 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: d199ab469949b104bc4fbb888251ee184fd53de1
      https://github.com/llvm/llvm-project/commit/d199ab469949b104bc4fbb888251ee184fd53de1
  Author: Alexander Yermolovich <43973793+ayermolo at users.noreply.github.com>
  Date:   2024-01-12 (Fri, 12 Jan 2024)

  Changed paths:
    A clang/test/CodeGen/debug-names-compound-type-units.ll
    A clang/test/CodeGen/thinlto-debug-names-tu-reuse.ll
    M llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp

  Log Message:
  -----------
  [LLVM][DWARF] Fix accelerator table switching between CU and TU (#77511)

Bug 1 is triggered when a TU is already created, and we process the same
DICompositeType at a top level. We would switch to TU accelerator table,
but
would not switch back on early exit. As the result we would add CU
entries to the TU
accelerator table. When we try to write out TUs and normalize entries,
the
offsets for DIEs that are part of a CU would not have been computed, and
it
would assert on getOffset().

Bug 2 is triggered when processing nested TUs. When we exit from
addDwarfTypeUnitType we switched back to CU accelerator table. If we
were processing nested TUs, the rest of the entries from TUs would be
added to CU accelerator table. When we write out TUs, all the DIE
pointers will become invalid. Eventually it will assert during
normalization step after CU is processed.




More information about the All-commits mailing list