[Lldb-commits] [lldb] [lldb] Oversized DW_OP_piece triggers an unbounded allocation and aborts LLDB (PR #209397)
Alexsander Borges Damaceno via lldb-commits
lldb-commits at lists.llvm.org
Sat Aug 15 23:32:55 PDT 2026
================
@@ -1107,6 +1107,15 @@ static llvm::Error Evaluate_DW_OP_piece(EvalContext &eval_ctx,
if (piece_byte_size == 0)
return llvm::Error::success();
+ // A single piece of a variable's location can never legitimately be
+ // this large.
+ constexpr uint64_t kMaxDWARFPieceByteSize = 1024 * 1024 * 1024; // 1GB
----------------
AlexsanderDamaceno wrote:
thanks for review, but as there a pr open related to this bug before((https://github.com/llvm/llvm-project/pull/207009), I will close this one
https://github.com/llvm/llvm-project/pull/209397
More information about the lldb-commits
mailing list