From 19d8e8d98c20f4c80ad42a82357fb24ca37afebb Mon Sep 17 00:00:00 2001 From: Maosu Zhao Date: Tue, 5 Nov 2024 14:19:46 +0800 Subject: [PATCH] [DeviceASAN] Fix build error when using libcxx --- source/loader/layers/sanitizer/asan_libdevice.hpp | 4 ++-- source/loader/layers/sanitizer/linux/symbolizer.cpp | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/source/loader/layers/sanitizer/asan_libdevice.hpp b/source/loader/layers/sanitizer/asan_libdevice.hpp index bd5fa64a38..26ef946c5f 100644 --- a/source/loader/layers/sanitizer/asan_libdevice.hpp +++ b/source/loader/layers/sanitizer/asan_libdevice.hpp @@ -71,7 +71,7 @@ struct LocalArgsInfo { uint64_t SizeWithRedZone = 0; }; -constexpr std::size_t ASAN_MAX_NUM_REPORTS = 10; +constexpr uint64_t ASAN_MAX_NUM_REPORTS = 10; struct LaunchInfo { uintptr_t GlobalShadowOffset = 0; @@ -98,7 +98,7 @@ constexpr unsigned ASAN_SHADOW_GRANULARITY = 1ULL << ASAN_SHADOW_SCALE; // Based on the observation, only the last 24 bits of the address of the private // variable have changed -constexpr std::size_t ASAN_PRIVATE_SIZE = 0xffffffULL + 1; +constexpr uint64_t ASAN_PRIVATE_SIZE = 0xffffffULL + 1; // These magic values are written to shadow for better error // reporting. diff --git a/source/loader/layers/sanitizer/linux/symbolizer.cpp b/source/loader/layers/sanitizer/linux/symbolizer.cpp index ccc621ac4a..b1968389e5 100644 --- a/source/loader/layers/sanitizer/linux/symbolizer.cpp +++ b/source/loader/layers/sanitizer/linux/symbolizer.cpp @@ -7,7 +7,6 @@ * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception * */ -#include "common.hpp" #include "llvm/DebugInfo/Symbolize/DIPrinter.h" #include "llvm/DebugInfo/Symbolize/Symbolize.h" #include