From 4ea9168f17d8ef83456a81917d818858496b220c Mon Sep 17 00:00:00 2001 From: Khomutov Nikita Date: Tue, 9 Sep 2025 20:13:01 +0300 Subject: [PATCH] Fix datarace with CompilerOptimizeStringConcat Issue: https://gitee.com/openharmony/arkcompiler_runtime_core/issues/ICX7KY 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