Skip to content

Commit eade364

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

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

compiler-rt/lib/interception/interception_win.cpp

Lines changed: 1 addition & 3 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 0xEC83: // 83 EC XX : sub esp, XX
571572
case 0xC1F6: // F6 C1 XX : test cl, XX
572573
return 3;
573574

@@ -578,8 +579,6 @@ static size_t GetInstructionSize(uptr address, size_t* rel_offset = nullptr) {
578579

579580
switch (0x00FFFFFF & *(u32*)address) {
580581
case 0xF8E483: // 83 E4 F8 : and esp, 0xFFFFFFF8
581-
case 0x64EC83: // 83 EC 64 : sub esp, 64h
582-
return 3;
583582
case 0x24A48D: // 8D A4 24 XX XX XX XX : lea esp, [esp + XX XX XX XX]
584583
return 7;
585584
}
@@ -800,7 +799,6 @@ static size_t GetInstructionSize(uptr address, size_t* rel_offset = nullptr) {
800799
case 0x5D8B: // 8B 5D XX : mov ebx, dword ptr [ebp + XX]
801800
case 0x7D8B: // 8B 7D XX : mov edi, dword ptr [ebp + XX]
802801
case 0x758B: // 8B 75 XX : mov esi, dword ptr [ebp + XX]
803-
case 0xEC83: // 83 EC XX : sub esp, XX
804802
case 0x75FF: // FF 75 XX : push dword ptr [ebp + XX]
805803
return 3;
806804
case 0xC1F7: // F7 C1 XX YY ZZ WW : test ecx, WWZZYYXX

0 commit comments

Comments
 (0)