forked from OSchip/llvm-project
Fix a thinko in how the RemoteiOS Platform looked up files in the SDK & other
platform locations. We didn't always do an exhaustive search through all the platform locations, so we would have to read some files out of memory even though they existed in the exploded shared cache or SDK. <rdar://problem/18385947> llvm-svn: 218157
This commit is contained in:
parent
03d1730aad
commit
16ebdd6c1b
|
@ -688,18 +688,9 @@ PlatformRemoteiOS::GetSharedModule (const ModuleSpec &module_spec,
|
|||
|
||||
FileSpec local_file;
|
||||
const UUID *module_uuid_ptr = module_spec.GetUUIDPtr();
|
||||
Error error (GetSymbolFile (platform_file, module_uuid_ptr, local_file));
|
||||
if (error.Success())
|
||||
{
|
||||
error = ResolveExecutable (local_file, module_spec.GetArchitecture(), module_sp, NULL);
|
||||
if (module_sp && ((module_uuid_ptr == NULL) || (module_sp->GetUUID() == *module_uuid_ptr)))
|
||||
{
|
||||
//printf ("found in user specified SDK\n");
|
||||
error.Clear();
|
||||
return error;
|
||||
}
|
||||
|
||||
Error error;
|
||||
char platform_file_path[PATH_MAX];
|
||||
|
||||
if (platform_file.GetPath(platform_file_path, sizeof(platform_file_path)))
|
||||
{
|
||||
FileSpec local_file;
|
||||
|
@ -756,16 +747,11 @@ PlatformRemoteiOS::GetSharedModule (const ModuleSpec &module_spec,
|
|||
}
|
||||
// Not the module we are looking for... Nothing to see here...
|
||||
module_sp.reset();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
// This may not be an SDK-related module. Try whether we can bring in the thing to our local cache.
|
||||
error = GetSharedModuleWithLocalCache(module_spec, module_sp, module_search_paths_ptr, old_module_sp_ptr, did_create_ptr);
|
||||
if (error.Success())
|
||||
return error;
|
||||
else
|
||||
error.Clear(); // Clear the error and fall-through.
|
||||
}
|
||||
|
||||
const bool always_create = false;
|
||||
error = ModuleList::GetSharedModule (module_spec,
|
||||
|
|
Loading…
Reference in New Issue