[PATCH] D110271: [llvm-profgen] Fix an out-of-range error during unwinding

Lei Wang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 22 10:35:26 PDT 2021


wlei updated this revision to Diff 374288.
wlei added a comment.

fix typo


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D110271

Files:
  llvm/tools/llvm-profgen/PerfReader.cpp


Index: llvm/tools/llvm-profgen/PerfReader.cpp
===================================================================
--- llvm/tools/llvm-profgen/PerfReader.cpp
+++ llvm/tools/llvm-profgen/PerfReader.cpp
@@ -62,7 +62,7 @@
   } else {
     // Unwind linear execution part
     uint64_t LeafAddr = State.CurrentLeafFrame->Address;
-    while (IP.Address >= Target) {
+    while (IP.Address >= Target && IP.Index != 0) {
       uint64_t PrevIP = IP.Address;
       IP.backward();
       // Break into segments for implicit call/return due to inlining


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D110271.374288.patch
Type: text/x-patch
Size: 544 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210922/207c0552/attachment.bin>


More information about the llvm-commits mailing list