From 3f875134a7ce7285f4d5484fc0551b14076463e6 Mon Sep 17 00:00:00 2001 From: Kirill Stoimenov Date: Wed, 8 Sep 2021 17:04:43 +0000 Subject: [PATCH] [asan] Fixed the jump to use the 4 byte offset version. 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. Reviewed By: kda Differential Revision: https://reviews.llvm.org/D109453 --- llvm/lib/Target/X86/X86MCInstLower.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/llvm/lib/Target/X86/X86MCInstLower.cpp b/llvm/lib/Target/X86/X86MCInstLower.cpp index 978fcbf..782ed06 100644 --- a/llvm/lib/Target/X86/X86MCInstLower.cpp +++ b/llvm/lib/Target/X86/X86MCInstLower.cpp @@ -1525,7 +1525,7 @@ void X86AsmPrinter::emitAsanReportError(Module &M, unsigned Reg, .addReg(X86::NoRegister + Reg), STI); OutStreamer->emitInstruction( - MCInstBuilder(X86::JMP_1) + MCInstBuilder(X86::JMP_4) .addExpr(MCSymbolRefExpr::create(ReportError, MCSymbolRefExpr::VK_PLT, OutContext)), STI); -- 2.7.4