HomePhabricator

[XRay] [compiler-rt] fix heap overflow by computing record pointers correctly

Description

[XRay] [compiler-rt] fix heap overflow by computing record pointers correctly

Summary:
While there, unify InMemoryRawLog and InMemoryRawLogWithArg's coding style:

  • swap libc's memcpy(3) for sanitizer's internal memcpy
  • use basic pointer arithmetics to compute offsets from the first record entry in the pre-allocated buffer, which is always the appropriate type for the given function
  • lose the local variable references as the TLD.* names fit just as well

Reviewers: eizan, kpw, dberris, dblaikie

Subscribers: #sanitizers, llvm-commits

Differential Revision: https://reviews.llvm.org/D42289

Details

Committed
pelikanJan 19 2018, 5:18 AM
Differential Revision
D42289: [XRay] [compiler-rt] fix heap overflow by computing record pointers correctly
Branches
Unknown
Tags
Unknown