Separate the IRG part from the STZG part since we will need to use
the latter on its own for some upcoming changes.
Details
- Reviewers
cryptoad hctim eugenis - Commits
- rG9f8aeb060293: scudo: Split setRandomTag in two. NFCI.
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
compiler-rt/lib/scudo/standalone/memtag.h | ||
---|---|---|
106–122 | End doesn't need to be granule-aligned (we can pass an unaligned End from the primary allocator). This is the reason why we return the address of the end of the tagged region instead of just letting the caller use End. I suppose that we could check Begin here though. | |
107 | I'm not sure about that. I think that if Begin > End we will want to crash here (i.e. the likely source of the bug) instead of at some indeterminate point later. |
Probably better to be safe and make this if (Begin < End)?