mirror of
https://gitee.com/openharmony/arkcompiler_ets_runtime
synced 2024-11-23 01:59:58 +00:00
!9586 Bugfix: heap pointer may be invalid after gc
Merge pull request !9586 from lukai/stringtablebugfix
This commit is contained in:
commit
62caefba91
@ -257,6 +257,8 @@ EcmaString *EcmaStringTable::GetOrInternCompressedSubString(EcmaVM *vm, const JS
|
||||
vm->IncreaseStringTableLockCount();
|
||||
}
|
||||
#endif
|
||||
// utf8data may be moved after shared full gc, so reload utf8Data here.
|
||||
utf8Data = EcmaStringAccessor(string).GetDataUtf8() + offset;
|
||||
std::pair<EcmaString *, uint32_t> result = GetStringThreadUnsafe(utf8Data, utf8Len, true, hashcode);
|
||||
if (result.first != nullptr) {
|
||||
return result.first;
|
||||
|
Loading…
Reference in New Issue
Block a user