[all-commits] [llvm/llvm-project] 308104: [lldb] Don't build an opcode from a failed disasse...

Charles Zablit via All-commits all-commits at lists.llvm.org
Mon Jul 13 04:54:02 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 3081049a69f85dd4079a959c4e50c6ccf9f691d0
      https://github.com/llvm/llvm-project/commit/3081049a69f85dd4079a959c4e50c6ccf9f691d0
  Author: Charles Zablit <c_zablit at apple.com>
  Date:   2026-07-13 (Mon, 13 Jul 2026)

  Changed paths:
    M lldb/include/lldb/Core/Opcode.h
    M lldb/source/Plugins/Disassembler/LLVMC/DisassemblerLLVMC.cpp
    M lldb/unittests/Disassembler/CMakeLists.txt
    A lldb/unittests/Disassembler/x86/TestGetOpcodeOversized.cpp

  Log Message:
  -----------
  [lldb] Don't build an opcode from a failed disassembly (#208279)

lldb does not check if the instruction was decoded correctly. This
causes the following assert to hit:
https://github.com/llvm/llvm-project/blob/06499c927e5012166f4553c58f8af593521ea14d/lldb/include/lldb/Core/Opcode.h#L214
due to a buffer overflow. This happens when starting `lldb-dap` on
Windows with `lldb-server`.

This patch clamps the instruction size to the maximum possible
instruction size possible to avoid the assert to hit. It also adds a
regression test.

Related:
- https://github.com/llvm/llvm-project/pull/208277.



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