[sanitizer] Define 32bit uptr as uint

This makes it consistent with uintptr_t.
This commit is contained in:
Vitaly Buka 2021-08-14 16:51:10 -07:00
parent 1a0076db69
commit 45138f788c
2 changed files with 6 additions and 1 deletions

View File

@ -139,8 +139,13 @@ namespace __sanitizer {
typedef unsigned long long uptr;
typedef signed long long sptr;
#else
# if (SANITIZER_WORDSIZE == 64)
typedef unsigned long uptr;
typedef signed long sptr;
# else
typedef unsigned int uptr;
typedef signed int sptr;
# endif
#endif // defined(_WIN64)
#if defined(__x86_64__)
// Since x32 uses ILP32 data model in 64-bit hardware mode, we must use

View File

@ -71,7 +71,7 @@ void Print(const set<uptr> &s) {
#if defined(_WIN64)
fprintf(stderr, "%llu ", *it);
#else
fprintf(stderr, "%lu ", *it);
fprintf(stderr, "%zu ", *it);
#endif
}
fprintf(stderr, "\n");