[compiler-rt] a943922 - [win/asan] GetInstructionSize: Remove duplicate instruction `FF 25 ...`. (#116894)

via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 29 00:17:43 PST 2024


Author: bernhardu
Date: 2024-11-29T09:17:37+01:00
New Revision: a943922c0de52efb78e84e08dbc5d74f428b2377

URL: https://github.com/llvm/llvm-project/commit/a943922c0de52efb78e84e08dbc5d74f428b2377
DIFF: https://github.com/llvm/llvm-project/commit/a943922c0de52efb78e84e08dbc5d74f428b2377.diff

LOG: [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.

Added: 
    

Modified: 
    compiler-rt/lib/interception/interception_win.cpp

Removed: 
    


################################################################################
diff  --git a/compiler-rt/lib/interception/interception_win.cpp b/compiler-rt/lib/interception/interception_win.cpp
index 8767d8e79881c2..dc3018a675dee2 100644
--- a/compiler-rt/lib/interception/interception_win.cpp
+++ b/compiler-rt/lib/interception/interception_win.cpp
@@ -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;
   }
 
@@ -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;


        


More information about the llvm-commits mailing list