[PATCH] D126387: [JITLink][AARCH64] Fix overflow range of Page21

Sunho Kim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon May 30 00:56:31 PDT 2022


sunho updated this revision to Diff 432860.
sunho added a comment.
Herald added a subscriber: hiraditya.

Rebase on updated generic aarch64 fixup patch.


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

https://reviews.llvm.org/D126387

Files:
  llvm/lib/ExecutionEngine/JITLink/aarch64.cpp


Index: llvm/lib/ExecutionEngine/JITLink/aarch64.cpp
===================================================================
--- llvm/lib/ExecutionEngine/JITLink/aarch64.cpp
+++ llvm/lib/ExecutionEngine/JITLink/aarch64.cpp
@@ -88,7 +88,7 @@
         FixupAddress.getValue() & ~static_cast<uint64_t>(4096 - 1);
 
     int64_t PageDelta = TargetPage - PCPage;
-    if (PageDelta < -(1 << 30) || PageDelta > ((1 << 30) - 1))
+    if (!isInt<33>(PageDelta))
       return makeTargetOutOfRangeError(G, B, E);
 
     uint32_t RawInstr = *(ulittle32_t *)FixupPtr;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D126387.432860.patch
Type: text/x-patch
Size: 552 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220530/8acc885f/attachment.bin>


More information about the llvm-commits mailing list