[Mono-bugs] [Bug 61801][Wis] New - Incorrect exception ordering with stelem
bugzilla-daemon@bugzilla.ximian.com
bugzilla-daemon@bugzilla.ximian.com
Wed, 21 Jul 2004 16:22:53 -0400 (EDT)
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 bmaurer@users.sf.net.
http://bugzilla.ximian.com/show_bug.cgi?id=61801
--- shadow/61801 2004-07-21 16:22:53.000000000 -0400
+++ shadow/61801.tmp.26838 2004-07-21 16:22:53.000000000 -0400
@@ -0,0 +1,36 @@
+Bug#: 61801
+Product: Mono: Runtime
+Version: unspecified
+OS:
+OS Details:
+Status: NEW
+Resolution:
+Severity:
+Priority: Wishlist
+Component: misc
+AssignedTo: mono-bugs@ximian.com
+ReportedBy: bmaurer@users.sf.net
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: Incorrect exception ordering with stelem
+
+Consider this code:
+
+class T {
+ static void Main () {
+ int [] x = new int [1];
+ x [5] = x [0] / 0;
+ }
+}
+
+we throw a index out of range exception, while MS gives an div by zero
+exception. The issue is the order in which burg statements are emitted.
+
+The ir for this method looks like:
+
+ (stind.i4 (ldelema (ldind.ref regvar[%edi]) iconst[5]) (div (ldind.i4
+(ldelema (ldind.ref regvar[%edi]) iconst[0])) iconst[0]))
+
+we emit the LHS of stind before the RHS is emitted.