[Mono-devel-list] Segmentation fault in mono_class_from_name

Paolo Molaro lupus at ximian.com
Wed Jun 23 15:48:06 EDT 2004

On 06/23/04 Kamil Skalski wrote:
> I'm trying to hunt a bug in mono runtime, which appeared somewhere befero 
> Beta1 and lasts till now. I'm having a NullReference when opening Npgsql 
> connection, but my investigations show, that it is not Npgsql / System.Net 
> related problem, but some really internal runtime bug. 
> So what exactly is happening:
> GetHostByName_internal calls 
> 	return_value = hostent_to_IPHostEntry2(hp1, hp2, h_name, h_aliases,
> 					       h_addr_list);
> which calls
>        	family_hint = get_family_hint ();
> which calls
>     	socket_class = mono_class_from_name (system_assembly,
> 					     "System.Net.Sockets", "Socket");
> and inside mono_class_from_name, line
>        	nspace_table = g_hash_table_lookup (image->name_cache, name_space);
> fails with null reference.
> Probably there is some null key inside this name_cache hashtable... Note, that 
> this bug is triggered only in presence of Nemerle compiler, so it's probably 
> some System.Reflection.Emit realted issue.

Are you sure that image is non-NULL? What is image->ref_count if it's
not NULL?

> (With a little effort you can reproduce this bug installing Nemerle compiler, 
> where it is always reproducable)

Well, if you provided details on how to reproduce we could try...


lupus at debian.org                                     debian/rules
lupus at ximian.com                             Monkeys do it better

More information about the Mono-devel-list mailing list