[Mono-bugs] [Bug 651940] New: Corrupt offset calculation of ble.s
bugzilla_noreply at novell.com
bugzilla_noreply at novell.com
Sun Nov 7 12:51:41 EST 2010
https://bugzilla.novell.com/show_bug.cgi?id=651940
https://bugzilla.novell.com/show_bug.cgi?id=651940#c0
Summary: Corrupt offset calculation of ble.s
Classification: Mono
Product: Mono: Class Libraries
Version: unspecified
Platform: PC
OS/Version: Windows 7
Status: NEW
Severity: Normal
Priority: P5 - None
Component: Cecil
AssignedTo: jbevain at novell.com
ReportedBy: philipp.paetzold at gmx.de
QAContact: mono-bugs at lists.ximian.com
Found By: ---
Blocker: ---
Description of Problem:
found in the latest tarbal 10-07-2010
Steps to reproduce the problem:
// inject leave method hooks before every "ret"
for (int instructionIdx = methodDefinition.Body.Instructions.Count - 1;
instructionIdx >= 0; instructionIdx--)
{
Instruction instruction =
methodDefinition.Body.Instructions[instructionIdx];
if (instruction.OpCode == OpCodes.Ret)
{
worker.InsertBefore(instruction, leaveMethodLoadNameInstruction);
worker.InsertAfter(instruction.Previous, callLeaveMethodInstruction);
}
}
Actual Results:
[UNMODIFIED IL CODE]
method private hidebysig instance void ToolStripMenuEdit_Opening(object
sender, class [mscorlib]System.EventArgs e) cil managed
{
.maxstack 2
.locals init (
[0] int32 num)
L_0000: ldarg.0
L_0001: ldfld class OptimatLogViewer.Controls.LogFileListView
OptimatLogViewer.MainForm::logFileListView
L_0006: callvirt instance class
[System.Windows.Forms]System.Windows.Forms.ListView/SelectedIndexCollection
[System.Windows.Forms]System.Windows.Forms.ListView::get_SelectedIndices()
L_000b: callvirt instance int32
[System.Windows.Forms]System.Windows.Forms.ListView/SelectedIndexCollection::get_Count()
L_0010: ldc.i4.0
L_0011: ble.s L_0078
L_0013: ldarg.0
L_0014: ldfld class OptimatLogViewer.Controls.LogFileListView
OptimatLogViewer.MainForm::logFileListView
L_0019: callvirt instance class
[System.Windows.Forms]System.Windows.Forms.ListView/SelectedIndexCollection
[System.Windows.Forms]System.Windows.Forms.ListView::get_SelectedIndices()
L_001e: callvirt instance int32
[System.Windows.Forms]System.Windows.Forms.ListView/SelectedIndexCollection::get_Count()
L_0023: ldc.i4.1
L_0024: ble.s L_0037
L_0026: ldarg.0
L_0027: ldfld class
[System.Windows.Forms]System.Windows.Forms.ToolStripMenuItem
OptimatLogViewer.MainForm::ToolStripMenuItemToggleBookmark
L_002c: ldstr "Lesezeichen \u00e4ndern"
L_0031: callvirt instance void
[System.Windows.Forms]System.Windows.Forms.ToolStripItem::set_Text(string)
L_0036: ret
L_0037: ldarg.0
L_0038: ldfld class OptimatLogViewer.Controls.LogFileListView
OptimatLogViewer.MainForm::logFileListView
L_003d: callvirt instance class
[System.Windows.Forms]System.Windows.Forms.ListView/SelectedIndexCollection
[System.Windows.Forms]System.Windows.Forms.ListView::get_SelectedIndices()
L_0042: ldc.i4.0
L_0043: callvirt instance int32
[System.Windows.Forms]System.Windows.Forms.ListView/SelectedIndexCollection::get_Item(int32)
L_0048: stloc.0
L_0049: ldarg.0
L_004a: ldfld class OptimatLogViewer.Controls.LogFileListView
OptimatLogViewer.MainForm::logFileListView
L_004f: ldloc.0
L_0050: callvirt instance bool
OptimatLogViewer.Controls.LogFileListView::IsBookmarked(int32)
L_0055: brfalse.s L_0068
L_0057: ldarg.0
L_0058: ldfld class
[System.Windows.Forms]System.Windows.Forms.ToolStripMenuItem
OptimatLogViewer.MainForm::ToolStripMenuItemToggleBookmark
L_005d: ldstr "Lesezeichen entfernen"
L_0062: callvirt instance void
[System.Windows.Forms]System.Windows.Forms.ToolStripItem::set_Text(string)
L_0067: ret
L_0068: ldarg.0
L_0069: ldfld class
[System.Windows.Forms]System.Windows.Forms.ToolStripMenuItem
OptimatLogViewer.MainForm::ToolStripMenuItemToggleBookmark
L_006e: ldstr "Lesezeichen hinzuf\u00fcgen"
L_0073: callvirt instance void
[System.Windows.Forms]System.Windows.Forms.ToolStripItem::set_Text(string)
L_0078: ret
}
[MODIFIED IL CODE]
method private hidebysig instance void ToolStripMenuEdit_Opening(object
sender, class [mscorlib]System.EventArgs e) cil managed
{
.maxstack 3
.locals init (
[0] int32 num)
L_0000: ldstr "System.Void
OptimatLogViewer.MainForm::ToolStripMenuEdit_Opening(System.Object,System.EventArgs)"
L_0005: call void [Profiler]Profiler.Profiler::EnterMethodHook(string)
L_000a: ldarg.0
L_000b: ldfld class OptimatLogViewer.Controls.LogFileListView
OptimatLogViewer.MainForm::logFileListView
L_0010: callvirt instance class
[System.Windows.Forms]System.Windows.Forms.ListView/SelectedIndexCollection
[System.Windows.Forms]System.Windows.Forms.ListView::get_SelectedIndices()
L_0015: callvirt instance int32
[System.Windows.Forms]System.Windows.Forms.ListView/SelectedIndexCollection::get_Count()
L_001a: ldc.i4.0
L_001b: ble.s L_ffffffa0
L_001d: ldarg.0
L_001e: ldfld class OptimatLogViewer.Controls.LogFileListView
OptimatLogViewer.MainForm::logFileListView
L_0023: callvirt instance class
[System.Windows.Forms]System.Windows.Forms.ListView/SelectedIndexCollection
[System.Windows.Forms]System.Windows.Forms.ListView::get_SelectedIndices()
L_0028: callvirt instance int32
[System.Windows.Forms]System.Windows.Forms.ListView/SelectedIndexCollection::get_Count()
L_002d: ldc.i4.1
L_002e: ble.s L_004b
L_0030: ldarg.0
L_0031: ldfld class
[System.Windows.Forms]System.Windows.Forms.ToolStripMenuItem
OptimatLogViewer.MainForm::ToolStripMenuItemToggleBookmark
L_0036: ldstr "Lesezeichen \u00e4ndern"
L_003b: callvirt instance void
[System.Windows.Forms]System.Windows.Forms.ToolStripItem::set_Text(string)
L_0040: ldstr "System.Void
OptimatLogViewer.MainForm::ToolStripMenuEdit_Opening(System.Object,System.EventArgs)"
L_0045: call void [Profiler]Profiler.Profiler::LeaveMethodHook(string)
L_004a: ret
L_004b: ldarg.0
L_004c: ldfld class OptimatLogViewer.Controls.LogFileListView
OptimatLogViewer.MainForm::logFileListView
L_0051: callvirt instance class
[System.Windows.Forms]System.Windows.Forms.ListView/SelectedIndexCollection
[System.Windows.Forms]System.Windows.Forms.ListView::get_SelectedIndices()
L_0056: ldc.i4.0
L_0057: callvirt instance int32
[System.Windows.Forms]System.Windows.Forms.ListView/SelectedIndexCollection::get_Item(int32)
L_005c: stloc.0
L_005d: ldarg.0
L_005e: ldfld class OptimatLogViewer.Controls.LogFileListView
OptimatLogViewer.MainForm::logFileListView
L_0063: ldloc.0
L_0064: callvirt instance bool
OptimatLogViewer.Controls.LogFileListView::IsBookmarked(int32)
L_0069: brfalse.s L_0086
L_006b: ldarg.0
L_006c: ldfld class
[System.Windows.Forms]System.Windows.Forms.ToolStripMenuItem
OptimatLogViewer.MainForm::ToolStripMenuItemToggleBookmark
L_0071: ldstr "Lesezeichen entfernen"
L_0076: callvirt instance void
[System.Windows.Forms]System.Windows.Forms.ToolStripItem::set_Text(string)
L_007b: ldstr "System.Void
OptimatLogViewer.MainForm::ToolStripMenuEdit_Opening(System.Object,System.EventArgs)"
L_0080: call void [Profiler]Profiler.Profiler::LeaveMethodHook(string)
L_0085: ret
L_0086: ldarg.0
L_0087: ldfld class
[System.Windows.Forms]System.Windows.Forms.ToolStripMenuItem
OptimatLogViewer.MainForm::ToolStripMenuItemToggleBookmark
L_008c: ldstr "Lesezeichen hinzuf\u00fcgen"
L_0091: callvirt instance void
[System.Windows.Forms]System.Windows.Forms.ToolStripItem::set_Text(string)
L_0096: ldstr "System.Void
OptimatLogViewer.MainForm::ToolStripMenuEdit_Opening(System.Object,System.EventArgs)"
L_009b: call void [Profiler]Profiler.Profiler::LeaveMethodHook(string)
L_00a0: ret
}
--
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
More information about the mono-bugs
mailing list