Bug 320227 (MONO77442) - [GMCS] call to a generic method on null interface field causes SIGSEGV
Summary: [GMCS] call to a generic method on null interface field causes SIGSEGV
Status: RESOLVED FIXED
Alias: MONO77442
Product: Mono: Runtime
Classification: Mono
Component: misc (show other bugs)
Version: 1.1
Hardware: Other Other
: P3 - Medium : Minor
Target Milestone: ---
Assignee: Martin Baulig
QA Contact: Mono Bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-02-02 06:29 UTC by Atsushi Enomoto
Modified: 2007-09-15 21:24 UTC (History)
0 users

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Wiest 2007-09-15 19:47:02 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".