[libunwind] Bound the DWARF expression evaluator operand stack (#220662)

`evaluateExpression` interprets DW_OP_* bytecode against a fixed-size
`pint_t stack[100]` operand stack without checking whether `sp` stays
within array bounds. Malformed or hostile DWARF expressions (such as
those injected via dynamic FDE registration) pushing more than 100
values or underflowing the stack could corrupt the native call stack.

Add bounds checking on `sp` within `evaluateExpression`:
- Bound `sp` to `[&stack[1], &stack[98]]` at each iteration in the
opcode loop, as single-step opcodes push at most 1 value and net-pop at
most 1.
- Add index/depth validation for `DW_OP_pick` and `DW_OP_rot`.
- Ensure `sp >= &stack[1]` on exit from the evaluator.
- Abort execution via `_LIBUNWIND_ABORT` when bounds are violated.
- Add a regression test verifying that an overflowing DWARF expression
aborts safely rather than overflowing the stack.

NOKEYCHECK=True
GitOrigin-RevId: 52e4b75c8dbf1e6c524dd360f705d417c770efec
2 files changed
tree: 43530742778965ff425e32e4764ad507dd08826d
  1. cmake/
  2. docs/
  3. include/
  4. src/
  5. test/
  6. .clang-format
  7. CMakeLists.txt
  8. LICENSE.TXT