[PATCH] D120362: [sanitizer][sancov] Refactor GetNextInstructionPc/GetPreviousInstructionPc

Ulrich Weigand via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 23 12:30:03 PST 2022


uweigand added a comment.

This seems to have caused build bot failures on s390x: https://lab.llvm.org/buildbot/#/builders/94/builds/7935.

The patch changes the logic for s390x -- it now uses 4 when it used to use 1.  4 clearly is wrong - we have instructions of sizes 2, 4, or 6 bytes.  In general it is not possible to determine the "previous" instruction just from a PC value, similar to Intel, so using - 1 seems the best option - at least this results in a value guaranteed to be *within* the previous instruction.

Also, I noticed this bit in `test/tsan/test.h`:

  //The const kPCInc must be in sync with StackTrace::GetPreviousInstructionPc

This now no longer seems to be the case.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D120362/new/

https://reviews.llvm.org/D120362



More information about the llvm-commits mailing list