aboutsummaryrefslogtreecommitdiff
path: root/llvm/tools/llvm-readobj/llvm-readobj.cpp
diff options
context:
space:
mode:
authorAdrian Prantl <aprantl@apple.com>2021-12-10 09:15:54 -0800
committerAdrian Prantl <aprantl@apple.com>2021-12-10 09:33:27 -0800
commitc7c84b90879f0252c58894f70d2a19fc4c01cf64 (patch)
tree79a7238e150a6e6b5a7bce5572c140f89edf58d9 /llvm/tools/llvm-readobj/llvm-readobj.cpp
parent5861cf77da4f7d235d435dd8fb89b100d1698112 (diff)
downloadllvm-c7c84b90879f0252c58894f70d2a19fc4c01cf64.zip
llvm-c7c84b90879f0252c58894f70d2a19fc4c01cf64.tar.gz
llvm-c7c84b90879f0252c58894f70d2a19fc4c01cf64.tar.bz2
[DwarfDebug] Refuse to emit DW_OP_LLVM_arg values wider than 64 bits
DwarfExpression::addUnsignedConstant(const APInt &Value) only supports wider-than-64-bit values when it is used to emit a top-level DWARF expression representing the location of a variable. Before this change, it was possible to call addUnsignedConstant on >64 bit values within a subexpression when substituting DW_OP_LLVM_arg values. This can trigger an assertion failure (e.g. PR52584, PR52333) when it happens in a fragment (DW_OP_LLVM_fragment) expression, as addUnsignedConstant on >64 bit values splits the constant into separate DW_OP_pieces, which modifies DwarfExpression::OffsetInBits. This change papers over the assertion errors by bailing on overly wide DW_OP_LLVM_arg values. A more comprehensive fix might be to be to split wide values into pointer-sized fragments. [0] https://github.com/llvm/llvm-project/blob/e71fa03/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp#L799-L805 Patch by Ricky Zhou! Differential Revision: https://reviews.llvm.org/D115343
Diffstat (limited to 'llvm/tools/llvm-readobj/llvm-readobj.cpp')
0 files changed, 0 insertions, 0 deletions