[Mono-dev] SIGSEGV - mono 1.1.13.4 - possible new bug

Jb Evain mono at evain.net
Wed May 3 03:25:08 EDT 2006


Hi Rafael,

On May 3, 2006, at 5:45 AM, Rafael Ferreira wrote:
> The testcase attached (bar.cs) consistently generates a SIGSEGV on my
> fedora core 5 box running mono 1.1.13.4 and 1.1.14 . The code attached
> is basically part of a util class that I use to dynamic set fields  
> in an
> object. If you guys think this is a new issue let me know and I'll  
> file
> a bug entry for it.

If you want your program to work, please apply this patch:

--- bar.cs      2006-05-03 09:16:55.000000000 +0200
+++ baz.cs      2006-05-03 09:16:07.000000000 +0200
@@ -18,7 +18,7 @@
                         p.SetValue(t, Convert.ChangeType 
(field_value.Trim(),p.FieldType ));
-                       Console.WriteLine(p.GetValue(null));
+                       Console.WriteLine(p.GetValue(t));
                         return;
                 }

Of course, the runtime should not crash like that when you try to  
dynamically set an instance field, and that you don't give any  
instance. Yes, please file a bug.

Thanks!

Jb




More information about the Mono-devel-list mailing list