llvm-c166/lldb/source/Expression
Jonas Devlieghere 2e38be8333
[lldb] Allow generic operands in DWARF binary type check (#209641)
fc298ccbc52a's CheckScalarOperandsHaveSameType also rejects legitimate
generic-typed operands, breaking breakpad STACK WIN / raSearch unwinding
on 32-bit targets. For `DW_OP_breg7 +0, DW_OP_consts +80, DW_OP_plus`,
DW_OP_breg yields a register-sized (8-byte) scalar while DW_OP_const*
yields an address-sized (4-byte) generic one. The strict size gate ran
before the genericness escape, and the escape only checked the left
operand, so the CFA expression was rejected and the unwind failed.

Reorder so two integers that are each at least as wide as the generic
type are accepted before the size/signedness gate. The commit's own
type-check unit tests still pass.

Also fix a latent crash the failure exposed: ReadFrameAddress and
GetReturnAddressHint only consumed the error inside an UNWIND_LOG
argument, which is skipped when the log is off, so the errored Expected
was destroyed unchecked and aborted. Consume it via LLDB_LOG_ERROR /
LLDB_LOG_ERRORV instead.
2026-07-14 22:15:26 +00:00
..
CMakeLists.txt
DiagnosticManager.cpp
DWARFExpression.cpp [lldb] Allow generic operands in DWARF binary type check (#209641) 2026-07-14 22:15:26 +00:00
DWARFExpressionList.cpp
Expression.cpp
ExpressionParser.cpp
ExpressionTypeSystemHelper.cpp
ExpressionVariable.cpp
FunctionCaller.cpp
IRExecutionUnit.cpp
IRInterpreter.cpp
IRMemoryMap.cpp
LLVMUserExpression.cpp
Materializer.cpp
ObjectFileJIT.cpp
REPL.cpp
UserExpression.cpp
UtilityFunction.cpp