[compiler-rt] 6c52a18 - [win/asan] GetInstructionSize: Fix `8A 05 ...` to return 6 again. (#116889)
via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 21 13:17:15 PST 2024
Author: bernhardu
Date: 2024-11-21T23:17:11+02:00
New Revision: 6c52a18a1d67fd7d0d68e1434469e0a4aee980a9
URL: https://github.com/llvm/llvm-project/commit/6c52a18a1d67fd7d0d68e1434469e0a4aee980a9
DIFF: https://github.com/llvm/llvm-project/commit/6c52a18a1d67fd7d0d68e1434469e0a4aee980a9.diff
LOG: [win/asan] GetInstructionSize: Fix `8A 05 ...` to return 6 again. (#116889)
This was already the case before 3bd8f4e,
which probably accidentally inserted
a few new instructions and a return 4 in between.
Added:
Modified:
compiler-rt/lib/interception/interception_win.cpp
Removed:
################################################################################
diff --git a/compiler-rt/lib/interception/interception_win.cpp b/compiler-rt/lib/interception/interception_win.cpp
index cfd92619a1e15d..ac81beee11a39c 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;
More information about the llvm-commits
mailing list