!9363 修复raw heap dump遇到特殊string对象解析crash问题

Merge pull request !9363 from qibao/master
This commit is contained in:
openharmony_ci 2024-09-23 03:31:26 +00:00 committed by Gitee
commit 662834b12a
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -324,9 +324,12 @@ void DecodeObj(RawHeapInfoArgs &rawHeapArgs, HeapSnapshot *snapshot)
*reinterpret_cast<uint64_t *>(v->newAddr) = reinterpret_cast<uint64_t>(jsHclassItem->second->newAddr);
auto hclassObj = reinterpret_cast<JSHClass *>(jsHclassItem->second->newAddr);
ObjectXRay::VisitObjectBody<VisitType::OLD_GC_VISIT>(obj, hclassObj, visitor);
}
LOG_ECMA(INFO) << "ark visitor: not found obj num= " << notFoundObj.size() << ", generate nodes";
for (auto v : rawHeapArgs.rawObjInfoVec) {
TaggedObject *obj = reinterpret_cast<TaggedObject *>(v->newAddr);
snapshot->GenerateNodeForBinMod(obj, v, rawHeapArgs.strTableIdMapNewStr);
}
LOG_ECMA(INFO) << "ark visitor: not found obj num= " << notFoundObj.size();
}
static uint64_t GetFileSize(std::string &inputFilePath)