Skip to content

Commit 8dc9c3b

Browse files
committed
[LLDB][Value] Require type size when reading a scalar
1 parent 240c454 commit 8dc9c3b

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lldb/source/Core/Value.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -347,6 +347,9 @@ Status Value::GetValueAsData(ExecutionContext *exe_ctx, DataExtractor &data,
347347
else
348348
data.SetAddressByteSize(sizeof(void *));
349349

350+
if (!type_size)
351+
return Status::FromErrorString("type does not have a size");
352+
350353
uint32_t result_byte_size = *type_size;
351354
if (m_value.GetData(data, result_byte_size))
352355
return error; // Success;

0 commit comments

Comments
 (0)