[Mono-bugs] [Bug 330069] New: "fixed ()" expression causes NRE on null dereference

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Tue Oct 2 07:10:34 EDT 2007


https://bugzilla.novell.com/show_bug.cgi?id=330069

           Summary: "fixed ()" expression causes NRE on null dereference
           Product: Mono: Compilers
           Version: 1.2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: C#
        AssignedTo: rharinath at novell.com
        ReportedBy: stapostol at gmail.com
         QAContact: mono-bugs at ximian.com
          Found By: ---


The following code demonstrates the problem. It runs on .Net but fails on Mono
1.2.5 (both gmcs and mcs compiler).

using System;

namespace Bug  {
    unsafe class Demo  {
        static void Foo(int[] data)  {
            fixed (int* data_ptr = data)  { /* Do something */  }
        }
        public static void Main() {
            Foo(null);    // Passing null causes the NRE
        }
    }
}

This is a compiler, not runtime problem. This code compiled with csc.exe runs
on both .Net and Mono, while the same code compiled with mcs/gmcs fails on both
runtimes.


-- 
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.


More information about the mono-bugs mailing list