Skip to content

Commit cb5162a

Browse files
committed
[win/asan] GetInstructionSize: Make 83 E4 XX a generic entry.
1 parent eade364 commit cb5162a

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

compiler-rt/lib/interception/interception_win.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -568,6 +568,7 @@ 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 0xE483: // 83 E4 XX : and esp, XX
571572
case 0xEC83: // 83 EC XX : sub esp, XX
572573
case 0xC1F6: // F6 C1 XX : test cl, XX
573574
return 3;
@@ -578,7 +579,6 @@ static size_t GetInstructionSize(uptr address, size_t* rel_offset = nullptr) {
578579
}
579580

580581
switch (0x00FFFFFF & *(u32*)address) {
581-
case 0xF8E483: // 83 E4 F8 : and esp, 0xFFFFFFF8
582582
case 0x24A48D: // 8D A4 24 XX XX XX XX : lea esp, [esp + XX XX XX XX]
583583
return 7;
584584
}
@@ -707,7 +707,6 @@ static size_t GetInstructionSize(uptr address, size_t* rel_offset = nullptr) {
707707
case 0xdb8548: // 48 85 db : test rbx, rbx
708708
case 0xdb854d: // 4d 85 db : test r11, r11
709709
case 0xdc8b4c: // 4c 8b dc : mov r11, rsp
710-
case 0xe0e483: // 83 e4 e0 : and esp, 0xFFFFFFE0
711710
case 0xe48548: // 48 85 e4 : test rsp, rsp
712711
case 0xe4854d: // 4d 85 e4 : test r12, r12
713712
case 0xe58948: // 48 89 e5 : mov rbp, rsp

0 commit comments

Comments
 (0)