memset (&s, 0, sizeof (s));
+#if !(defined(__i386__) && defined(__clang__))
+ /* https://bugzilla.xamarin.com/show_bug.cgi?id=58901 */
g_assert (a == 42);
+#endif
return s;
}
#endif
}
+typedef struct {
+ char arr [4 * 1024];
+} LargeStruct;
+
+typedef int (STDCALL *LargeStructDelegate) (LargeStruct *s);
+
+static void
+call_managed_large_vt (gpointer arg)
+{
+ LargeStructDelegate del = (LargeStructDelegate)arg;
+ LargeStruct s;
+
+ call_managed_res = del (&s);
+}
+
+LIBTEST_API int STDCALL
+mono_test_marshal_thread_attach_large_vt (SimpleDelegate del)
+{
+#ifdef WIN32
+ return 43;
+#else
+ int res;
+ pthread_t t;
+
+ res = pthread_create (&t, NULL, (gpointer (*)(gpointer))call_managed_large_vt, del);
+ g_assert (res == 0);
+ pthread_join (t, NULL);
+
+ return call_managed_res;
+#endif
+}
+
typedef int (STDCALL *Callback) (void);
static Callback callback;
#ifndef WIN32
-typedef void (*NativeToManagedExceptionRethrowFunc) ();
+typedef void (*NativeToManagedExceptionRethrowFunc) (void);
void *mono_test_native_to_managed_exception_rethrow_thread (void *arg)
{