[all-commits] [llvm/llvm-project] a28246: [lldb/DWARF] Make sure bad abbreviation codes do n...

Pavel Labath via All-commits all-commits at lists.llvm.org
Thu May 23 02:23:30 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: a2824632cba8e7d98a5cbf9acb3ca5d9960c95cb
      https://github.com/llvm/llvm-project/commit/a2824632cba8e7d98a5cbf9acb3ca5d9960c95cb
  Author: Pavel Labath <pavel at labath.sk>
  Date:   2024-05-23 (Thu, 23 May 2024)

  Changed paths:
    M lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp
    M lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.h
    M lldb/source/Plugins/SymbolFile/DWARF/DWARFUnit.cpp
    A lldb/test/Shell/SymbolFile/DWARF/x86/invalid_abbreviation.s

  Log Message:
  -----------
  [lldb/DWARF] Make sure bad abbreviation codes do not crash lldb (#93006)

We currently cannot represent abbreviation codes with more than 16 bits,
and we were lldb-asserting if we ever ran into one. While I haven't seen
any real DWARF with these kinds of abbreviations, it is possible to hit
this with handcrafted evil dwarf, due some sort of corruptions, or just
bugs (the addition of PeekDIEName makes these bugs more likely, as the
function blindly dereferences offsets within the debug info section) .

Missing abbreviations were already reporting an error. This patch turns
sure that large abbreviations into an error as well, and adds a test for
both cases.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list