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

via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 12 09:29:18 PDT 2023


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-compiler-rt-sanitizer

Author: nicole mazzuca (strega-nil)

<details>
<summary>Changes</summary>

This instruction is present in memcpy in the latest vcruntime

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

---
Full diff: https://github.com/llvm/llvm-project/pull/68910.diff


1 Files Affected:

- (modified) compiler-rt/lib/interception/interception_win.cpp (+1-1) 


``````````diff
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;

``````````

</details>


https://github.com/llvm/llvm-project/pull/68910


More information about the llvm-commits mailing list