File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -2443,7 +2443,7 @@ void UnwindEspFrameEpilog(
24432443
24442444        //  We have already popped off the frame (excluding the callee-saved registers)
24452445
2446-         if  (epilogBase[0 ] == X86_INSTR_POP_ECX)
2446+         if  (epilogBase[offset ] == X86_INSTR_POP_ECX)
24472447        {
24482448            //  We may use "POP ecx" for doing "ADD ESP, 4",
24492449            //  or we may not (in the case of JMP epilogs)
@@ -2560,8 +2560,11 @@ void UnwindEbpDoubleAlignFrameEpilog(
25602560        {
25612561            //  do nothing before popping the callee-saved registers
25622562        }
2563-         else  if  (info->rawStkSize  == sizeof (void *))
2563+         else  if  (info->rawStkSize  == sizeof (void *) && epilogBase[offset] == X86_INSTR_POP_ECX )
25642564        {
2565+             //  We may use "POP ecx" for doing "ADD ESP, 4",
2566+             //  or we may not (in the case of JMP epilogs)
2567+ 
25652568            //  "pop ecx" will make ESP point to the callee-saved registers
25662569            if  (!InstructionAlreadyExecuted (offset, info->epilogOffs ))
25672570                ESP += sizeof (void *);
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments