Skip to content

Commit c005634

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

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

compiler-rt/lib/interception/interception_win.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -634,6 +634,9 @@ static size_t GetInstructionSize(uptr address, size_t* rel_offset = nullptr) {
634634
case 0xD284: // 84 D2 : test dl,dl
635635
return 2;
636636

637+
case 0xC1F6: // F6 C1 XX : test cl, XX
638+
return 3;
639+
637640
// Cannot overwrite control-instruction. Return 0 to indicate failure.
638641
case 0x25FF: // FF 25 XX YY ZZ WW : jmp dword ptr ds:[WWZZYYXX]
639642
return 0;
@@ -723,8 +726,7 @@ static size_t GetInstructionSize(uptr address, size_t* rel_offset = nullptr) {
723726
return 7;
724727
}
725728

726-
switch (0x00FFFFFF & *(u32*)address) {
727-
case 0x07c1f6: // f6 c1 07 : test cl, 0x7
729+
switch (0x00FFFFFF & *(u32 *)address) {
728730
case 0x10b70f: // 0f b7 10 : movzx edx, WORD PTR [rax]
729731
case 0xc00b4d: // 4d 0b c0 : or r8, r8
730732
case 0xc03345: // 45 33 c0 : xor r8d, r8d

0 commit comments

Comments
 (0)