From b87b642aa6b7f5c1082d8851bf242b0b67fa47de Mon Sep 17 00:00:00 2001 From: Vitaly Buka Date: Mon, 11 Apr 2022 17:25:08 -0700 Subject: [PATCH] [sanitizer] Fix arg types of internal functions They didn't match sanitizer_common for 32bit. --- .../lib/sanitizer_common/symbolizer/sanitizer_symbolize.cpp | 3 ++- .../lib/sanitizer_common/symbolizer/sanitizer_wrappers.cpp | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/compiler-rt/lib/sanitizer_common/symbolizer/sanitizer_symbolize.cpp b/compiler-rt/lib/sanitizer_common/symbolizer/sanitizer_symbolize.cpp index 80cab36426c5..bca12d42f90a 100644 --- a/compiler-rt/lib/sanitizer_common/symbolizer/sanitizer_symbolize.cpp +++ b/compiler-rt/lib/sanitizer_common/symbolizer/sanitizer_symbolize.cpp @@ -10,6 +10,7 @@ // //===----------------------------------------------------------------------===// +#include #include #include @@ -41,7 +42,7 @@ static llvm::symbolize::PrinterConfig getDefaultPrinterConfig() { } namespace __sanitizer { -int internal_snprintf(char *buffer, unsigned long length, const char *format, +int internal_snprintf(char *buffer, uintptr_t length, const char *format, ...); } // namespace __sanitizer diff --git a/compiler-rt/lib/sanitizer_common/symbolizer/sanitizer_wrappers.cpp b/compiler-rt/lib/sanitizer_common/symbolizer/sanitizer_wrappers.cpp index d3c59e357d46..996e44468eeb 100644 --- a/compiler-rt/lib/sanitizer_common/symbolizer/sanitizer_wrappers.cpp +++ b/compiler-rt/lib/sanitizer_common/symbolizer/sanitizer_wrappers.cpp @@ -13,6 +13,7 @@ #include #include #include +#include #include #include #include @@ -31,7 +32,7 @@ unsigned long internal_mmap(void *addr, unsigned long length, int prot, int flags, int fd, unsigned long long offset); void *internal_memcpy(void *dest, const void *src, unsigned long n); // Used to propagate errno. -bool internal_iserror(unsigned long retval, int *rverrno = 0); +bool internal_iserror(uintptr_t retval, int *rverrno = 0); } // namespace __sanitizer namespace {