[compiler-rt] [win/asan] Recognize mov QWORD PTR [rip + X], reg (PR #117335)
via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 22 06:50:13 PST 2024
https://github.com/zmodem created https://github.com/llvm/llvm-project/pull/117335
This comes up when intercepting clang-built `__sanitizer_cov` functions.
>From a5271e2afcd23f44fd6cb6c7f023d06679bbe777 Mon Sep 17 00:00:00 2001
From: Hans Wennborg <hans at chromium.org>
Date: Fri, 22 Nov 2024 15:45:41 +0100
Subject: [PATCH] [win/asan] Recognize mov QWORD PTR [rip + X], reg
---
compiler-rt/lib/interception/interception_win.cpp | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/compiler-rt/lib/interception/interception_win.cpp b/compiler-rt/lib/interception/interception_win.cpp
index ac81beee11a39c..8b8ce1abe906f6 100644
--- a/compiler-rt/lib/interception/interception_win.cpp
+++ b/compiler-rt/lib/interception/interception_win.cpp
@@ -816,6 +816,10 @@ static size_t GetInstructionSize(uptr address, size_t* rel_offset = nullptr) {
// mov rax, QWORD PTR [rip + XXXXXXXX]
case 0x058d48: // 48 8d 05 XX XX XX XX :
// lea rax, QWORD PTR [rip + XXXXXXXX]
+ case 0x0d8948: // 48 89 0d XX XX XX XX :
+ // mov QWORD PTR [rip + XXXXXXXX], rcx
+ case 0x158948: // 48 89 15 XX XX XX XX :
+ // mov QWORD PTR [rip + XXXXXXXX], rdx
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]
More information about the llvm-commits
mailing list