Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ASan] Recognize lea r10, [rip + XX] #68910

Merged
merged 1 commit into from
Oct 13, 2023

Conversation

strega-nil
Copy link
Contributor

@strega-nil strega-nil commented Oct 12, 2023

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.

This instruction is present in memcpy in the latest vcruntime
@llvmbot
Copy link

llvmbot commented Oct 12, 2023

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

Author: nicole mazzuca (strega-nil)

Changes

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

@strega-nil strega-nil merged commit 160e8eb into llvm:main Oct 13, 2023
5 checks passed
Guzhu-AMD pushed a commit to GPUOpen-Drivers/llvm-project that referenced this pull request Oct 20, 2023
Local branch amd-gfx da11a8d Merged main:d2aa523f2a2e into amd-gfx:393573be750f
Remote branch main 160e8eb [ASan] Recognize lea r10, [rip + XX] (llvm#68910)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants