This is an archive of the discontinued LLVM Phabricator instance.

[scudo] Use stdint types for internal scudo types
ClosedPublic

Authored by cryptoad on Aug 15 2021, 9:10 AM.

Details

Summary

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.

Diff Detail

Event Timeline

cryptoad requested review of this revision.Aug 15 2021, 9:10 AM
cryptoad created this revision.
Herald added a project: Restricted Project. · View Herald TranscriptAug 15 2021, 9:10 AM
Herald added a subscriber: Restricted Project. · View Herald Transcript
hctim accepted this revision.Aug 16 2021, 8:58 AM

Side note - it'd be nice at some point if we can LSC all the use-of-custom-types away, any reason to keep them?

This revision is now accepted and ready to land.Aug 16 2021, 8:58 AM

Side note - it'd be nice at some point if we can LSC all the use-of-custom-types away, any reason to keep them?

Yeah I guess they probably should go away at some point.
There was the advantage that they are shorter to type and that they can be redefined to something different per platform/whatever, but we are converging towards stdint types now.

This revision was automatically updated to reflect the committed changes.