Skip to content

Commit a1b5a08

Browse files
committed
[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.
1 parent a58c3d3 commit a1b5a08

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
@@ -634,7 +634,6 @@ static size_t GetInstructionSize(uptr address, size_t* rel_offset = nullptr) {
634634
case 0x018a: // mov al, byte ptr [rcx]
635635
return 2;
636636

637-
case 0x058A: // 8A 05 XX XX XX XX : mov al, byte ptr [XX XX XX XX]
638637
case 0x7E80: // 80 7E YY XX cmp BYTE PTR [rsi+YY], XX
639638
case 0x7D80: // 80 7D YY XX cmp BYTE PTR [rbp+YY], XX
640639
case 0x7A80: // 80 7A YY XX cmp BYTE PTR [rdx+YY], XX
@@ -643,6 +642,7 @@ static size_t GetInstructionSize(uptr address, size_t* rel_offset = nullptr) {
643642
case 0x7980: // 80 79 YY XX cmp BYTE ptr [rcx+YY], XX
644643
return 4;
645644

645+
case 0x058A: // 8A 05 XX XX XX XX : mov al, byte ptr [XX XX XX XX]
646646
case 0x058B: // 8B 05 XX XX XX XX : mov eax, dword ptr [XX XX XX XX]
647647
if (rel_offset)
648648
*rel_offset = 2;

0 commit comments

Comments
 (0)