Index: include/sanitizer/scudo_interface.h =================================================================== --- include/sanitizer/scudo_interface.h +++ include/sanitizer/scudo_interface.h @@ -26,7 +26,7 @@ // the hard limit (HardLimit=1) or the soft limit (HardLimit=0). The limit // can be removed by setting LimitMb to 0. This function's parameters should // be fully trusted to avoid security mishaps. - void __scudo_set_rss_limit(unsigned long LimitMb, int HardLimit); + void __scudo_set_rss_limit(size_t LimitMb, int HardLimit); #ifdef __cplusplus } // extern "C" #endif Index: lib/scudo/scudo_allocator.cpp =================================================================== --- lib/scudo/scudo_allocator.cpp +++ lib/scudo/scudo_allocator.cpp @@ -721,8 +721,8 @@ return 1; } -uptr __sanitizer_get_estimated_allocated_size(uptr size) { - return size; +uptr __sanitizer_get_estimated_allocated_size(uptr Size) { + return Size; } int __sanitizer_get_ownership(const void *Ptr) { @@ -736,7 +736,7 @@ // Interface functions extern "C" { -void __scudo_set_rss_limit(unsigned long LimitMb, int HardLimit) { // NOLINT +void __scudo_set_rss_limit(uptr LimitMb, s32 HardLimit) { if (!SCUDO_CAN_USE_PUBLIC_INTERFACE) return; Instance.setRssLimit(LimitMb, !!HardLimit); Index: lib/scudo/scudo_interface_internal.h =================================================================== --- lib/scudo/scudo_interface_internal.h +++ lib/scudo/scudo_interface_internal.h @@ -14,9 +14,14 @@ #ifndef SCUDO_INTERFACE_INTERNAL_H_ #define SCUDO_INTERFACE_INTERNAL_H_ +#include "sanitizer_common/sanitizer_internal_defs.h" + +using __sanitizer::uptr; +using __sanitizer::s32; + extern "C" { SANITIZER_INTERFACE_ATTRIBUTE -void __scudo_set_rss_limit(unsigned long LimitMb, int HardLimit); // NOLINT +void __scudo_set_rss_limit(uptr LimitMb, s32 HardLimit); } // extern "C" #endif // SCUDO_INTERFACE_INTERNAL_H_