Skip to content

Commit

Permalink
[scudo] Use stdint types for internal scudo types
Browse files Browse the repository at this point in the history
`scudo::uptr` was defined as an `unsigned long` on 32-b platform,
while a `uintptr_t` is usually defined as an `unsigned int`.
This worked, this was not consistent, particularly with regard to
format string specifiers.

As suggested by Vitaly, since we are including `stdint.h`, define
the internal `scudo` integer types to those.

Differential Revision: https://reviews.llvm.org/D108089
  • Loading branch information
Kostya Kortchinsky committed Aug 16, 2021
1 parent b7425e9 commit 5fc841d
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions compiler-rt/lib/scudo/standalone/internal_defs.h
Original file line number Diff line number Diff line change
Expand Up @@ -78,16 +78,16 @@

namespace scudo {

typedef unsigned long uptr;
typedef unsigned char u8;
typedef unsigned short u16;
typedef unsigned int u32;
typedef unsigned long long u64;
typedef signed long sptr;
typedef signed char s8;
typedef signed short s16;
typedef signed int s32;
typedef signed long long s64;
typedef uintptr_t uptr;
typedef uint8_t u8;
typedef uint16_t u16;
typedef uint32_t u32;
typedef uint64_t u64;
typedef intptr_t sptr;
typedef int8_t s8;
typedef int16_t s16;
typedef int32_t s32;
typedef int64_t s64;

// The following two functions have platform specific implementations.
void outputRaw(const char *Buffer);
Expand Down

0 comments on commit 5fc841d

Please sign in to comment.