[all-commits] [llvm/llvm-project] c579c6: [compiler-rt][profile] Make corrupted-profile.c mo...

PiJoules via All-commits all-commits at lists.llvm.org
Thu Sep 23 17:18:06 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: c579c658cd42034449d4fa19f28b43f2082c0991
      https://github.com/llvm/llvm-project/commit/c579c658cd42034449d4fa19f28b43f2082c0991
  Author: Leonard Chan <leonardchan at google.com>
  Date:   2021-09-23 (Thu, 23 Sep 2021)

  Changed paths:
    M compiler-rt/test/profile/Linux/corrupted-profile.c

  Log Message:
  -----------
  [compiler-rt][profile] Make corrupted-profile.c more robust

This test specifically checks that profiles are not mergeable if there's a
change in the CounterPtr in the profile header. The test manually changes
CounterPtr by explicitly calling memset on some offset into the profile file.
This test would fail if binary IDs were emitted because the offset calculation
does not take into account the binary ID sizes.

This patch updates the test to use types provided in profile/InstrProfData.inc
to make it more resistant to profile layout changes.

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




More information about the All-commits mailing list