[Mono-bugs] [Bug 82281][Nor] New - [PPC] byte array + shift	operation (+ foreach) causes NullReferenceException
    bugzilla-daemon at bugzilla.ximian.com 
    bugzilla-daemon at bugzilla.ximian.com
       
    Wed Aug  1 14:47:29 EDT 2007
    
    
  
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 atsushi at ximian.com.
http://bugzilla.ximian.com/show_bug.cgi?id=82281
--- shadow/82281	2007-08-01 14:47:29.000000000 -0400
+++ shadow/82281.tmp.4436	2007-08-01 14:47:29.000000000 -0400
@@ -0,0 +1,43 @@
+Bug#: 82281
+Product: Mono: Runtime
+Version: 1.0
+OS: GNU/Linux [Other]
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: JIT
+AssignedTo: lupus at ximian.com                            
+ReportedBy: atsushi at ximian.com               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Summary: [PPC] byte array + shift operation (+ foreach) causes NullReferenceException
+
+(Forwarding a report wrt some weird NRE by Kazuki.)
+
+Arch/Platform:
+iMac G5 + gentoo + mono(trunk)
+
+Code:
+
+static void Main ()
+{
+    uint temp = 0;
+    byte[] data = new byte[256];
+    for (int i = 0; i < 1; i ++) // *1
+        temp = (uint)(data[temp >> 24] | data[temp >> 0]); // *2
+}
+
+Actual Result:
+
+Unhandled Exception: System.NullReferenceException: Object reference not
+set to an instance of an object
+  at test.Main () [0x00000] 
+
+Additional Notes:
+
+This does not happen when *1 is removed, or *2 is replaced with:
+
+        temp = (uint)(data[temp >> 0] | data[temp >> 24]);
    
    
More information about the mono-bugs
mailing list