Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions src/mono/mono/metadata/marshal-shared.c
Original file line number Diff line number Diff line change
Expand Up @@ -903,8 +903,14 @@ mono_marshal_shared_emit_struct_conv_full (MonoMethodBuilder *mb, MonoClass *kla
mono_mb_emit_stloc (mb, 1);
break;
}
case MONO_TYPE_OBJECT: {
char *msg = g_strdup_printf ("COM support was disabled at compilation time.");
case MONO_TYPE_OBJECT:
case MONO_TYPE_STRING:
case MONO_TYPE_CLASS:
case MONO_TYPE_SZARRAY:
case MONO_TYPE_ARRAY: {
char *msg = g_strdup_printf ("Type %s with field type %s cannot be marshaled as an unmanaged struct field.",
mono_type_full_name (m_class_get_byval_arg (klass)),
mono_type_full_name (ftype));
Comment on lines +911 to +913
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch — this is a real leak. However, all existing mono_type_full_name() call sites in this file have the same pattern (lines 778, 816, 866). Filed #125576 to track fixing all of them together rather than making this PR inconsistent with the rest of the file.

mono_marshal_shared_mb_emit_exception_marshal_directive (mb, msg);
break;
}
Expand Down
Loading