Skip to content

Commit

Permalink
[win/asan] GetInstructionSize: Remove duplicate instruction `FF 25 ..…
Browse files Browse the repository at this point in the history
….`. (llvm#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 llvm#113085.
  • Loading branch information
bernhardu authored and TIFitis committed Dec 8, 2024
1 parent f1a9692 commit a8daa58
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions compiler-rt/lib/interception/interception_win.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -635,7 +635,7 @@ static size_t GetInstructionSize(uptr address, size_t* rel_offset = nullptr) {
return 2;

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

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

0 comments on commit a8daa58

Please sign in to comment.