From 744e447a036e684aa2468f380b829930962f1272 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bernhard=20=C3=9Cbelacker?= Date: Sun, 20 Oct 2024 15:36:19 +0200 Subject: [PATCH] [win/asan] GetInstructionSize: Fix `8A 05 ...` to return 6 again. This was already the case before 3bd8f4e, which probably accidentally inserted a few new instructions and a return 4 in between. --- compiler-rt/lib/interception/interception_win.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler-rt/lib/interception/interception_win.cpp b/compiler-rt/lib/interception/interception_win.cpp index cfd92619a1e15..ac81beee11a39 100644 --- a/compiler-rt/lib/interception/interception_win.cpp +++ b/compiler-rt/lib/interception/interception_win.cpp @@ -696,7 +696,6 @@ static size_t GetInstructionSize(uptr address, size_t* rel_offset = nullptr) { case 0x018a: // mov al, byte ptr [rcx] return 2; - case 0x058A: // 8A 05 XX XX XX XX : mov al, byte ptr [XX XX XX XX] case 0x7E80: // 80 7E YY XX cmp BYTE PTR [rsi+YY], XX case 0x7D80: // 80 7D YY XX cmp BYTE PTR [rbp+YY], XX case 0x7A80: // 80 7A YY XX cmp BYTE PTR [rdx+YY], XX @@ -705,6 +704,7 @@ static size_t GetInstructionSize(uptr address, size_t* rel_offset = nullptr) { case 0x7980: // 80 79 YY XX cmp BYTE ptr [rcx+YY], XX return 4; + case 0x058A: // 8A 05 XX XX XX XX : mov al, byte ptr [XX XX XX XX] case 0x058B: // 8B 05 XX XX XX XX : mov eax, dword ptr [XX XX XX XX] if (rel_offset) *rel_offset = 2;