You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
ILCursor.EmitBr(Instruction) and other such methods produce infinite loops when instruction is ILCursor.Next #237
ILCursor.EmitBr and such methods which take Instruction as an argument will emit branch instructions that branch to themselves when the instruction passed as an argument equals ILCursor.Next
And this overload of MarkLabel has an undocumented dangerous feature (as seen by the existence of this bug report):
/// <summary>/// Create a new label targetting a specific instruction./// </summary>/// <param name="inst">The instruction to target</param>/// <returns>The created label</returns>publicILLabelMarkLabel(Instructioninst){varlabel=Context.DefineLabel();if(inst==Next)// <---- !!!!!!!!!!!!!{// !!! Description of method: // Set the target of a label to the current position (<c>label.Target = Next</c>) and moves after it.MarkLabel(label);returnlabel;}label.Target=inst;returnlabel;}
Additional thoughts:
Should this feature in the MarkLabel method even exist? Having the method do completely different things depending on some condition seems like a potential disaster. At least it needs to be documented.
Activity