[Mono-bugs] [Bug 46781][Maj] New - mint does not handle CEE_STOBJ correctly

bugzilla-daemon@rocky.ximian.com bugzilla-daemon@rocky.ximian.com
Wed, 23 Jul 2003 03:12:21 -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 l_m@pacbell.net.

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

--- shadow/46781	Wed Jul 23 03:12:20 2003
+++ shadow/46781.tmp.19676	Wed Jul 23 03:12:20 2003
@@ -0,0 +1,54 @@
+Bug#: 46781
+Product: Mono/Runtime
+Version: unspecified
+OS: All
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Major
+Component: misc
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: l_m@pacbell.net               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: mint does not handle CEE_STOBJ correctly
+
+Description of Problem:
+CEE_STOBJ is not handled correctly in the interpreter. It assumes that the 
+top of stack is an object reference when it could be other types.
+
+Steps to reproduce the problem:
+
+Run the following test case with mint
+
+using System;
+
+public class Test {
+
+    private static IntPtr i = IntPtr.Zero;
+
+    public static IntPtr nati {
+        get {
+            if (i == IntPtr.Zero) {
+                i = (IntPtr) 10001;
+            }
+            return i;
+        }
+    }
+
+    public static int Main() {
+        IntPtr[] nati = new IntPtr [1];
+        nati [0] = Test.nati;
+        Console.WriteLine ("nati [0] " + nati [0]);
+        return 0;
+    }
+}
+
+Actual Results:
+Segmentation fault
+
+Expected Results:
+nati [0] = 10001