[compiler-rt] 160e8eb - [ASan] Recognize lea r10, [rip + XX] (#68910)

via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 13 08:47:28 PDT 2023


Author: nicole mazzuca
Date: 2023-10-13T08:47:23-07:00
New Revision: 160e8eb4496104a1d0ed77649af7e8bb679252f9

URL: https://github.com/llvm/llvm-project/commit/160e8eb4496104a1d0ed77649af7e8bb679252f9
DIFF: https://github.com/llvm/llvm-project/commit/160e8eb4496104a1d0ed77649af7e8bb679252f9.diff

LOG: [ASan] Recognize lea r10, [rip + XX] (#68910)

This instruction is present in memcpy in the latest vcruntime

This PR has been opened for @AndrewDeanMS (a teammate inside Microsoft)
who made the PR to our internal branch.

Co-authored-by: Andrew Dean <Andrew.Dean at microsoft.com>

Added: 
    

Modified: 
    compiler-rt/lib/interception/interception_win.cpp

Removed: 
    


################################################################################
diff  --git a/compiler-rt/lib/interception/interception_win.cpp b/compiler-rt/lib/interception/interception_win.cpp
index d57afa3fda7bcb8..1b681ada37b170d 100644
--- a/compiler-rt/lib/interception/interception_win.cpp
+++ b/compiler-rt/lib/interception/interception_win.cpp
@@ -624,7 +624,7 @@ static size_t GetInstructionSize(uptr address, size_t* rel_offset = nullptr) {
                       //   mov rax, QWORD PTR [rip + XXXXXXXX]
     case 0x25ff48:    // 48 ff 25 XX XX XX XX :
                       //   rex.W jmp QWORD PTR [rip + XXXXXXXX]
-
+    case 0x158D4C:    // 4c 8d 15 XX XX XX XX : lea r10, [rip + XX]
       // Instructions having offset relative to 'rip' need offset adjustment.
       if (rel_offset)
         *rel_offset = 3;


        


More information about the llvm-commits mailing list