[lldb] Make sure there's a value for the key before dereferencing.
Make sure there's a value for the shared_cache_base_address key exists in the dictionary before trying to dereference the value. rdar://76894476
This commit is contained in:
		
							parent
							
								
									f4726e7238
								
							
						
					
					
						commit
						d1d4f36556
					
				| 
						 | 
				
			
			@ -2188,8 +2188,12 @@ lldb::addr_t AppleObjCRuntimeV2::GetSharedCacheBaseAddress() {
 | 
			
		|||
  if (!info_dict)
 | 
			
		||||
    return LLDB_INVALID_ADDRESS;
 | 
			
		||||
 | 
			
		||||
  return info_dict->GetValueForKey("shared_cache_base_address")
 | 
			
		||||
      ->GetIntegerValue(LLDB_INVALID_ADDRESS);
 | 
			
		||||
  StructuredData::ObjectSP value =
 | 
			
		||||
      info_dict->GetValueForKey("shared_cache_base_address");
 | 
			
		||||
  if (!value)
 | 
			
		||||
    return LLDB_INVALID_ADDRESS;
 | 
			
		||||
 | 
			
		||||
  return value->GetIntegerValue(LLDB_INVALID_ADDRESS);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void AppleObjCRuntimeV2::UpdateISAToDescriptorMapIfNeeded() {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue