[Mono-devel-list] [Patch] Marshalling patches
Jerome Laban
jlaban at wanadoo.fr
Fri May 2 12:28:36 EDT 2003
Hi there,
Here are some patches for the marshaling. I could not separate
them so I'll describe fixes here.
Patch for marshal.c:
- In emit_struct_conv, in case of the marshalling of
structure/class inheritance, the marshaling was only done on the upper
level class. Marshaling code is now emitted for lower levels too.
- In Marshal_IndexOf, the search for fields was only performed
on the upper level structure. Search is now done in all levels and
returns the correct exception in case of an invalid input.
Patch for class.c:
- In mono_marshal_load_type_info, the computed offsets and sizes
were not using parent layout, if any. Also, method was not setting the
correct size using the Size value in StructLayout attribute.
- In class_compute_field_layout :
* The blittable attribute was not set to the parent's
blittable state, if any.
* The class managed layout was also not using its parent
size and was using the Size value instead. This lead to leaving unused
memory at the begging of the allocation, and doubling the needed memory.
It was also generating incorrect marshalling code.
These fixes addresses the Bug #38983 and #42260.
I've also added a test suite for all this, and the patch for the
Makefile.am
Jerome.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: marshal.c-20030502.diff
Type: application/octet-stream
Size: 1913 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/mono-devel-list/attachments/20030502/4e8eea51/attachment.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: object.c-20030502.diff
Type: application/octet-stream
Size: 3370 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/mono-devel-list/attachments/20030502/4e8eea51/attachment-0001.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: marshal6.cs
Type: application/octet-stream
Size: 2290 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/mono-devel-list/attachments/20030502/4e8eea51/attachment-0002.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: makefile.am-20030502.diff
Type: application/octet-stream
Size: 447 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/mono-devel-list/attachments/20030502/4e8eea51/attachment-0003.obj
More information about the Mono-devel-list
mailing list