mirror of
https://github.com/intel/llvm.git
synced 2026-02-02 10:08:59 +08:00
Sanity check the data I am going to read from the extractor to avoid asserting.
llvm-svn: 147214
This commit is contained in:
@@ -915,8 +915,14 @@ ABISysV_x86_64::GetReturnValueObjectImpl (Thread &thread,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// These two tests are just sanity checks. If I somehow get the
|
||||
// type calculation wrong above it is better to just return nothing
|
||||
// than to assert or crash.
|
||||
if (!copy_from_extractor)
|
||||
return return_valobj_sp;
|
||||
if (copy_from_offset + field_byte_width > copy_from_extractor->GetByteSize())
|
||||
return return_valobj_sp;
|
||||
|
||||
copy_from_extractor->CopyByteOrderedData (copy_from_offset,
|
||||
field_byte_width,
|
||||
|
||||
Reference in New Issue
Block a user