================
@@ -574,6 +574,20 @@ TEST(DWARFExpression, DW_OP_convert) {
EXPECT_THAT_ERROR(
t.Eval({DW_OP_const1s, 'X', DW_OP_convert, 0x1d}).takeError(),
llvm::Failed());
+
+ // A non-zero DIE offset with no DWARF unit must report an error rather than
+ // dereferencing a null Delegate (caught by lldb-dwarf-expression-fuzzer).
+ EXPECT_THAT_ERROR(
+ Evaluate({DW_OP_const1s, 'X', DW_OP_convert, 0x01}, nullptr, nullptr)
+ .takeError(),
+ llvm::Failed());
----------------
Michael137 wrote:
Lets use `llvm::FailedWithMessage` to verify the error message (so we know
we're exercising the right error paths)
https://github.com/llvm/llvm-project/pull/207008
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits