Bugzilla – Attachment 264850 Details for
Bug 465825
CCW crashes when marshalling arrays
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Forgot Password
[patch]
Proposed fix
ccw_array_fix.patch (text/plain), 1.27 KB, created by
Eberhard Beilharz
on 2009-01-13 20:01:00 UTC
(
hide
)
Description:
Proposed fix
Filename:
MIME Type:
Creator:
Eberhard Beilharz
Created:
2009-01-13 20:01:00 UTC
Size:
1.27 KB
patch
obsolete
>Index: mono/mono/metadata/marshal.c >=================================================================== >--- mono.orig/mono/metadata/marshal.c 2009-01-12 15:32:52.000000000 +0100 >+++ mono/mono/metadata/marshal.c 2009-01-13 15:07:28.000000000 +0100 >@@ -12043,13 +12043,33 @@ > m->csig = csig; > } > >+static void >+cominterop_fix_param_num(MonoMethodSignature *sig, MonoMarshalSpec **mspecs) >+{ >+ // Fix index of SizeParamIndex parameter. Because we pass a pointer to the interface as >+ // first parameter the offset of the parameter specified by SizeParamIndex is off by one. >+ int i; >+ >+ for (i = 1; i < sig->param_count; i ++) { >+ MonoType *t = sig->params [i]; >+ >+ switch (t->type) { >+ case MONO_TYPE_SZARRAY: >+ mspecs [i+1]->data.array_data.param_num++; >+ break; >+ default: >+ break; >+ } >+ } >+} >+ > /** > * cominterop_get_ccw: > * @object: a pointer to the object > * @itf: interface type needed > * > * Returns: a value indicating if the object is a >- * Runtime Callable Wrapper (RCW) for a COM object >+ * COM Callable Wrapper (CCW) for a COM object > */ > static gpointer > cominterop_get_ccw (MonoObject* object, MonoClass* itf) >@@ -12201,6 +12221,7 @@ > } > } > } >+ cominterop_fix_param_num(sig_adjusted, mspecs); > > /* first arg is IntPtr for interface */ > mspecs [1] = NULL;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
Actions:
View
|
Diff
Attachments on
bug 465825
:
264847
| 264850