From 3c2a802250e74afc558a5d3224d53d65e753ad61 Mon Sep 17 00:00:00 2001 From: Eric Date: Fri, 21 Mar 2025 14:50:28 +0800 Subject: [PATCH] [Compier-RT][ASAN] Fix set asan.options logpath Signed-off-by: Eric --- compiler-rt/lib/asan/asan_rtl.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/compiler-rt/lib/asan/asan_rtl.cpp b/compiler-rt/lib/asan/asan_rtl.cpp index 33b6b2dc9dee..db51a801e02f 100644 --- a/compiler-rt/lib/asan/asan_rtl.cpp +++ b/compiler-rt/lib/asan/asan_rtl.cpp @@ -414,16 +414,16 @@ static void AsanInitInternal() { AddDieCallback(AsanDie); SetCheckUnwindCallback(CheckUnwind); SetPrintfAndReportCallback(AppendToErrorMessageBuffer); - - __sanitizer_set_report_path(common_flags()->log_path); - - __asan_option_detect_stack_use_after_return = - flags()->detect_stack_use_after_return; // OHOS_LOCAL Begin #if !SANITIZER_OHOS - __sanitizer::InitializePlatformEarly(); + __sanitizer_set_report_path(common_flags()->log_path); #endif // OHOS_LOCAL End + __asan_option_detect_stack_use_after_return = + flags()->detect_stack_use_after_return; + + __sanitizer::InitializePlatformEarly(); + // Setup internal allocator callback. SetLowLevelAllocateMinAlignment(ASAN_SHADOW_GRANULARITY); SetLowLevelAllocateCallback(OnLowLevelAllocate); -- Gitee