diff --git a/compiler-rt/lib/gwp_asan/platform_specific/utilities_posix.cpp b/compiler-rt/lib/gwp_asan/platform_specific/utilities_posix.cpp index 8b196563115c8cdfec1e07335d82dae5bb510a12..e47de4b56df8da2d9b7e5f6fb320fcc7b5ff2a17 100644 --- a/compiler-rt/lib/gwp_asan/platform_specific/utilities_posix.cpp +++ b/compiler-rt/lib/gwp_asan/platform_specific/utilities_posix.cpp @@ -7,7 +7,9 @@ //===----------------------------------------------------------------------===// // OHOS_LOCAL begin +#include "gwp_asan/guarded_pool_allocator.h" #include "gwp_asan/optional/printf.h" +#include // OHOS_LOCAL end #include // IWYU pragma: keep (for __BIONIC__ macro) @@ -28,8 +30,9 @@ void die(const char *Message) { #else // __BIONIC__ // OHOS_LOCAL begin #if defined(__OHOS__) + MUSL_LOG("[gwp_asan] ErrMsg: %{public}s, Errno: %{public}d\n", Message, errno); Printf("GWP-ASan has a check error\n"); - Printf("%s\n", Message); + Printf("ErrMsg: %s, Errno: %d\n", Message, errno); Printf("*** End GWP-ASan report ***\n"); #endif // OHOS_LOCAL end