From ee8fe212fd30db310f2b670a54ebd20f2668b08c Mon Sep 17 00:00:00 2001 From: Artem Udovichenko Date: Mon, 8 Sep 2025 12:16:47 +0300 Subject: [PATCH 1/2] Add GC barriers in Map.delete Issue: https://gitee.com/openharmony/arkcompiler_runtime_core/issues/ICWYE7 Change-Id: I9d1554529fb121b66ae9066988d569c6a0a37864 Signed-off-by: Artem Udovichenko --- static_core/plugins/ets/irtoc_scripts/map_set_common.irt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/static_core/plugins/ets/irtoc_scripts/map_set_common.irt b/static_core/plugins/ets/irtoc_scripts/map_set_common.irt index c4a46e435c..a04e8654fb 100644 --- a/static_core/plugins/ets/irtoc_scripts/map_set_common.irt +++ b/static_core/plugins/ets/irtoc_scripts/map_set_common.irt @@ -491,8 +491,8 @@ scoped_macro(:processMapDelete) do |map, key, idx, mode| entry := Load(buck_data, offset).ref entry_next := LoadI(entry).Imm(MapConstants::ENTRY_NEXT_OFFSET).ref entry_prev := LoadI(entry).Imm(MapConstants::ENTRY_PREV_OFFSET).ref - Store(entry_prev, MapConstants::ENTRY_NEXT_OFFSET, entry_next).ref - Store(entry_next, MapConstants::ENTRY_PREV_OFFSET, entry_prev).ref + Store(entry_prev, MapConstants::ENTRY_NEXT_OFFSET, entry_next).SetNeedBarrier(true).ref + Store(entry_next, MapConstants::ENTRY_PREV_OFFSET, entry_prev).SetNeedBarrier(true).ref new_len := SubI(buck_len).Imm(1).u32 StoreI(buck_hdr, new_len).Imm(EtsConstants::ESCOMPAT_ARRAY_ACTUAL_LENGTH_OFFSET).u32 -- Gitee From f4a319cf6378ceb24b7a6ab860d01e6429b64186 Mon Sep 17 00:00:00 2001 From: likholatovevgeny Date: Wed, 10 Sep 2025 14:37:32 +0000 Subject: [PATCH 2/2] commit Signed-off-by: likholatovevgeny --- static_core/irtoc/scripts/gc.irt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/static_core/irtoc/scripts/gc.irt b/static_core/irtoc/scripts/gc.irt index 36e010a1f7..3f9e7e40fb 100644 --- a/static_core/irtoc/scripts/gc.irt +++ b/static_core/irtoc/scripts/gc.irt @@ -209,9 +209,9 @@ end def PostInterRegionBarrierSlow() if Options.arch == :arm64 - mask = RegMask.new($full_regmap, :arg0, :callee0, :callee1, :callee2, :tmp0, :tmp1) + mask = RegMask.new($full_regmap, :arg0, :callee0, :tmp0, :tmp1) elsif Options.arch == :x86_64 - mask = RegMask.new($full_regmap, :arg0, :callee0, :caller0, :caller3, :tmp0, :tmp1) + mask = RegMask.new($full_regmap, :arg0, :callee0, :tmp0, :tmp1) else mask = $panda_mask end -- Gitee