Skip to content

Commit a943922

Browse files
authored
[win/asan] GetInstructionSize: Remove duplicate instruction FF 25 .... (#116894)
It appears already some lines above with this comment: "Cannot overwrite control-instruction. Return 0 to indicate failure.". Replacing just the comment in the first appearance. Found after creating the test in #113085.
1 parent aa9d368 commit a943922

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
@@ -635,7 +635,7 @@ static size_t GetInstructionSize(uptr address, size_t* rel_offset = nullptr) {
635635
return 2;
636636

637637
// Cannot overwrite control-instruction. Return 0 to indicate failure.
638-
case 0x25FF: // FF 25 XX XX XX XX : jmp [XXXXXXXX]
638+
case 0x25FF: // FF 25 XX YY ZZ WW : jmp dword ptr ds:[WWZZYYXX]
639639
return 0;
640640
}
641641

@@ -872,7 +872,6 @@ static size_t GetInstructionSize(uptr address, size_t* rel_offset = nullptr) {
872872
case 0x75FF: // FF 75 XX : push dword ptr [ebp + XX]
873873
return 3;
874874
case 0xC1F7: // F7 C1 XX YY ZZ WW : test ecx, WWZZYYXX
875-
case 0x25FF: // FF 25 XX YY ZZ WW : jmp dword ptr ds:[WWZZYYXX]
876875
return 6;
877876
case 0x3D83: // 83 3D XX YY ZZ WW TT : cmp TT, WWZZYYXX
878877
return 7;

0 commit comments

Comments
 (0)