================ @@ -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"); ---------------- Michael137 wrote:
Looks like this is a regression from (https://github.com/llvm/llvm-project/pull/151350): ``` Author: Ilia Kuklin <ikuk...@accesssoftek.com> Date: Wed Aug 6 14:32:19 2025 +0500 [lldb] Add `ValueObject::CreateValueObjectFromScalar` and fix `Scalar::GetData` (#151350) Add `ValueObject::CreateValueObjectFromScalar` function and adjust `Scalar::GetData` to be able to both extend and truncate the data bytes in Scalar to the specified size. ``` Previously we would return an error if `type_size` was unset. So this pretty much brings us back to previous behaviour. Any way we can test this in `lldb/unittests/Utility/ScalarTest.cpp`? I guess the tricky bit will be creating a type with invalid `byte_size`. Maybe with an incomplete AST type? Haven't looked at what's available in that test though 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