Skip to content

Commit 6c52a18

Browse files
authored
[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.
1 parent 4d1959b commit 6c52a18

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compiler-rt/lib/interception/interception_win.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -696,7 +696,6 @@ static size_t GetInstructionSize(uptr address, size_t* rel_offset = nullptr) {
696696
case 0x018a: // mov al, byte ptr [rcx]
697697
return 2;
698698

699-
case 0x058A: // 8A 05 XX XX XX XX : mov al, byte ptr [XX XX XX XX]
700699
case 0x7E80: // 80 7E YY XX cmp BYTE PTR [rsi+YY], XX
701700
case 0x7D80: // 80 7D YY XX cmp BYTE PTR [rbp+YY], XX
702701
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) {
705704
case 0x7980: // 80 79 YY XX cmp BYTE ptr [rcx+YY], XX
706705
return 4;
707706

707+
case 0x058A: // 8A 05 XX XX XX XX : mov al, byte ptr [XX XX XX XX]
708708
case 0x058B: // 8B 05 XX XX XX XX : mov eax, dword ptr [XX XX XX XX]
709709
if (rel_offset)
710710
*rel_offset = 2;

0 commit comments

Comments
 (0)