Bugzilla – Bug 320227
[GMCS] call to a generic method on null interface field causes SIGSEGV
Last modified: 2007-09-15 21:24:46 UTC
---- Reported by atsushi@ximian.com 2006-02-01 23:29:32 MST ---- The runtime causes SIGSEGV when call to a generic method on a field happens, where the type of the field is an interface. It should report NullReferenceException. ---- repro ---- using System; interface ITest { void Foo<T> (); void Bar (); } class Test : ITest { public void Foo<T> () {} public void Bar () {} //Test test; // this is OK ITest test; public static void Main () { //new Test ().test.Bar (); // this is OK new Test ().test.Foo<int> (); } } Actual Results: ================================================================= Got a SIGSEGV while executing native code. This usually indicates a fatal error in the mono runtime or one of the native libraries used by your application. ================================================================= Stacktrace: in (wrapper managed-to-native) System.Object:__icall_wrapper_compile_generic_met hod (object,intptr,intptr) <0x4> in (wrapper managed-to-native) System.Object:__icall_wrapper_compile_generic_met hod (object,intptr,intptr) <0x8d> in Test:Main () <0x2d> in (wrapper runtime-invoke) System.Object:runtime_invoke_void (object,intptr,int ptr,intptr) <0x6df149e7> Expected Results: NullReferenceException in managed area should happen. How often does this happen? consistently. Additional Information: This is a runtime problem (as the same code normally result in NRE in another runtime, and the same binary from another compiler result in the same on mono). ---- Additional Comments From vargaz@gmail.com 2006-02-03 08:32:57 MST ---- Fixed in SVN and 1.1.13. Unknown operating system unknown. Setting to default OS "Other".