[PATCH] D149047: [BOLT][Wrapper] Fix off-by-one in find_section upper limit

Job Noorman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 16 00:25:52 PDT 2023


This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG8a5a12057e9e: [BOLT][Wrapper] Fix off-by-one in find_section upper limit (authored by jobnoorman).

Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D149047

Files:
  bolt/utils/llvm-bolt-wrapper.py


Index: bolt/utils/llvm-bolt-wrapper.py
===================================================================
--- bolt/utils/llvm-bolt-wrapper.py
+++ bolt/utils/llvm-bolt-wrapper.py
@@ -246,7 +246,7 @@
         file_offset = int(cols[5], 16)
         # section size
         size = int(cols[2], 16)
-        if offset >= file_offset and offset <= file_offset + size:
+        if offset >= file_offset and offset < file_offset + size:
             if sys.stdout.isatty(): # terminal supports colors
                 print(f"\033[1m{line}\033[0m")
             else:


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D149047.522464.patch
Type: text/x-patch
Size: 562 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230516/eeb700bb/attachment.bin>


More information about the llvm-commits mailing list