[compiler-rt] [ASan][windows] Recognize movzx r11d, BYTE PTR [rdx] in interception_win (PR #111638)

Mike Hommey via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 8 23:20:26 PDT 2024


https://github.com/glandium created https://github.com/llvm/llvm-project/pull/111638

The instruction is present in some library in the 24H2 update for Windows 11:

==8508==interception_win: unhandled instruction at 0x7ff83e193a40: 44 0f b6 1a 4c 8b d2 48

This could be generalized, but getting all the ModR/M byte combinations right is tricky. Many other classes of instructions handled in this file could use some generalization too.

>From 896a5b8d4b7a34ace32c27afc1da158970597480 Mon Sep 17 00:00:00 2001
From: Mike Hommey <mh at glandium.org>
Date: Wed, 9 Oct 2024 10:43:42 +0900
Subject: [PATCH] [ASan] Recognize movzx r11d, BYTE PTR [rdx] in
 interception_win

The instruction is present in some library in the 24H2 update for Windows 11:

==8508==interception_win: unhandled instruction at 0x7ff83e193a40: 44 0f b6 1a 4c 8b d2 48

This could be generalized, but getting all the ModR/M byte combinations
right is tricky. Many other classes of instructions handled in this file
could use some generalization too.
---
 compiler-rt/lib/interception/interception_win.cpp | 1 +
 1 file changed, 1 insertion(+)

diff --git a/compiler-rt/lib/interception/interception_win.cpp b/compiler-rt/lib/interception/interception_win.cpp
index 4a6ff6656edb1c..4f60d4251303d6 100644
--- a/compiler-rt/lib/interception/interception_win.cpp
+++ b/compiler-rt/lib/interception/interception_win.cpp
@@ -768,6 +768,7 @@ static size_t GetInstructionSize(uptr address, size_t* rel_offset = nullptr) {
   }
 
   switch (*(u32*)(address)) {
+    case 0x1ab60f44:  // 44 0f b6 1a : movzx r11d, BYTE PTR [rdx]
     case 0x24448b48:  // 48 8b 44 24 XX : mov rax, QWORD ptr [rsp + XX]
     case 0x246c8948:  // 48 89 6C 24 XX : mov QWORD ptr [rsp + XX], rbp
     case 0x245c8948:  // 48 89 5c 24 XX : mov QWORD PTR [rsp + XX], rbx



More information about the llvm-commits mailing list