[PATCH] D109453: [asan] Fixed the jump to use the 4 byte offset version.

Kirill Stoimenov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 8 10:08:41 PDT 2021


kstoimenov created this revision.
kstoimenov added a reviewer: kda.
Herald added subscribers: pengfei, hiraditya.
kstoimenov requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

This should have been the 4 byte version in the first place. Unfortunatelly there is no easy way to add a test as both the 1 byte and 4 byte version are printed as 'jmp' in the assembly code.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D109453

Files:
  llvm/lib/Target/X86/X86MCInstLower.cpp


Index: llvm/lib/Target/X86/X86MCInstLower.cpp
===================================================================
--- llvm/lib/Target/X86/X86MCInstLower.cpp
+++ llvm/lib/Target/X86/X86MCInstLower.cpp
@@ -1525,7 +1525,7 @@
                                    .addReg(X86::NoRegister + Reg),
                                STI);
   OutStreamer->emitInstruction(
-      MCInstBuilder(X86::JMP_1)
+      MCInstBuilder(X86::JMP_4)
           .addExpr(MCSymbolRefExpr::create(ReportError, MCSymbolRefExpr::VK_PLT,
                                            OutContext)),
       STI);


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D109453.371384.patch
Type: text/x-patch
Size: 580 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210908/6486fada/attachment.bin>


More information about the llvm-commits mailing list