Imported Upstream version 5.0.0.94

Former-commit-id: 09772966aff74491c7b98b6eda49852cfc4aa874
This commit is contained in:
Xamarin Public Jenkins (auto-signing)
2017-05-03 16:24:32 +00:00
parent 5c980d35e6
commit 67a5eefa39
30 changed files with 191 additions and 38 deletions

View File

@@ -137,5 +137,8 @@ mono_dynimage_save_encode_marshal_blob (MonoDynamicImage *assembly, MonoReflecti
guint32
mono_dynimage_save_encode_property_signature (MonoDynamicImage *assembly, MonoReflectionPropertyBuilder *fb, MonoError *error);
guint32
mono_image_get_methodref_token (MonoDynamicImage *assembly, MonoMethod *method, gboolean create_typespec);
#endif /* __MONO_METADATA_SRE_INTERNALS_H__ */

View File

@@ -1 +1 @@
20d9e47a4a3945453e3fdd0d96653f273a3722c2
f430028e861594daad59c28c417cdc6ecc937005

View File

@@ -1 +1 @@
276dd704cf9028688997bee53c1446b26dacbe41
7811483ae97cbb92b3dd2d062ba511dee9a0248c

View File

@@ -878,7 +878,7 @@ EXTRA_DIST = TestDriver.cs \
Makefile.am.in
version.h: Makefile
echo "#define FULL_VERSION \"Stable 5.0.0.78/ba317ed\"" > version.h
echo "#define FULL_VERSION \"Stable 5.0.0.94/1d0445b\"" > version.h
# Utility target for patching libtool to speed up linking
patch-libtool:

View File

@@ -878,7 +878,7 @@ EXTRA_DIST = TestDriver.cs \
Makefile.am.in
version.h: Makefile
echo "#define FULL_VERSION \"Stable 5.0.0.78/ba317ed\"" > version.h
echo "#define FULL_VERSION \"Stable 5.0.0.94/1d0445b\"" > version.h
# Utility target for patching libtool to speed up linking
patch-libtool:

View File

@@ -1 +1 @@
43f05751d1510288b0377dca9681ef0ce35220e4
c56a1bc4df9e6127aab55d56ef2a1e6f03caccc9

View File

@@ -887,11 +887,16 @@ mono_class_static_field_address (MonoDomain *domain, MonoClassField *field)
//printf ("SFLDA1 %p\n", (char*)vtable->data + field->offset);
if (domain->special_static_fields && (addr = g_hash_table_lookup (domain->special_static_fields, field)))
if (field->offset == -1) {
/* Special static */
g_assert (domain->special_static_fields);
mono_domain_lock (domain);
addr = g_hash_table_lookup (domain->special_static_fields, field);
mono_domain_unlock (domain);
addr = mono_get_special_static_data (GPOINTER_TO_UINT (addr));
else
} else {
addr = (char*)mono_vtable_get_static_field_data (vtable) + field->offset;
}
return addr;
}

View File

@@ -1 +1 @@
58964502b7fcbb47b0a892f7fc74319537b605ff
341b4b589b8237f2ce8bae1faf0d58cf3c93ae3c

View File

@@ -1 +1 @@
#define FULL_VERSION "Stable 5.0.0.78/ba317ed"
#define FULL_VERSION "Stable 5.0.0.94/1d0445b"

View File

@@ -320,6 +320,7 @@ BASE_TEST_CS_SRC= \
generic-static-methods.2.cs \
generic-null-call.2.cs \
generic-special.2.cs \
generic-special2.2.cs \
generic-exceptions.2.cs \
generic-virtual2.2.cs \
generic-valuetype-interface.2.cs \
@@ -1645,6 +1646,7 @@ GSHARED_TESTS_SRC = \
generic-tailcall2.2.cs \
generic-array-exc.2.cs \
generic-special.2.cs \
generic-special2.2.cs \
generic-exceptions.2.cs \
generic-delegate2.2.cs \
generic-virtual2.2.cs \

View File

@@ -820,6 +820,7 @@ BASE_TEST_CS_SRC = \
generic-static-methods.2.cs \
generic-null-call.2.cs \
generic-special.2.cs \
generic-special2.2.cs \
generic-exceptions.2.cs \
generic-virtual2.2.cs \
generic-valuetype-interface.2.cs \
@@ -1358,6 +1359,7 @@ GSHARED_TESTS_SRC = \
generic-tailcall2.2.cs \
generic-array-exc.2.cs \
generic-special.2.cs \
generic-special2.2.cs \
generic-exceptions.2.cs \
generic-delegate2.2.cs \
generic-virtual2.2.cs \

View File

@@ -0,0 +1,54 @@
using System;
using System.Reflection;
using System.IO;
using System.Collections.Generic;
using System.Threading;
internal class GenericType<T> {
[ThreadStatic]
internal static object static_var;
public static void AccessStaticVar ()
{
if (static_var != null && static_var.GetType () != typeof (List<T>))
throw new Exception ("Corrupted static var");
GenericType<T>.static_var = new List<T> ();
}
}
public static class Program {
private static bool stress;
/* Create a lot of static vars */
private static void CreateVTables ()
{
Type[] nullArgs = new Type[0];
Assembly ass = Assembly.GetAssembly (typeof (int));
foreach (Type type in ass.GetTypes ()) {
try {
Type inst = typeof (GenericType<>).MakeGenericType (type);
Activator.CreateInstance (inst);
} catch {
}
}
}
private static void StressStaticFieldAddr ()
{
while (stress) {
GenericType<object>.AccessStaticVar ();
}
}
public static void Main (string[] args)
{
Thread thread = new Thread (StressStaticFieldAddr);
stress = true;
thread.Start ();
CreateVTables ();
stress = false;
thread.Join ();
}
}