Correct loader URI reporting
- Check address is in the range of the mapped file. - Correct calculation of offset within the file. Change-Id: I848a3ead4422698c2ef1c140bc8ae5e000a717f7
Этот коммит содержится в:
коммит произвёл
Konstantin Zhuravlyov
родитель
da6d892058
Коммит
5f614c31f5
@@ -141,7 +141,7 @@ std::string CodeObjectReaderWrapper::GetUriFromMemory(
|
||||
}
|
||||
|
||||
uint64_t MyAddress = reinterpret_cast<uint64_t>(Mem);
|
||||
if (!(MyAddress >= LowAddress && MyAddress <= HighAddress)) {
|
||||
if (!(MyAddress >= LowAddress && (MyAddress + Size) <= HighAddress)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -157,9 +157,11 @@ std::string CodeObjectReaderWrapper::GetUriFromMemory(
|
||||
return GetUriFromMemoryBasic(Mem, Size);
|
||||
}
|
||||
|
||||
uint64_t UriOffset = Offset + MyAddress - LowAddress;
|
||||
|
||||
std::ostringstream UriStream;
|
||||
UriStream << EncodePathname(Pathname.c_str());
|
||||
UriStream << "#offset=" << Offset;
|
||||
UriStream << "#offset=" << UriOffset;
|
||||
if (Size) {
|
||||
UriStream << "&size=" << Size;
|
||||
}
|
||||
|
||||
Ссылка в новой задаче
Block a user