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

Sunho Kim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 9 18:30:59 PDT 2022


This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG51a41f23b62c: [JITLink][AArch64] Fix overflow range of Page21 fixup edge. (authored by sunho).

Repository:
  rG LLVM Github Monorepo

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
@@ -92,7 +92,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.435752.patch
Type: text/x-patch
Size: 552 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220610/7164d0de/attachment.bin>


More information about the llvm-commits mailing list