Skip to content

Commit d5d6197

Browse files
committed
[win/asan] GetInstructionSize: Make F6 C1 XX a generic entry.
1 parent a1b5a08 commit d5d6197

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

compiler-rt/lib/interception/interception_win.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -568,6 +568,9 @@ static size_t GetInstructionSize(uptr address, size_t* rel_offset = nullptr) {
568568
case 0xD284: // 84 D2 : test dl,dl
569569
return 2;
570570

571+
case 0xC1F6: // F6 C1 XX : test cl, XX
572+
return 3;
573+
571574
// Cannot overwrite control-instruction. Return 0 to indicate failure.
572575
case 0x25FF: // FF 25 XX XX XX XX : jmp [XXXXXXXX]
573576
return 0;
@@ -658,7 +661,6 @@ static size_t GetInstructionSize(uptr address, size_t* rel_offset = nullptr) {
658661
}
659662

660663
switch (0x00FFFFFF & *(u32*)address) {
661-
case 0x07c1f6: // f6 c1 07 : test cl, 0x7
662664
case 0x10b70f: // 0f b7 10 : movzx edx, WORD PTR [rax]
663665
case 0xc00b4d: // 4d 0b c0 : or r8, r8
664666
case 0xc03345: // 45 33 c0 : xor r8d, r8d

0 commit comments

Comments
 (0)