[compiler-rt] [win/asan] GetInstructionSize: Fix `8A 05 ...` to return 6 again. (PR #116889)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 19 15:47:36 PST 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-compiler-rt-sanitizer
Author: None (bernhardu)
<details>
<summary>Changes</summary>
This was already the case before 3bd8f4e,
which probably accidentally inserted
a few new instructions and a return 4 in between.
---
Full diff: https://github.com/llvm/llvm-project/pull/116889.diff
1 Files Affected:
- (modified) compiler-rt/lib/interception/interception_win.cpp (+1-1)
``````````diff
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;
``````````
</details>
https://github.com/llvm/llvm-project/pull/116889
More information about the llvm-commits
mailing list