================
@@ -60,7 +60,7 @@ SBAddress SBLineEntry::GetEndAddress() const {
   LLDB_INSTRUMENT_VA(this);
 
   SBAddress sb_address;
-  if (m_opaque_up) {
+  if (m_opaque_up && m_opaque_up->range.IsValid()) {
     sb_address.SetAddress(m_opaque_up->range.GetBaseAddress());
     sb_address.OffsetAddress(m_opaque_up->range.GetByteSize());
   }
----------------
clayborg wrote:

Might be the same issue as above where the resulting `sb_address` is the same 
as before this change unless the byte size is set to something valid, but the 
base address isn't. If the base address is invalid, it will be set to 
LLDB_INVALID_ADDRESS which is UINT64_MAX. So even if the byte size is set to 
something valid, it will result in us returning an address that was offset from 
UINT64_MAX, which won't be useful

https://github.com/llvm/llvm-project/pull/158811
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to