[Mono-bugs] [Bug 30073][Nor] New - redim of an array with variable bound parameter fails

bugzilla-daemon@rocky.ximian.com bugzilla-daemon@rocky.ximian.com
9 Sep 2002 20:03:07 -0000


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 ernst.rohlicek@reflex.at.

http://bugzilla.ximian.com/show_bug.cgi?id=30073

--- shadow/30073	Mon Sep  9 16:03:07 2002
+++ shadow/30073.tmp.10362	Mon Sep  9 16:03:07 2002
@@ -0,0 +1,81 @@
+Bug#: 30073
+Product: Mono/Runtime
+Version: unspecified
+OS: 
+OS Details: windows xp pro, .net framework sdk + sp2, vbc 7.00.9466
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: misc
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: ernst.rohlicek@reflex.at               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: redim of an array with variable bound parameter fails
+
+Description of Problem:
+In an .exe compiled using MS's vbc, re-dimensionating of an array with a 
+variable parameter, which needs to be calculated first, fails.
+Example: redim thearray(30000 / a), where a is a number, eg. 100.
+
+Steps to reproduce the problem:
+1. Save below code in test.vb and compile (vbc test.vb).
+--- begin code ---
+imports system
+
+module mTest
+    sub main()
+        console.writeline("before redim")
+        dim a() as byte
+        dim b as integer = 100
+        redim a(30000 / b)
+        console.writeline("after redim")
+    end sub
+end module
+--- end code ---
+2. Do a test run (test.exe).
+3. Run using mono 0.15 precompiled win32 binaries from aug 28th (mono 
+test.exe).
+
+Actual Results:
+1. message box:
+ERROR: file emit-x86.c: line 728 (mono_label_cfg): should not be reached, 
+aborting.
+2. console messages:
+(process:1720): ** WARNING **: tree does not match in 00 .mTest:main (): 
+0x0026
+ (STIND_I4 ADDR_L[ESI|1] (NEWARR_SPEC (ADD_OVF (CONV_OVF_I4 (LDIND_R8 
+ADDR_L[4])
+) CONST_I4[1])))
+
+        (ARG_I4 CONST_I4[14585680])
+        (CALL_VOID (LDIND_I4 ADDR_G) VFUNC_ADDR)
+        (CALL_VOID (LDIND_I4 ADDR_G) VFUNC_ADDR)
+        (STIND_I4 ADDR_L[ESI|2] CONST_I4[100])
+        (STIND_R8 ADDR_L[3] (DIV CONST_R8 (CONV_R8 (LDIND_I4 ADDR_L
+[ESI|2]))))
+        (ARG_R8 (LDIND_R8 ADDR_L[3]))
+        (STIND_R8 ADDR_L[4] (CALL_R8 NOP ADDR_G))
+        (STIND_I4 ADDR_L[ESI|1] (NEWARR_SPEC (ADD_OVF (CONV_OVF_I4 
+(LDIND_R8 ADD
+R_L[4])) CONST_I4[1])))
+        (ARG_I4 CONST_I4[14585640])
+        (CALL_VOID (LDIND_I4 ADDR_G) VFUNC_ADDR)
+        (CALL_VOID (LDIND_I4 ADDR_G) VFUNC_ADDR)
+        RET_VOID
+
+This application has requested the Runtime to terminate it in an unusual 
+way.
+Please contact the application's support team for more information.
+
+Expected Results:
+nothing, except the two console.writeline's i have inserted.
+
+How often does this happen? 
+always.
+
+Additional Information:
+-