================ @@ -347,6 +347,9 @@ Status Value::GetValueAsData(ExecutionContext *exe_ctx, DataExtractor &data, else data.SetAddressByteSize(sizeof(void *)); + if (!type_size) + return Status::FromErrorString("type does not have a size"); ---------------- Nerixyz wrote:
I don't think we need an incomplete type here. A value without a compiler type should suffice. So something like ```cpp Value v(Scalar(42)); DataExtractor extractor; Status status = v.GetValueAsData(nullptr, extractor, nullptr); ASSERT_TRUE(status.Fail()); ``` I could add a file in `unittests/ValueObject`. There are no unittests that call `GetValueAsData` yet. https://github.com/llvm/llvm-project/pull/153386 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits