HomePhabricator

[InstrProf] Tighten a check for malformed data records in raw profiles

Authored by vsk on Sep 3 2019, 3:23 PM.

Description

[InstrProf] Tighten a check for malformed data records in raw profiles

The check needs to validate a counter offset before performing pointer
arithmetic with the (potentially corrupt) offset.

Found by UBSan's pointer overflow check.

rdar://54843625

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

llvm-svn: 370826

Details