From f6a5752c0e6f1ef0345383cece615c8db0d10fb4 Mon Sep 17 00:00:00 2001 From: Rokashevich Svetlana Date: Thu, 28 Aug 2025 18:35:54 +0800 Subject: [PATCH 01/12] Disable tests for sanitizers build Issue: https://gitee.com/openharmony/arkcompiler_runtime_core/issues/ICVIQD Signed-off-by: Rokashevich Svetlana Change-Id: Ic1850485683d47e0295ee6514618c21d6d384095 --- .../ets/tests/ani/cmake/ani_tests.cmake | 5 ++++ .../plugins/ets/tests/checked/CMakeLists.txt | 5 +++- .../ets_test_suite/coroutines/CMakeLists.txt | 3 +++ .../tests/ets_test_suite/gc/CMakeLists.txt | 10 ++++++-- .../ets_test_suite/linker/CMakeLists.txt | 3 +++ .../ets_test_suite/tooling/CMakeLists.txt | 7 ++++-- .../tests/native/atomic_int/CMakeLists.txt | 3 +++ .../plugins/ets/tests/runtime/CMakeLists.txt | 17 ++++++++------ .../ets-func-tests-ignored-TSAN.txt | 18 ++++++++++++++- .../unit-tests/unit-tests-ignored-ASAN.txt | 10 ++++++++ .../unit-tests/unit-tests-ignored-TSAN.txt | 23 +++++++++++++++++-- 11 files changed, 89 insertions(+), 15 deletions(-) diff --git a/static_core/plugins/ets/tests/ani/cmake/ani_tests.cmake b/static_core/plugins/ets/tests/ani/cmake/ani_tests.cmake index 1d813dd3a6..f20baaef2e 100644 --- a/static_core/plugins/ets/tests/ani/cmake/ani_tests.cmake +++ b/static_core/plugins/ets/tests/ani/cmake/ani_tests.cmake @@ -57,6 +57,11 @@ function(ani_add_gtest TARGET) set(VERIFY_SOURCES false) endif() + # NOTE(@srokashevich, #29390): enable verifier with tsan after fix + if (PANDA_ENABLE_THREAD_SANITIZER) + set(VERIFY_SOURCES false) + endif() + ets_native_test_helper(${TARGET} ETS_CONFIG ${ARG_ETS_CONFIG} ETS_SOURCES ${ARG_ETS_SOURCES} diff --git a/static_core/plugins/ets/tests/checked/CMakeLists.txt b/static_core/plugins/ets/tests/checked/CMakeLists.txt index 29b25c7f6f..39e77f70c1 100644 --- a/static_core/plugins/ets/tests/checked/CMakeLists.txt +++ b/static_core/plugins/ets/tests/checked/CMakeLists.txt @@ -275,7 +275,10 @@ if (PANDA_TARGET_AMD64 OR NOT PANDA_ARM64_TESTS_WITH_SANITIZER) panda_add_checked_test_ets(FILE ${CMAKE_CURRENT_SOURCE_DIR}/escompat_array_reverse.ets) panda_add_checked_test_ets(FILE ${CMAKE_CURRENT_SOURCE_DIR}/ets_string_length.ets) panda_add_checked_test_ets(FILE ${CMAKE_CURRENT_SOURCE_DIR}/ets_string_isempty.ets) - panda_add_checked_test_ets(FILE ${CMAKE_CURRENT_SOURCE_DIR}/ets_string_builder_append_merge_part1.ets) + # NOTE(@srokashevich, #29168): enable with tsan after fix + if (NOT PANDA_ENABLE_THREAD_SANITIZER) + panda_add_checked_test_ets(FILE ${CMAKE_CURRENT_SOURCE_DIR}/ets_string_builder_append_merge_part1.ets) + endif() panda_add_checked_test_ets(FILE ${CMAKE_CURRENT_SOURCE_DIR}/ets_string_builder_append_merge_part2.ets) panda_add_checked_test_ets(FILE ${CMAKE_CURRENT_SOURCE_DIR}/ets_string_builder_append_merge_part3.ets) panda_add_checked_test_ets(FILE ${CMAKE_CURRENT_SOURCE_DIR}/ets_string_builder_deopt1.ets) diff --git a/static_core/plugins/ets/tests/ets_test_suite/coroutines/CMakeLists.txt b/static_core/plugins/ets/tests/ets_test_suite/coroutines/CMakeLists.txt index 211df5eee4..7b5d20058d 100644 --- a/static_core/plugins/ets/tests/ets_test_suite/coroutines/CMakeLists.txt +++ b/static_core/plugins/ets/tests/ets_test_suite/coroutines/CMakeLists.txt @@ -89,6 +89,8 @@ function(add_ets_coroutines_test) endforeach() endfunction() +# NOTE(@srokashevich, #29320): enable with tsan after fix +if (NOT PANDA_ENABLE_THREAD_SANITIZER) add_ets_coroutines_test(FILE allhandled_rejection.ets SKIP_ARM32_COMPILER LIST_UNHANDLED @@ -97,6 +99,7 @@ add_ets_coroutines_test(FILE allhandled_rejection.ets WORKERS "AUTO" "ONE" MODE "INT" "JIT" "AOT" ) +endif() add_ets_coroutines_test(FILE unhandled_rejection.ets SKIP_ARM32_COMPILER diff --git a/static_core/plugins/ets/tests/ets_test_suite/gc/CMakeLists.txt b/static_core/plugins/ets/tests/ets_test_suite/gc/CMakeLists.txt index 17e706dfa0..39a830b131 100644 --- a/static_core/plugins/ets/tests/ets_test_suite/gc/CMakeLists.txt +++ b/static_core/plugins/ets/tests/ets_test_suite/gc/CMakeLists.txt @@ -102,8 +102,11 @@ add_ets_gc_test(FILE pin_object.ets OPTIONS "--gc-type=g1-gc" "--gc-trigger-type # NOTE(26403) Profilesaver is turned off because of data race add_ets_gc_test(FILE get_object_address_test.ets OPTIONS "--gc-trigger-type=debug-never" MODE "INT") add_ets_gc_test(FILE space_type_test.ets OPTIONS "--gc-type=g1-gc" "--gc-trigger-type=debug-never" MODE "INT") -# NOTE(26403) Profilesaver is turned off because of data race -add_ets_gc_test(FILE weak_ref_test.ets OPTIONS "--gc-type=g1-gc" "--run-gc-in-place" "--max-free=1" "--gc-trigger-type=debug-never" MODE "INT") +# NOTE(@srokashevich, #29644): enable with tsan after fix +if (NOT PANDA_ENABLE_THREAD_SANITIZER) + # NOTE(26403) Profilesaver is turned off because of data race + add_ets_gc_test(FILE weak_ref_test.ets OPTIONS "--gc-type=g1-gc" "--run-gc-in-place" "--max-free=1" "--gc-trigger-type=debug-never" MODE "INT") +endif() add_ets_gc_test(FILE concurrent_start_gc.ets OPTIONS "--gc-type=g1-gc" "--gc-trigger-type=debug-never" MODE "INT") add_ets_gc_test(FILE register_native_allocation_test.ets OPTIONS "--gc-type=g1-gc" "--run-gc-in-place" "--gc-trigger-type=debug-never" MODE "INT") add_ets_gc_test(FILE finalization_registry_test.ets OPTIONS "--gc-type=g1-gc" "--run-gc-in-place" "--gc-trigger-type=debug-never" MODE "INT") @@ -112,7 +115,10 @@ add_ets_gc_test(TIMEOUT_CMD timeout TIMEOUT_TIME 10m FILE test_finreg_in_differe add_ets_gc_test(FILE finalization_registry_coro_test.ets OPTIONS "--coroutine-workers-count=10" "--gc-type=g1-gc" "--run-gc-in-place" "--gc-trigger-type=debug-never" MODE "INT") add_ets_gc_test(TIMEOUT_CMD timeout TIMEOUT_TIME 10m FILE finalization_registry_deadlock_test.ets OPTIONS "--gc-type=g1-gc" "--run-gc-in-place" "--gc-trigger-type=debug-never" MODE "INT") +# NOTE(@srokashevich, #29644): enable with tsan after fix +if (NOT PANDA_ENABLE_THREAD_SANITIZER) add_ets_gc_test(FILE scheduled_gc.ets OPTIONS "--gc-type=g1-gc" "--gc-trigger-type=debug-never" "--gc-use-nth-alloc-trigger=true" MODE "INT") +endif() add_ets_gc_test(FILE scheduled_gc_trigger_exception.ets OPTIONS "--gc-type=g1-gc" "--gc-trigger-type=debug-never" MODE "INT") # NOTE(@srokashevich, #29137): enable with tsan after fix diff --git a/static_core/plugins/ets/tests/ets_test_suite/linker/CMakeLists.txt b/static_core/plugins/ets/tests/ets_test_suite/linker/CMakeLists.txt index f96320a409..67bd5245ce 100644 --- a/static_core/plugins/ets/tests/ets_test_suite/linker/CMakeLists.txt +++ b/static_core/plugins/ets/tests/ets_test_suite/linker/CMakeLists.txt @@ -141,7 +141,10 @@ function(test_runtime_linker_extensions test) endfunction() +# NOTE(@srokashevich, #29869): enable with tsan after fix +if (NOT PANDA_ENABLE_THREAD_SANITIZER) test_runtime_linker_extensions(runtime_linker_extensions) #issues:22179 add '--verification-mode=on-the-fly',case failed +endif() function(test_app_linker_context_exception TARGET WORK_DIR) # Must provide a valid abc file, so that runtime would start creating application linker context diff --git a/static_core/plugins/ets/tests/ets_test_suite/tooling/CMakeLists.txt b/static_core/plugins/ets/tests/ets_test_suite/tooling/CMakeLists.txt index 02d3054dcd..c031ea8e6f 100644 --- a/static_core/plugins/ets/tests/ets_test_suite/tooling/CMakeLists.txt +++ b/static_core/plugins/ets/tests/ets_test_suite/tooling/CMakeLists.txt @@ -51,5 +51,8 @@ panda_ets_add_gtest( add_dependencies(ets_test_suite_tooling_profiler ${target}_cpp_test_gtests) endfunction() -# Running tests via API calls -add_ets_tooling_profiler_test(FILE profile_arkapi_test.ets CPP_SOURCE profile_arkapi_test.cpp OPTIONS "") +# NOTE(@srokashevich, #29469): enable with tsan after fix +if (NOT PANDA_ENABLE_THREAD_SANITIZER) + # Running tests via API calls + add_ets_tooling_profiler_test(FILE profile_arkapi_test.ets CPP_SOURCE profile_arkapi_test.cpp OPTIONS "") +endif() diff --git a/static_core/plugins/ets/tests/native/atomic_int/CMakeLists.txt b/static_core/plugins/ets/tests/native/atomic_int/CMakeLists.txt index bc2c95eb53..bcc5d1d591 100644 --- a/static_core/plugins/ets/tests/native/atomic_int/CMakeLists.txt +++ b/static_core/plugins/ets/tests/native/atomic_int/CMakeLists.txt @@ -11,9 +11,12 @@ # See the License for the specific language governing permissions and # limitations under the License. +# NOTE(@srokashevich, #29692): enable with tsan after fix +if (NOT PANDA_ENABLE_THREAD_SANITIZER) ets_native_test_helper(ets_atomic_int_tests CPP_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/atomic_int_test.cpp ETS_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/atomic_int_test.ets ETS_GTEST_ABC_PATH "ANI_GTEST_ABC_PATH" VERIFY_SOURCES true ) +endif() diff --git a/static_core/plugins/ets/tests/runtime/CMakeLists.txt b/static_core/plugins/ets/tests/runtime/CMakeLists.txt index a96e952713..09123db47a 100644 --- a/static_core/plugins/ets/tests/runtime/CMakeLists.txt +++ b/static_core/plugins/ets/tests/runtime/CMakeLists.txt @@ -35,13 +35,16 @@ panda_ets_add_gtest( DEPS_TARGETS etsstdlib ) -panda_add_gtest_with_ani(ets_vm_init_prealloc_test - CPP_SOURCES ${PANDA_ETS_PLUGIN_SOURCE}/tests/runtime/ets_vm_init_prealloc_test.cpp - ETS_SOURCES ${PANDA_ETS_PLUGIN_SOURCE}/tests/runtime/ets_vm_init_prealloc_test.ets - INCLUDE_DIRS ${PANDA_ETS_PLUGIN_SOURCE}/runtime - LIBRARIES arkbase arkfile arkruntime - TEST_GROUP ets_tests_runtime_gtests -) +# NOTE(@srokashevich, #29164): enable with tsan after fix +if (NOT PANDA_ENABLE_THREAD_SANITIZER) + panda_add_gtest_with_ani(ets_vm_init_prealloc_test + CPP_SOURCES ${PANDA_ETS_PLUGIN_SOURCE}/tests/runtime/ets_vm_init_prealloc_test.cpp + ETS_SOURCES ${PANDA_ETS_PLUGIN_SOURCE}/tests/runtime/ets_vm_init_prealloc_test.ets + INCLUDE_DIRS ${PANDA_ETS_PLUGIN_SOURCE}/runtime + LIBRARIES arkbase arkfile arkruntime + TEST_GROUP ets_tests_runtime_gtests + ) +endif() panda_add_gtest_with_ani(entrypoint_return_test CPP_SOURCES ${PANDA_ETS_PLUGIN_SOURCE}/tests/runtime/entrypoint_return_test.cpp diff --git a/static_core/plugins/ets/tests/test-lists/ets-func-tests/ets-func-tests-ignored-TSAN.txt b/static_core/plugins/ets/tests/test-lists/ets-func-tests/ets-func-tests-ignored-TSAN.txt index 97f4035d60..74b52233ff 100644 --- a/static_core/plugins/ets/tests/test-lists/ets-func-tests/ets-func-tests-ignored-TSAN.txt +++ b/static_core/plugins/ets/tests/test-lists/ets-func-tests/ets-func-tests-ignored-TSAN.txt @@ -20,4 +20,20 @@ std/containers/concurrent_set/ConcurrentSet_ConstructorTest.ets std/containers/linked_blocking_queue/LinkedBlockingQueue_ConstructorTest.ets std/core/NumberTest.ets escompat/JsonStringifyTest.ets - + +#28355 +escompat/escompat_regexp_match_String.ets + +#29408 +std/core/std_core_array_includes_byte_array_byte.ets +std/core/std_core_array_indexOf_char_array_char.ets +std/core/std_core_long_instance_Long_toFloat.ets +std/core/SortStringsTest.ets +std/containers/BasicSetTest.ets +std/math/std_math_max_int_int.ets +spec/03.types/References_Types/string/constructor_with_nullish_0090.ets +spec/03.types/References_Types/Tuples_type/tuple_as_rest_param_6.ets +spec/16.Support_for_GUI_Programming/trailing_lambdas/trailing_lm_param.ets +spec/expressions/compound_assignment_01_double_mult_long.ets +spec/expressions/compound_assignment_01_int_mult_double.ets +regression/18012_enum_fromInt_error_at_cast.ets diff --git a/static_core/plugins/ets/tests/test-lists/unit-tests/unit-tests-ignored-ASAN.txt b/static_core/plugins/ets/tests/test-lists/unit-tests/unit-tests-ignored-ASAN.txt index e69de29bb2..763c447116 100644 --- a/static_core/plugins/ets/tests/test-lists/unit-tests/unit-tests-ignored-ASAN.txt +++ b/static_core/plugins/ets/tests/test-lists/unit-tests/unit-tests-ignored-ASAN.txt @@ -0,0 +1,10 @@ +#29384 +ets-common-tests/intrinsics/int32array_join.ets +ets-common-tests/intrinsics/uint8array_join.ets +ets-common-tests/intrinsics/int8array_join.ets +ets-common-tests/intrinsics/uint8clampedarray_join.ets +ets-common-tests/intrinsics/uint16array_join.ets +ets-common-tests/intrinsics/int16array_join.ets +ets-common-tests/intrinsics/string_from_char_code_escape.ets +ets-common-tests/intrinsics/string_from_char_code.ets +ets-common-tests/intrinsics/stringbuilder_oom.ets diff --git a/static_core/plugins/ets/tests/test-lists/unit-tests/unit-tests-ignored-TSAN.txt b/static_core/plugins/ets/tests/test-lists/unit-tests/unit-tests-ignored-TSAN.txt index 336e61c648..2d13b0dc05 100644 --- a/static_core/plugins/ets/tests/test-lists/unit-tests/unit-tests-ignored-TSAN.txt +++ b/static_core/plugins/ets/tests/test-lists/unit-tests/unit-tests-ignored-TSAN.txt @@ -1,6 +1,25 @@ -# 29297 +#29297 ets-common-tests/intrinsics/map_set.ets +ets-common-tests/intrinsics/array_slice.ets +ets-common-tests/intrinsics/to_string_cache.ets +ets-common-tests/intrinsics/typed_arrays_from.ets +ets-common-tests/intrinsics/array_indexof.ets +ets-common-tests/intrinsics/stringbuilder_oom.ets +ets-common-tests/stubs/istrue.ets -# 29320 +#29298 +ets-common-tests/intrinsics/copyTo.ets + +#29320 ets-common-tests/intrinsics/isSafeInteger.ets ets-common-tests/intrinsics/uint8clampedarray_join.ets +ets-common-tests/intrinsics/string_from_string.ets +ets-common-tests/intrinsics/typed_arrays_indexof.ets +ets-common-tests/intrinsics/typed_arrays_last_indexof.ets +ets-common-tests/atomics/nonconcurrent_wait_timeout.ets +ets-common-tests/atomics/index_range.ets +ets-common-tests/atomics/base_operation_load.ets +ets-common-tests/unions/union_method_virtual.ets + +#29408 +ets_test_suite/strings/string_concat.ets -- Gitee From fb86d32200c1e7acc5a4276bffe5362e3665e3e1 Mon Sep 17 00:00:00 2001 From: Rokashevich Svetlana Date: Tue, 9 Sep 2025 17:28:36 +0800 Subject: [PATCH 02/12] Fix Signed-off-by: Rokashevich Svetlana Change-Id: Id509c53a7b57917b3a864fb9540481bc79aa90a7 --- .../ets-func-tests/ets-func-tests-ignored-TSAN.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/static_core/plugins/ets/tests/test-lists/ets-func-tests/ets-func-tests-ignored-TSAN.txt b/static_core/plugins/ets/tests/test-lists/ets-func-tests/ets-func-tests-ignored-TSAN.txt index 74b52233ff..caeaf29ff6 100644 --- a/static_core/plugins/ets/tests/test-lists/ets-func-tests/ets-func-tests-ignored-TSAN.txt +++ b/static_core/plugins/ets/tests/test-lists/ets-func-tests/ets-func-tests-ignored-TSAN.txt @@ -27,7 +27,9 @@ escompat/escompat_regexp_match_String.ets #29408 std/core/std_core_array_includes_byte_array_byte.ets std/core/std_core_array_indexOf_char_array_char.ets +std/core/std_core_array_slice_boolean_array_boolean_array.ets std/core/std_core_long_instance_Long_toFloat.ets +std/core/std_core_long_instance_Long_toLong.ets std/core/SortStringsTest.ets std/containers/BasicSetTest.ets std/math/std_math_max_int_int.ets @@ -37,3 +39,6 @@ spec/16.Support_for_GUI_Programming/trailing_lambdas/trailing_lm_param.ets spec/expressions/compound_assignment_01_double_mult_long.ets spec/expressions/compound_assignment_01_int_mult_double.ets regression/18012_enum_fromInt_error_at_cast.ets + +#29851 +escompat/RegExpTest.ets -- Gitee From 622b21d3bc91bf87f532cf1b0899f0aeee75274b Mon Sep 17 00:00:00 2001 From: Rokashevich Svetlana Date: Tue, 9 Sep 2025 18:04:50 +0800 Subject: [PATCH 03/12] Fix Signed-off-by: Rokashevich Svetlana Change-Id: Ide745061bf2bcf114e272faa22cfdbc159614cb8 --- .../test-lists/ets-func-tests/ets-func-tests-ignored-TSAN.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/static_core/plugins/ets/tests/test-lists/ets-func-tests/ets-func-tests-ignored-TSAN.txt b/static_core/plugins/ets/tests/test-lists/ets-func-tests/ets-func-tests-ignored-TSAN.txt index caeaf29ff6..092a3a6957 100644 --- a/static_core/plugins/ets/tests/test-lists/ets-func-tests/ets-func-tests-ignored-TSAN.txt +++ b/static_core/plugins/ets/tests/test-lists/ets-func-tests/ets-func-tests-ignored-TSAN.txt @@ -28,6 +28,7 @@ escompat/escompat_regexp_match_String.ets std/core/std_core_array_includes_byte_array_byte.ets std/core/std_core_array_indexOf_char_array_char.ets std/core/std_core_array_slice_boolean_array_boolean_array.ets +std/core/std_core_string_String_lastIndexOf_String.ets std/core/std_core_long_instance_Long_toFloat.ets std/core/std_core_long_instance_Long_toLong.ets std/core/SortStringsTest.ets @@ -39,6 +40,7 @@ spec/16.Support_for_GUI_Programming/trailing_lambdas/trailing_lm_param.ets spec/expressions/compound_assignment_01_double_mult_long.ets spec/expressions/compound_assignment_01_int_mult_double.ets regression/18012_enum_fromInt_error_at_cast.ets +escompat/escompat_regexp_test_StringBindToBound.ets #29851 escompat/RegExpTest.ets -- Gitee From 18db5d3f66d7c591665e40e27343e310174eff23 Mon Sep 17 00:00:00 2001 From: Rokashevich Svetlana Date: Wed, 10 Sep 2025 03:06:30 +0800 Subject: [PATCH 04/12] Fix Signed-off-by: Rokashevich Svetlana Change-Id: I49e10cf98ca7fd9c30b86ed59302243be1b8d60b --- .../ets-func-tests-ignored-TSAN.txt | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/static_core/plugins/ets/tests/test-lists/ets-func-tests/ets-func-tests-ignored-TSAN.txt b/static_core/plugins/ets/tests/test-lists/ets-func-tests/ets-func-tests-ignored-TSAN.txt index 092a3a6957..005c2c143a 100644 --- a/static_core/plugins/ets/tests/test-lists/ets-func-tests/ets-func-tests-ignored-TSAN.txt +++ b/static_core/plugins/ets/tests/test-lists/ets-func-tests/ets-func-tests-ignored-TSAN.txt @@ -42,5 +42,26 @@ spec/expressions/compound_assignment_01_int_mult_double.ets regression/18012_enum_fromInt_error_at_cast.ets escompat/escompat_regexp_test_StringBindToBound.ets +std/core/std_core_value_all_006.ets +std/core/std_core_value_array_value_all_022.ets +std/core/std_core_value_array_value_all_009.ets +std/core/std_core_type_array_type_all_006.ets +std/core/std_core_int_instance_Int_toLong.ets +std/core/std_core_double_instance_Double_floatValue.ets +std/core/std_core_float_instance_Float_toString.ets +std/core/std_core_stringbuilder_instance_StringBuilder_append_006.ets +std/core/IntlNumberFormatTest2.ets +spec/15.Semantic_Rules/Compatibility_Features/Extended_Conditional_Expressions/test-ext-cond-expr-generic-false-0003.ets +spec/15.Semantic_Rules/Compatibility_Features/Extended_Conditional_Expressions/numeric/loop/numeric-loop-for-number-nonzero-expression.ets +spec/expressions/compound_assignment_02_only_main_byte_mult_int.ets +spec/expressions/compound_assignment_03_simple_assign_byte_mult_long.ets +spec/07.expressions/7.25.Equality_Expressions/strict_compare_01.ets +spec/07.expressions/7.32.Lambda_Expressions/capturingLocalAndGlobalVariablesInLambda.ets +spec/03.types/References_Types/3.8.12.Nullish_Types/nullable-function-default-param_0.ets +spec/03.types/References_Types/Type_undefined/define/define-class-member-as-question-and-assign.ets +spec/generic/issue14700_ArrayBackedConstructorWithString.ets +spec/17.Experimental_Features/Iterable_Types/for-of-s01-array-12.ets +std/containers/concurrent_set/ConcurrentSet_iteratorTest.ets + #29851 escompat/RegExpTest.ets -- Gitee From 5c141530eb640208d37e78484599231c703957bc Mon Sep 17 00:00:00 2001 From: Rokashevich Svetlana Date: Wed, 10 Sep 2025 17:04:20 +0800 Subject: [PATCH 05/12] Fix Signed-off-by: Rokashevich Svetlana Change-Id: I69b2e98cd9ec1f552db722b9d0ff15b16228f0eb --- .../test-lists/ets-func-tests/ets-func-tests-ignored-TSAN.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/static_core/plugins/ets/tests/test-lists/ets-func-tests/ets-func-tests-ignored-TSAN.txt b/static_core/plugins/ets/tests/test-lists/ets-func-tests/ets-func-tests-ignored-TSAN.txt index 005c2c143a..ca563dfa17 100644 --- a/static_core/plugins/ets/tests/test-lists/ets-func-tests/ets-func-tests-ignored-TSAN.txt +++ b/static_core/plugins/ets/tests/test-lists/ets-func-tests/ets-func-tests-ignored-TSAN.txt @@ -41,7 +41,6 @@ spec/expressions/compound_assignment_01_double_mult_long.ets spec/expressions/compound_assignment_01_int_mult_double.ets regression/18012_enum_fromInt_error_at_cast.ets escompat/escompat_regexp_test_StringBindToBound.ets - std/core/std_core_value_all_006.ets std/core/std_core_value_array_value_all_022.ets std/core/std_core_value_array_value_all_009.ets @@ -55,6 +54,7 @@ spec/15.Semantic_Rules/Compatibility_Features/Extended_Conditional_Expressions/t spec/15.Semantic_Rules/Compatibility_Features/Extended_Conditional_Expressions/numeric/loop/numeric-loop-for-number-nonzero-expression.ets spec/expressions/compound_assignment_02_only_main_byte_mult_int.ets spec/expressions/compound_assignment_03_simple_assign_byte_mult_long.ets +spec/expressions/compound_assignment_01_double_mult_float.ets spec/07.expressions/7.25.Equality_Expressions/strict_compare_01.ets spec/07.expressions/7.32.Lambda_Expressions/capturingLocalAndGlobalVariablesInLambda.ets spec/03.types/References_Types/3.8.12.Nullish_Types/nullable-function-default-param_0.ets @@ -62,6 +62,7 @@ spec/03.types/References_Types/Type_undefined/define/define-class-member-as-ques spec/generic/issue14700_ArrayBackedConstructorWithString.ets spec/17.Experimental_Features/Iterable_Types/for-of-s01-array-12.ets std/containers/concurrent_set/ConcurrentSet_iteratorTest.ets +std/containers/TrivialArrayTest.ets #29851 escompat/RegExpTest.ets -- Gitee From 9ae19ffe87c341bfc4407d2de861a7a1ccf5bc21 Mon Sep 17 00:00:00 2001 From: Khomutov Nikita Date: Tue, 9 Sep 2025 20:13:01 +0300 Subject: [PATCH 06/12] Fix datarace with CompilerOptimizeStringConcat Signed-off-by: Khomutov Nikita Change-Id: I48a56c593bfae2566a3fc8856f967a40a7315505 --- static_core/runtime/runtime.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/static_core/runtime/runtime.cpp b/static_core/runtime/runtime.cpp index 13b8dced8a..2b926453b6 100644 --- a/static_core/runtime/runtime.cpp +++ b/static_core/runtime/runtime.cpp @@ -937,6 +937,12 @@ static inline void InitializeCompilerOptions() compiler::g_options.SetCompilerInlineExternalMethodsAot(false); } #endif + +#if defined(PANDA_COMPILER_DEBUG_INFO) && !defined(NDEBUG) + if (!compiler::g_options.WasSetCompilerEmitDebugInfo()) { + compiler::g_options.SetCompilerEmitDebugInfo(true); + } +#endif } bool Runtime::Initialize() @@ -953,16 +959,12 @@ bool Runtime::Initialize() CheckOptionsFromOs(); + InitializeCompilerOptions(); + if (!CreatePandaVM(GetRuntimeType())) { return false; } -#if defined(PANDA_COMPILER_DEBUG_INFO) && !defined(NDEBUG) - if (!compiler::g_options.WasSetCompilerEmitDebugInfo()) { - compiler::g_options.SetCompilerEmitDebugInfo(true); - } -#endif - // We must load AOT file before InitializePandaVM, because during initialization, code execution may be called. if (!HandleAotOptions()) { return false; @@ -993,8 +995,6 @@ bool Runtime::Initialize() StartMemAllocDumper(ConvertToString(options_.GetMemAllocDumpFile())); } - InitializeCompilerOptions(); - #ifdef PANDA_TARGET_MOBILE mem::GcHung::InitPreFork(true); #else -- Gitee From 3267bb958583c123ec173467f618561dc8813514 Mon Sep 17 00:00:00 2001 From: Rokashevich Svetlana Date: Wed, 10 Sep 2025 21:51:22 +0800 Subject: [PATCH 07/12] Fix Signed-off-by: Rokashevich Svetlana Change-Id: I52a2b74e07986fd48243ef92f89bd74f86bdc8fa --- .../ets-func-tests/ets-func-tests-ignored-TSAN.txt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/static_core/plugins/ets/tests/test-lists/ets-func-tests/ets-func-tests-ignored-TSAN.txt b/static_core/plugins/ets/tests/test-lists/ets-func-tests/ets-func-tests-ignored-TSAN.txt index ca563dfa17..8621c84635 100644 --- a/static_core/plugins/ets/tests/test-lists/ets-func-tests/ets-func-tests-ignored-TSAN.txt +++ b/static_core/plugins/ets/tests/test-lists/ets-func-tests/ets-func-tests-ignored-TSAN.txt @@ -44,6 +44,7 @@ escompat/escompat_regexp_test_StringBindToBound.ets std/core/std_core_value_all_006.ets std/core/std_core_value_array_value_all_022.ets std/core/std_core_value_array_value_all_009.ets +std/core/std_core_value_array_value_all_032.ets std/core/std_core_type_array_type_all_006.ets std/core/std_core_int_instance_Int_toLong.ets std/core/std_core_double_instance_Double_floatValue.ets @@ -63,6 +64,12 @@ spec/generic/issue14700_ArrayBackedConstructorWithString.ets spec/17.Experimental_Features/Iterable_Types/for-of-s01-array-12.ets std/containers/concurrent_set/ConcurrentSet_iteratorTest.ets std/containers/TrivialArrayTest.ets +std/containers/concurrent_hash_map/ConcurrentHashMap_SetTest_Three.ets +spec/15.Semantic_Rules/Compatibility_Features/Extended_Conditional_Expressions/numeric/expr/numeric-short-nonzero-expression.ets +std/core/std_core_double_instance_Double_toFixed.ets +escompat/DeepCopyTest.ets +spec/10.Interfaces/overriding/15523_0003_iterable_override.ets +std/containers/concurrency/concurrent_hash_map/concurrent_hash_map_concurrent_has.ets #29851 escompat/RegExpTest.ets -- Gitee From 744094e8d39be60190d3352b9fff0adc9cfdbe7a Mon Sep 17 00:00:00 2001 From: Rokashevich Svetlana Date: Thu, 11 Sep 2025 02:30:09 +0800 Subject: [PATCH 08/12] Fix Signed-off-by: Rokashevich Svetlana Change-Id: I679cbcdd838f8ea9a6beb0f129cf4d4b9a19ff2e --- .../test-lists/ets-func-tests/ets-func-tests-ignored-TSAN.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/static_core/plugins/ets/tests/test-lists/ets-func-tests/ets-func-tests-ignored-TSAN.txt b/static_core/plugins/ets/tests/test-lists/ets-func-tests/ets-func-tests-ignored-TSAN.txt index 8621c84635..a67978a3f2 100644 --- a/static_core/plugins/ets/tests/test-lists/ets-func-tests/ets-func-tests-ignored-TSAN.txt +++ b/static_core/plugins/ets/tests/test-lists/ets-func-tests/ets-func-tests-ignored-TSAN.txt @@ -70,6 +70,10 @@ std/core/std_core_double_instance_Double_toFixed.ets escompat/DeepCopyTest.ets spec/10.Interfaces/overriding/15523_0003_iterable_override.ets std/containers/concurrency/concurrent_hash_map/concurrent_hash_map_concurrent_has.ets +spec/15.Semantic_Rules/Compatibility_Features/Extended_Conditional_Expressions/test-ext-cond-expr-false-0082.ets +std/core/std_core_stringbuilder_static_StringBuilder_toString_009.ets +std/core/std_core_array_includes_double_array_double.ets +std/core/std_core_array_lowerBoundSearch_double_array_double_int_int.ets #29851 escompat/RegExpTest.ets -- Gitee From 5c2aeac14c084035e51bf4dee06ac5bd36ed6ad6 Mon Sep 17 00:00:00 2001 From: Rokashevich Svetlana Date: Thu, 11 Sep 2025 15:18:04 +0800 Subject: [PATCH 09/12] Fix Signed-off-by: Rokashevich Svetlana Change-Id: Ib08dfa3795a63154dafbd1661f685916fb7d2437 --- .../test-lists/ets-func-tests/ets-func-tests-ignored-TSAN.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/static_core/plugins/ets/tests/test-lists/ets-func-tests/ets-func-tests-ignored-TSAN.txt b/static_core/plugins/ets/tests/test-lists/ets-func-tests/ets-func-tests-ignored-TSAN.txt index a67978a3f2..79e6eecde5 100644 --- a/static_core/plugins/ets/tests/test-lists/ets-func-tests/ets-func-tests-ignored-TSAN.txt +++ b/static_core/plugins/ets/tests/test-lists/ets-func-tests/ets-func-tests-ignored-TSAN.txt @@ -74,6 +74,7 @@ spec/15.Semantic_Rules/Compatibility_Features/Extended_Conditional_Expressions/t std/core/std_core_stringbuilder_static_StringBuilder_toString_009.ets std/core/std_core_array_includes_double_array_double.ets std/core/std_core_array_lowerBoundSearch_double_array_double_int_int.ets +spec/expressions/compound_assignment_02_only_main_short_mult_long.ets #29851 escompat/RegExpTest.ets -- Gitee From 177a469a2faabf4d69067d667f7e1e8860de4b78 Mon Sep 17 00:00:00 2001 From: Rokashevich Svetlana Date: Thu, 11 Sep 2025 17:46:45 +0800 Subject: [PATCH 10/12] Fix Signed-off-by: Rokashevich Svetlana Change-Id: Ib0f20b3048f285067f90d28dc5c62033fd871a6e --- static_core/plugins/ets/tests/ets_test_suite/gc/CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/static_core/plugins/ets/tests/ets_test_suite/gc/CMakeLists.txt b/static_core/plugins/ets/tests/ets_test_suite/gc/CMakeLists.txt index 39a830b131..e52f94d706 100644 --- a/static_core/plugins/ets/tests/ets_test_suite/gc/CMakeLists.txt +++ b/static_core/plugins/ets/tests/ets_test_suite/gc/CMakeLists.txt @@ -114,7 +114,10 @@ add_ets_gc_test(TIMEOUT_CMD timeout TIMEOUT_TIME 10m FILE test_finreg_in_differe # NOTE(26403) Profilesaver is turned off because of data race add_ets_gc_test(FILE finalization_registry_coro_test.ets OPTIONS "--coroutine-workers-count=10" "--gc-type=g1-gc" "--run-gc-in-place" "--gc-trigger-type=debug-never" MODE "INT") +# NOTE(@srokashevich, #29869): enable with tsan after fix +if (NOT PANDA_ENABLE_THREAD_SANITIZER) add_ets_gc_test(TIMEOUT_CMD timeout TIMEOUT_TIME 10m FILE finalization_registry_deadlock_test.ets OPTIONS "--gc-type=g1-gc" "--run-gc-in-place" "--gc-trigger-type=debug-never" MODE "INT") +endif() # NOTE(@srokashevich, #29644): enable with tsan after fix if (NOT PANDA_ENABLE_THREAD_SANITIZER) add_ets_gc_test(FILE scheduled_gc.ets OPTIONS "--gc-type=g1-gc" "--gc-trigger-type=debug-never" "--gc-use-nth-alloc-trigger=true" MODE "INT") -- Gitee From 8e9ca6cb885b598441d18132382aacbcc3e964dd Mon Sep 17 00:00:00 2001 From: Rokashevich Svetlana Date: Thu, 11 Sep 2025 20:28:53 +0800 Subject: [PATCH 11/12] Fix Signed-off-by: Rokashevich Svetlana Change-Id: If5770f85da84d130561a1207f1a9b5b2f49c7472 --- .../plugins/ets/tests/checked/CMakeLists.txt | 4 +- .../ets-func-tests-ignored-TSAN.txt | 52 ------------------- 2 files changed, 2 insertions(+), 54 deletions(-) diff --git a/static_core/plugins/ets/tests/checked/CMakeLists.txt b/static_core/plugins/ets/tests/checked/CMakeLists.txt index 39e77f70c1..a31fbcc44a 100644 --- a/static_core/plugins/ets/tests/checked/CMakeLists.txt +++ b/static_core/plugins/ets/tests/checked/CMakeLists.txt @@ -278,9 +278,9 @@ if (PANDA_TARGET_AMD64 OR NOT PANDA_ARM64_TESTS_WITH_SANITIZER) # NOTE(@srokashevich, #29168): enable with tsan after fix if (NOT PANDA_ENABLE_THREAD_SANITIZER) panda_add_checked_test_ets(FILE ${CMAKE_CURRENT_SOURCE_DIR}/ets_string_builder_append_merge_part1.ets) + panda_add_checked_test_ets(FILE ${CMAKE_CURRENT_SOURCE_DIR}/ets_string_builder_append_merge_part2.ets) + panda_add_checked_test_ets(FILE ${CMAKE_CURRENT_SOURCE_DIR}/ets_string_builder_append_merge_part3.ets) endif() - panda_add_checked_test_ets(FILE ${CMAKE_CURRENT_SOURCE_DIR}/ets_string_builder_append_merge_part2.ets) - panda_add_checked_test_ets(FILE ${CMAKE_CURRENT_SOURCE_DIR}/ets_string_builder_append_merge_part3.ets) panda_add_checked_test_ets(FILE ${CMAKE_CURRENT_SOURCE_DIR}/ets_string_builder_deopt1.ets) panda_add_checked_test_ets(FILE ${CMAKE_CURRENT_SOURCE_DIR}/ets_string_builder_deopt2.ets) panda_add_checked_test_ets(FILE ${CMAKE_CURRENT_SOURCE_DIR}/ets_string_builder_deopt3.ets) diff --git a/static_core/plugins/ets/tests/test-lists/ets-func-tests/ets-func-tests-ignored-TSAN.txt b/static_core/plugins/ets/tests/test-lists/ets-func-tests/ets-func-tests-ignored-TSAN.txt index 79e6eecde5..931071f109 100644 --- a/static_core/plugins/ets/tests/test-lists/ets-func-tests/ets-func-tests-ignored-TSAN.txt +++ b/static_core/plugins/ets/tests/test-lists/ets-func-tests/ets-func-tests-ignored-TSAN.txt @@ -24,57 +24,5 @@ escompat/JsonStringifyTest.ets #28355 escompat/escompat_regexp_match_String.ets -#29408 -std/core/std_core_array_includes_byte_array_byte.ets -std/core/std_core_array_indexOf_char_array_char.ets -std/core/std_core_array_slice_boolean_array_boolean_array.ets -std/core/std_core_string_String_lastIndexOf_String.ets -std/core/std_core_long_instance_Long_toFloat.ets -std/core/std_core_long_instance_Long_toLong.ets -std/core/SortStringsTest.ets -std/containers/BasicSetTest.ets -std/math/std_math_max_int_int.ets -spec/03.types/References_Types/string/constructor_with_nullish_0090.ets -spec/03.types/References_Types/Tuples_type/tuple_as_rest_param_6.ets -spec/16.Support_for_GUI_Programming/trailing_lambdas/trailing_lm_param.ets -spec/expressions/compound_assignment_01_double_mult_long.ets -spec/expressions/compound_assignment_01_int_mult_double.ets -regression/18012_enum_fromInt_error_at_cast.ets -escompat/escompat_regexp_test_StringBindToBound.ets -std/core/std_core_value_all_006.ets -std/core/std_core_value_array_value_all_022.ets -std/core/std_core_value_array_value_all_009.ets -std/core/std_core_value_array_value_all_032.ets -std/core/std_core_type_array_type_all_006.ets -std/core/std_core_int_instance_Int_toLong.ets -std/core/std_core_double_instance_Double_floatValue.ets -std/core/std_core_float_instance_Float_toString.ets -std/core/std_core_stringbuilder_instance_StringBuilder_append_006.ets -std/core/IntlNumberFormatTest2.ets -spec/15.Semantic_Rules/Compatibility_Features/Extended_Conditional_Expressions/test-ext-cond-expr-generic-false-0003.ets -spec/15.Semantic_Rules/Compatibility_Features/Extended_Conditional_Expressions/numeric/loop/numeric-loop-for-number-nonzero-expression.ets -spec/expressions/compound_assignment_02_only_main_byte_mult_int.ets -spec/expressions/compound_assignment_03_simple_assign_byte_mult_long.ets -spec/expressions/compound_assignment_01_double_mult_float.ets -spec/07.expressions/7.25.Equality_Expressions/strict_compare_01.ets -spec/07.expressions/7.32.Lambda_Expressions/capturingLocalAndGlobalVariablesInLambda.ets -spec/03.types/References_Types/3.8.12.Nullish_Types/nullable-function-default-param_0.ets -spec/03.types/References_Types/Type_undefined/define/define-class-member-as-question-and-assign.ets -spec/generic/issue14700_ArrayBackedConstructorWithString.ets -spec/17.Experimental_Features/Iterable_Types/for-of-s01-array-12.ets -std/containers/concurrent_set/ConcurrentSet_iteratorTest.ets -std/containers/TrivialArrayTest.ets -std/containers/concurrent_hash_map/ConcurrentHashMap_SetTest_Three.ets -spec/15.Semantic_Rules/Compatibility_Features/Extended_Conditional_Expressions/numeric/expr/numeric-short-nonzero-expression.ets -std/core/std_core_double_instance_Double_toFixed.ets -escompat/DeepCopyTest.ets -spec/10.Interfaces/overriding/15523_0003_iterable_override.ets -std/containers/concurrency/concurrent_hash_map/concurrent_hash_map_concurrent_has.ets -spec/15.Semantic_Rules/Compatibility_Features/Extended_Conditional_Expressions/test-ext-cond-expr-false-0082.ets -std/core/std_core_stringbuilder_static_StringBuilder_toString_009.ets -std/core/std_core_array_includes_double_array_double.ets -std/core/std_core_array_lowerBoundSearch_double_array_double_int_int.ets -spec/expressions/compound_assignment_02_only_main_short_mult_long.ets - #29851 escompat/RegExpTest.ets -- Gitee From 25d129179f43930339d1d203dc3a9fd612bafe45 Mon Sep 17 00:00:00 2001 From: Rokashevich Svetlana Date: Fri, 12 Sep 2025 15:37:40 +0800 Subject: [PATCH 12/12] Fix Signed-off-by: Rokashevich Svetlana Change-Id: Ie53564354dc1ed9df0ef35ecd394e57aef7a40a5 --- .../test-lists/ets-func-tests/ets-func-tests-ignored-TSAN.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/static_core/plugins/ets/tests/test-lists/ets-func-tests/ets-func-tests-ignored-TSAN.txt b/static_core/plugins/ets/tests/test-lists/ets-func-tests/ets-func-tests-ignored-TSAN.txt index 931071f109..feab6a5c01 100644 --- a/static_core/plugins/ets/tests/test-lists/ets-func-tests/ets-func-tests-ignored-TSAN.txt +++ b/static_core/plugins/ets/tests/test-lists/ets-func-tests/ets-func-tests-ignored-TSAN.txt @@ -26,3 +26,6 @@ escompat/escompat_regexp_match_String.ets #29851 escompat/RegExpTest.ets + +#29297 +escompat/ProcessTest.ets -- Gitee