From 4c3f7dff306bcd2aaa95822b0adc8d12ab0203a0 Mon Sep 17 00:00:00 2001 From: Philipp Shemetov Date: Mon, 23 Sep 2024 19:12:54 +0300 Subject: [PATCH] fix heap-use-after-free https://gitee.com/openharmony-sig/arkcompiler_ets_runtime/issues/IAT4Y0 Signed-off-by: Philipp Shemetov --- runtime/ecma_vm.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/runtime/ecma_vm.cpp b/runtime/ecma_vm.cpp index f1b94e6a1..8b7577a99 100644 --- a/runtime/ecma_vm.cpp +++ b/runtime/ecma_vm.cpp @@ -383,6 +383,8 @@ void EcmaVM::SaveProfileInfo() void EcmaVM::UninitializeThreads() { thread_->NativeCodeEnd(); + thread_->CollectTLABMetrics(); + thread_->ClearTLAB(); thread_->UpdateStatus(ThreadStatus::FINISHED); } -- Gitee