[Mono-bugs] [Bug 53871][Nor] Changed - Invalid IL code on simple IL
bugzilla-daemon@bugzilla.ximian.com
bugzilla-daemon@bugzilla.ximian.com
Wed, 4 Feb 2004 16:19:39 -0500 (EST)
Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.
Changed by vargaz@freemail.hu.
http://bugzilla.ximian.com/show_bug.cgi?id=53871
--- shadow/53871 2004-02-04 11:10:53.000000000 -0500
+++ shadow/53871.tmp.16567 2004-02-04 16:19:39.000000000 -0500
@@ -1,14 +1,14 @@
Bug#: 53871
Product: Mono/Runtime
Version: unspecified
-OS:
+OS: unknown
OS Details:
-Status: NEW
-Resolution:
-Severity:
+Status: RESOLVED
+Resolution: INVALID
+Severity: Unknown
Priority: Normal
Component: misc
AssignedTo: mono-bugs@ximian.com
ReportedBy: equim@planetquake.com
QAContact: mono-bugs@ximian.com
TargetMilestone: ---
@@ -46,6 +46,25 @@
br L3
L1: br L2
L3: ret
}
}
+
+------- Additional Comments From vargaz@freemail.hu 2004-02-04 16:19 -------
+The example program is not valid IL, since the stack at L2 is not
+empty. The fact that the MS runtime and PEVerify accept this program
+is a bug in the MS implementation.
+
+According to the ECMA spac, Partition III, section 1.7.5:
+
+It must be possible, with a single forward-pass through the CIL
+instruction stream for any method, to infer the exact state of the
+evaluation stack at every instruction (where by “state” we mean the
+number and type of each item on the evaluation stack).
+In particular, if that single-pass analysis arrives at an instruction,
+call it location X, that immediately follows an unconditional branch,
+and where X is not the target of an earlier branch instruction, then
+the state of the evaluation stack at X, clearly, cannot be derived
+from existing information. In this case, the CLI demands that the
+evaluation stack at X be empty.
+