| Issue |
209166
|
| Summary |
[lldb] Oversized DW_OP_piece triggers an unbounded allocation and aborts LLDB
|
| Labels |
new issue
|
| Assignees |
|
| Reporter |
firmiana402
|
A malformed DWARF _expression_ can terminate LLDB by supplying an oversized byte-size operand to `DW_OP_piece`. LLDB does not validate the operand before using it to resize the piece buffer, so `DW_OP_piece 0x2000000000000000` can trigger a `2^61`-byte (2 EiB) allocation attempt and reach LLVM's fatal out-of-memory handler.
Malformed debug information should produce a normal _expression_-evaluation error, not abort the debugger process.
## Minimal Case
```text
DW_OP_lit0
DW_OP_piece 0x2000000000000000
```
Instead of rejecting the oversized piece, LLDB terminates with:
```text
LLVM ERROR: out of memory
Allocation failed
```
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs