InjectFix icon indicating copy to clipboard operation
InjectFix copied to clipboard

打补丁到真机后虚拟机执行方法会报索引越界

Open MoguuKinoko opened this issue 4 years ago • 4 comments

IndexOutOfRangeException: Index was outside the bounds of the array. at IFix.Core.VirtualMachine.Execute (IFix.Core.Instruction* pc, IFix.Core.Value* argumentBase, System.Object[] managedStack, IFix.Core.Value* evaluationStackBase, System.Int32 argsCount, System.Int32 methodIndex, System.Int32 refCount, IFix.Core.Value** topWriteBack) [0x00000] in <00000000000000000000000000000000>:0 at IFix.Core.VirtualMachine.Execute (System.Int32 methodIndex, IFix.Core.Call& call, System.Int32 argsCount, System.Int32 refCount) [0x00000] in <00000000000000000000000000000000>:0 at IFix.ILFixDynamicMethodWrapper.__Gen_Wrap_603 (System.Object P0, System.Int32 P1, System.Object P2) [0x00000] in <00000000000000000000000000000000>:0

第一次遇到索引越界情况

MoguuKinoko avatar Aug 06 '21 08:08 MoguuKinoko

有重现的例子么?

chexiongsheng avatar Aug 07 '21 06:08 chexiongsheng

打完patch标签的函数执行报了

MoguuKinoko avatar Aug 11 '21 09:08 MoguuKinoko

很多人都打过patch标签执行都没报。那肯定是你代码有啥特殊的地方。

chexiongsheng avatar Aug 11 '21 10:08 chexiongsheng

我这边也遇到了。本来patch函数A,一切正常。后面patch了函数B,在函数B中跑到调用A的地方就报了索引越界。 代码看不出来什么特别的。以前也有类似的补丁方式,以前正常的。

linjiayun avatar Mar 26 '22 03:03 linjiayun