[Mono-bugs] [Bug 525326] New: can't encode value types: potential fix.

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Sun Jul 26 16:36:22 EDT 2009


http://bugzilla.novell.com/show_bug.cgi?id=525326


           Summary: can't encode value types: potential fix.
    Classification: Mono
           Product: Mono: Runtime
           Version: unspecified
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: misc
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: miguel at novell.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---


While running the Microsoft CLR tests, the test:

/Reflection/Emit/FieldBuilder/FieldBuilderSetConstant.exe

Causes a runtime crash because we do not support encoding value types.   The
following patch seems to fix the issue:

Index: metadata/reflection.c
===================================================================
--- metadata/reflection.c    (revision 138676)
+++ metadata/reflection.c    (working copy)
@@ -1719,8 +1719,9 @@
         if (val->vtable->klass->enumtype) {
             *ret_type = mono_class_enum_basetype (val->vtable->klass)->type;
             goto handle_enum;
-        } else
-            g_error ("we can't encode valuetypes");
+        }
+        len = val->vtable->klass->instance_size;
+        break;
     case MONO_TYPE_CLASS:
         break;
     case MONO_TYPE_STRING: {

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


More information about the mono-bugs mailing list