Bugzilla – Bug 324950
[PPC] byte array + shift operation (+ foreach) causes NullReferenceException
Last modified: 2007-09-15 21:24:46 UTC
---- Reported by atsushi@ximian.com 2007-08-01 14:47:28 MST ---- (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]); ---- Additional Comments From lupus@ximian.com 2007-08-02 12:03:11 MST ---- Fixed in svn, thanks!