!8843 Clear code security alarms

Merge pull request !8843 from hlm2001/hlm_kexin0823_br
This commit is contained in:
openharmony_ci 2024-08-30 16:55:51 +00:00 committed by Gitee
commit 52df67230d
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
3 changed files with 3 additions and 0 deletions

View File

@ -36,6 +36,7 @@ void FreeObjectSet<MemDesc>::Free(uintptr_t begin, size_t size)
size <= memDescPool_->JitFortSize());
auto freeObject = memDescPool_->GetDescFromPool();
ASSERT(freeObject != nullptr);
freeObject->SetMem(begin);
freeObject->SetSize(size);
freeObject->SetNext(freeObject_);

View File

@ -958,6 +958,7 @@ TaggedObject *SharedHeap::AllocateReadOnlyOrHugeObject(JSThread *thread, JSHClas
}
auto object = reinterpret_cast<TaggedObject *>(sReadOnlySpace_->Allocate(thread, size));
CHECK_SOBJ_AND_THROW_OOM_ERROR(thread, object, size, sReadOnlySpace_, "SharedHeap::AllocateReadOnlyOrHugeObject");
ASSERT(object != nullptr);
object->SetClass(thread, hclass);
return object;
}

View File

@ -363,6 +363,7 @@ ComparisonResult TaggedTree<Derived>::EntryCompare(JSThread *thread, const JSHan
EcmaRuntimeCallInfo *info =
EcmaInterpreter::NewRuntimeCallInfo(thread, compareFn, thisArgHandle, undefined, argsLength);
RETURN_VALUE_IF_ABRUPT_COMPLETION(thread, ComparisonResult::UNDEFINED);
ASSERT(info != nullptr);
info->SetCallArg(valueX.GetTaggedValue(), valueY.GetTaggedValue());
JSTaggedValue callResult = JSFunction::Call(info);
RETURN_VALUE_IF_ABRUPT_COMPLETION(thread, ComparisonResult::UNDEFINED);