Imported Upstream version 4.8.0.520

Former-commit-id: b616177084b79e9a11491af6b1ad88f2f73a6093
This commit is contained in:
Xamarin Public Jenkins (auto-signing) 2017-03-15 10:36:24 +00:00
parent af08d800c3
commit dc50008e16
32 changed files with 143 additions and 821 deletions

View File

@ -28,797 +28,83 @@
namespace System.Reflection.Emit
{
public class TypeBuilder : Type
static class AssemblyBuilderExtensions
{
#region implemented abstract members of MemberInfo
public override bool IsDefined (Type attributeType, bool inherit)
public static void AddResourceFile (this AssemblyBuilder builder, params object[] args)
{
throw new NotSupportedException ();
}
public override object[] GetCustomAttributes (bool inherit)
public static ModuleBuilder DefineDynamicModule (this AssemblyBuilder builder, params object[] args)
{
throw new NotSupportedException ();
}
public override object[] GetCustomAttributes (Type attributeType, bool inherit)
public static void DefineVersionInfoResource (this AssemblyBuilder builder, params object[] args)
{
throw new NotSupportedException ();
}
public override string Name {
get {
throw new NotSupportedException ();
}
}
#endregion
#region implemented abstract members of Type
public override Type GetInterface (string name, bool ignoreCase)
public static void DefineUnmanagedResource (this AssemblyBuilder builder, params object[] args)
{
throw new NotSupportedException ();
}
public override Type[] GetInterfaces ()
public static void Save (this AssemblyBuilder builder, params object[] args)
{
throw new NotSupportedException ();
}
public override Type GetElementType ()
{
throw new NotSupportedException ();
}
public override EventInfo GetEvent (string name, BindingFlags bindingAttr)
{
throw new NotSupportedException ();
}
public override EventInfo[] GetEvents (BindingFlags bindingAttr)
{
throw new NotSupportedException ();
}
public override FieldInfo GetField (string name, BindingFlags bindingAttr)
{
throw new NotSupportedException ();
}
public override FieldInfo[] GetFields (BindingFlags bindingAttr)
{
throw new NotSupportedException ();
}
public override MemberInfo[] GetMembers (BindingFlags bindingAttr)
{
throw new NotSupportedException ();
}
protected override MethodInfo GetMethodImpl (string name, BindingFlags bindingAttr, Binder binder, CallingConventions callConvention, Type[] types, ParameterModifier[] modifiers)
{
throw new NotSupportedException ();
}
public override MethodInfo[] GetMethods (BindingFlags bindingAttr)
{
throw new NotSupportedException ();
}
public override Type GetNestedType (string name, BindingFlags bindingAttr)
{
throw new NotSupportedException ();
}
public override Type[] GetNestedTypes (BindingFlags bindingAttr)
{
throw new NotSupportedException ();
}
public override PropertyInfo[] GetProperties (BindingFlags bindingAttr)
{
throw new NotSupportedException ();
}
protected override PropertyInfo GetPropertyImpl (string name, BindingFlags bindingAttr, Binder binder, Type returnType, Type[] types, ParameterModifier[] modifiers)
{
throw new NotSupportedException ();
}
protected override ConstructorInfo GetConstructorImpl (BindingFlags bindingAttr, Binder binder, CallingConventions callConvention, Type[] types, ParameterModifier[] modifiers)
{
throw new NotSupportedException ();
}
protected override TypeAttributes GetAttributeFlagsImpl ()
{
throw new NotSupportedException ();
}
protected override bool HasElementTypeImpl ()
{
throw new NotSupportedException ();
}
protected override bool IsArrayImpl ()
{
throw new NotSupportedException ();
}
protected override bool IsByRefImpl ()
{
throw new NotSupportedException ();
}
protected override bool IsCOMObjectImpl ()
{
throw new NotSupportedException ();
}
protected override bool IsPointerImpl ()
{
throw new NotSupportedException ();
}
protected override bool IsPrimitiveImpl ()
{
throw new NotSupportedException ();
}
public override ConstructorInfo[] GetConstructors (BindingFlags bindingAttr)
{
throw new NotSupportedException ();
}
public override object InvokeMember (string name, BindingFlags invokeAttr, Binder binder, object target, object[] args, ParameterModifier[] modifiers, System.Globalization.CultureInfo culture, string[] namedParameters)
{
throw new NotSupportedException ();
}
public override Assembly Assembly {
get {
throw new NotSupportedException ();
}
}
public override string AssemblyQualifiedName {
get {
throw new NotSupportedException ();
}
}
public override Type BaseType {
get {
throw new NotSupportedException ();
}
}
public override string FullName {
get {
throw new NotSupportedException ();
}
}
public override Guid GUID {
get {
throw new NotSupportedException ();
}
}
public override Module Module {
get {
throw new NotSupportedException ();
}
}
public override string Namespace {
get {
throw new NotSupportedException ();
}
}
public override Type UnderlyingSystemType {
get {
throw new NotSupportedException ();
}
}
#endregion
public void AddInterfaceImplementation (Type interfaceType)
{
throw new NotSupportedException ();
}
public void AddDeclarativeSecurity (params object[] args)
{
throw new NotSupportedException ();
}
public void SetParent (object arg)
{
throw new NotSupportedException ();
}
public Type CreateType()
{
throw new NotSupportedException ();
}
public ConstructorBuilder DefineConstructor (params object[] args)
{
throw new NotSupportedException ();
}
public MethodBuilder DefineMethod (params object[] args)
{
throw new NotSupportedException ();
}
public TypeBuilder DefineNestedType (params object[] args)
{
throw new NotSupportedException ();
}
public PropertyBuilder DefineProperty (params object[] args)
{
throw new NotSupportedException ();
}
public EventBuilder DefineEvent (params object[] args)
{
throw new NotSupportedException ();
}
public FieldBuilder DefineField (params object[] args)
{
throw new NotSupportedException ();
}
public GenericTypeParameterBuilder[] DefineGenericParameters (params string[] names)
{
throw new NotSupportedException ();
}
public MethodBuilder DefineMethodOverride (params object[] args)
{
throw new NotSupportedException ();
}
public static ConstructorInfo GetConstructor (Type type, ConstructorInfo constructor)
{
throw new NotSupportedException ();
}
public static FieldInfo GetField (Type type, FieldInfo field)
{
throw new NotSupportedException ();
}
public static MethodInfo GetMethod (Type type, MethodInfo method)
{
throw new NotSupportedException ();
}
public void SetCustomAttribute (params object[] args)
public static void SetEntryPoint (this AssemblyBuilder builder, params object[] args)
{
throw new NotSupportedException ();
}
}
public class MethodBuilder : MethodBase
static class ConstructorBuilderExtensions
{
#region implemented abstract members of MemberInfo
public override bool IsDefined (Type attributeType, bool inherit)
public static void AddDeclarativeSecurity (this ConstructorBuilder builder, params object[] args)
{
throw new NotSupportedException ();
}
public override object[] GetCustomAttributes (bool inherit)
{
throw new NotSupportedException ();
}
public override object[] GetCustomAttributes (Type attributeType, bool inherit)
{
throw new NotSupportedException ();
}
public override Type DeclaringType {
get {
throw new NotSupportedException ();
}
}
public override MemberTypes MemberType {
get {
throw new NotSupportedException ();
}
}
public override string Name {
get {
throw new NotSupportedException ();
}
}
public override Type ReflectedType {
get {
throw new NotSupportedException ();
}
}
#endregion
#region implemented abstract members of MethodBase
public override MethodImplAttributes GetMethodImplementationFlags ()
{
throw new NotSupportedException ();
}
public override ParameterInfo[] GetParameters ()
{
throw new NotSupportedException ();
}
public override object Invoke (object obj, BindingFlags invokeAttr, Binder binder, object[] parameters, System.Globalization.CultureInfo culture)
{
throw new NotSupportedException ();
}
public override RuntimeMethodHandle MethodHandle {
get {
throw new NotSupportedException ();
}
}
public override MethodAttributes Attributes {
get {
throw new NotSupportedException ();
}
}
#endregion
public void AddDeclarativeSecurity (params object[] args)
{
throw new NotSupportedException ();
}
public ParameterBuilder DefineParameter (params object[] args)
{
throw new NotSupportedException ();
}
public GenericTypeParameterBuilder[] DefineGenericParameters (params string[] names)
{
throw new NotSupportedException ();
}
public MethodToken GetToken()
{
throw new NotSupportedException ();
}
public ILGenerator GetILGenerator ()
{
throw new NotSupportedException ();
}
public void SetCustomAttribute (params object[] args)
{
throw new NotSupportedException ();
}
public void SetImplementationFlags (MethodImplAttributes attributes)
{
throw new NotSupportedException ();
}
public void SetParameters (params Type[] parameterTypes)
{
throw new NotSupportedException ();
}
public void SetReturnType (object arg)
public static MethodToken GetToken (this ConstructorBuilder builder)
{
throw new NotSupportedException ();
}
}
public class AssemblyBuilder : Assembly
static class MethodBuilderExtensions
{
public void AddResourceFile (params object[] args)
public static void AddDeclarativeSecurity (this MethodBuilder builder, params object[] args)
{
throw new NotSupportedException ();
}
public void DefineVersionInfoResource (params object[] args)
{
throw new NotSupportedException ();
}
public ModuleBuilder DefineDynamicModule (params object[] args)
{
throw new NotSupportedException ();
}
public void DefineUnmanagedResource (params object[] args)
{
throw new NotSupportedException ();
}
public void Save (params object[] args)
{
throw new NotSupportedException ();
}
public void SetEntryPoint (params object[] args)
{
throw new NotSupportedException ();
}
public void SetCustomAttribute (params object[] args)
public static MethodToken GetToken (this MethodBuilder builder)
{
throw new NotSupportedException ();
}
}
public class ConstructorBuilder : MethodBase
static class ModuleBuilderExtensions
{
#region implemented abstract members of MemberInfo
public override bool IsDefined (Type attributeType, bool inherit)
{
throw new NotSupportedException ();
}
public override object[] GetCustomAttributes (bool inherit)
{
throw new NotSupportedException ();
}
public override object[] GetCustomAttributes (Type attributeType, bool inherit)
{
throw new NotSupportedException ();
}
public override Type DeclaringType {
get {
throw new NotSupportedException ();
}
}
public override MemberTypes MemberType {
get {
throw new NotSupportedException ();
}
}
public override string Name {
get {
throw new NotSupportedException ();
}
}
public override Type ReflectedType {
get {
throw new NotSupportedException ();
}
}
#endregion
#region implemented abstract members of MethodBase
public override MethodImplAttributes GetMethodImplementationFlags ()
{
throw new NotSupportedException ();
}
public override ParameterInfo[] GetParameters ()
{
throw new NotSupportedException ();
}
public override object Invoke (object obj, BindingFlags invokeAttr, Binder binder, object[] parameters, System.Globalization.CultureInfo culture)
{
throw new NotSupportedException ();
}
public override RuntimeMethodHandle MethodHandle {
get {
throw new NotSupportedException ();
}
}
public override MethodAttributes Attributes {
get {
throw new NotSupportedException ();
}
}
#endregion
public void AddDeclarativeSecurity (params object[] args)
{
throw new NotSupportedException ();
}
public ParameterBuilder DefineParameter (params object[] args)
{
throw new NotSupportedException ();
}
public MethodToken GetToken()
{
throw new NotSupportedException ();
}
public ILGenerator GetILGenerator ()
{
throw new NotSupportedException ();
}
public void SetCustomAttribute (params object[] args)
{
throw new NotSupportedException ();
}
public void SetImplementationFlags (MethodImplAttributes attributes)
{
throw new NotSupportedException ();
}
}
public class ModuleBuilder : Module
{
public void DefineManifestResource (params object[] args)
{
throw new NotSupportedException ();
}
public TypeBuilder DefineType (params object[] args)
{
throw new NotSupportedException ();
}
public MethodToken GetToken()
{
throw new NotSupportedException ();
}
public MethodInfo GetArrayMethod (params object[] args)
{
throw new NotSupportedException ();
}
public void SetCustomAttribute (params object[] args)
public static void DefineManifestResource (this ModuleBuilder builder, params object[] args)
{
throw new NotSupportedException ();
}
}
public class PropertyBuilder : PropertyInfo
static class TypeBuilderExtensions
{
#region implemented abstract members of MemberInfo
public override bool IsDefined (Type attributeType, bool inherit)
public static void AddDeclarativeSecurity (this TypeBuilder builder, params object[] args)
{
throw new NotSupportedException ();
}
public override object[] GetCustomAttributes (bool inherit)
{
throw new NotSupportedException ();
}
public override object[] GetCustomAttributes (Type attributeType, bool inherit)
{
throw new NotSupportedException ();
}
public override Type DeclaringType {
get {
throw new NotSupportedException ();
}
}
public override string Name {
get {
throw new NotSupportedException ();
}
}
public override Type ReflectedType {
get {
throw new NotSupportedException ();
}
}
#endregion
#region implemented abstract members of PropertyInfo
public override MethodInfo[] GetAccessors (bool nonPublic)
{
throw new NotSupportedException ();
}
public override MethodInfo GetGetMethod (bool nonPublic)
{
throw new NotSupportedException ();
}
public override ParameterInfo[] GetIndexParameters ()
{
throw new NotSupportedException ();
}
public override MethodInfo GetSetMethod (bool nonPublic)
{
throw new NotSupportedException ();
}
public override object GetValue (object obj, BindingFlags invokeAttr, Binder binder, object[] index, System.Globalization.CultureInfo culture)
{
throw new NotSupportedException ();
}
public override void SetValue (object obj, object value, BindingFlags invokeAttr, Binder binder, object[] index, System.Globalization.CultureInfo culture)
{
throw new NotSupportedException ();
}
public override PropertyAttributes Attributes {
get {
throw new NotSupportedException ();
}
}
public override bool CanRead {
get {
throw new NotSupportedException ();
}
}
public override bool CanWrite {
get {
throw new NotSupportedException ();
}
}
public override Type PropertyType {
get {
throw new NotSupportedException ();
}
}
#endregion
public MethodToken GetToken()
{
throw new NotSupportedException ();
}
public void SetGetMethod (object arg)
{
throw new NotSupportedException ();
}
public void SetSetMethod (object arg)
{
throw new NotSupportedException ();
}
public void SetCustomAttribute (params object[] args)
public static Type CreateType (this TypeBuilder builder)
{
throw new NotSupportedException ();
}
}
public class FieldBuilder : FieldInfo
{
#region implemented abstract members of MemberInfo
public override bool IsDefined (Type attributeType, bool inherit)
{
throw new NotSupportedException ();
}
public override object[] GetCustomAttributes (bool inherit)
{
throw new NotSupportedException ();
}
public override object[] GetCustomAttributes (Type attributeType, bool inherit)
{
throw new NotSupportedException ();
}
public override Type DeclaringType {
get {
throw new NotSupportedException ();
}
}
public override string Name {
get {
throw new NotSupportedException ();
}
}
public override Type ReflectedType {
get {
throw new NotSupportedException ();
}
}
#endregion
#region implemented abstract members of FieldInfo
public override object GetValue (object obj)
{
throw new NotSupportedException ();
}
public override void SetValue (object obj, object value, BindingFlags invokeAttr, Binder binder, System.Globalization.CultureInfo culture)
{
throw new NotSupportedException ();
}
public override FieldAttributes Attributes {
get {
throw new NotSupportedException ();
}
}
public override RuntimeFieldHandle FieldHandle {
get {
throw new NotSupportedException ();
}
}
public override Type FieldType {
get {
throw new NotSupportedException ();
}
}
#endregion
public void SetConstant (object arg)
{
throw new NotSupportedException ();
}
public void SetCustomAttribute (params object[] args)
{
throw new NotSupportedException ();
}
}
public class EventBuilder
{
public void SetAddOnMethod (MethodBuilder mdBuilder)
{
throw new NotSupportedException ();
}
public void SetRemoveOnMethod (MethodBuilder mdBuilder)
{
throw new NotSupportedException ();
}
public void SetCustomAttribute (params object[] args)
{
throw new NotSupportedException ();
}
}
}
}

View File

@ -221,7 +221,7 @@ namespace Mono.Data.Sqlite
case SQLiteDateFormats.UnixEpoch:
return ((long)(dateValue.Subtract(UnixEpoch).Ticks / TimeSpan.TicksPerSecond)).ToString();
default:
return dateValue.ToString(_datetimeFormats[5], CultureInfo.InvariantCulture);
return dateValue.ToString(_datetimeFormats[19], CultureInfo.InvariantCulture);
}
}

View File

@ -19,6 +19,7 @@ namespace MonoTests.System.Threading {
// this bucket is used to avoid non-theadlocal issues
class Bucket {
public int count;
public ManualResetEventSlim mre = new ManualResetEventSlim (false);
}
[SetUp]
@ -36,51 +37,22 @@ namespace MonoTests.System.Threading {
{
}
private void Callback2 (object foo)
{
Bucket b = foo as Bucket;
Interlocked.Increment (ref b.count);
b.mre.Set ();
}
[Test]
public void TestDueTime ()
{
Bucket bucket = new Bucket();
using (Timer t = new Timer (o => Callback (o), bucket, 200, Timeout.Infinite)) {
Thread.Sleep (50);
Assert.AreEqual (0, bucket.count, "#1");
Thread.Sleep (200);
Assert.AreEqual (1, bucket.count, "#2");
Thread.Sleep (500);
Assert.AreEqual (1, bucket.count, "#3");
t.Change (10, 10);
Thread.Sleep (1000);
Assert.IsTrue(bucket.count > 20, "#4");
}
}
[Test]
public void TestChange ()
{
Bucket bucket = new Bucket();
using (Timer t = new Timer (o => Callback (o), bucket, 10, 10)) {
Thread.Sleep (500);
int c = bucket.count;
Assert.IsTrue (c > 20, "#1 " + c.ToString ());
t.Change (100, 100);
c = bucket.count;
Thread.Sleep (500);
Assert.IsTrue (bucket.count <= c + 20, "#2 " + c.ToString ());
}
}
[Test]
public void TestZeroDueTime ()
{
Bucket bucket = new Bucket();
using (Timer t = new Timer (o => Callback (o), bucket, 0, Timeout.Infinite)) {
Thread.Sleep (100);
using (Timer t = new Timer (o => Callback2 (o), bucket, 200, Timeout.Infinite)) {
Assert.IsTrue (bucket.mre.Wait (5000), "#-1");
Assert.AreEqual (1, bucket.count, "#1");
t.Change (0, Timeout.Infinite);
Thread.Sleep (100);
Assert.AreEqual (2, bucket.count, "#2");
}
}
@ -89,15 +61,44 @@ namespace MonoTests.System.Threading {
{
Bucket bucket = new Bucket();
using (Timer t = new Timer (o => Callback (o), bucket, 10, 10)) {
Thread.Sleep (200);
using (Timer t = new Timer (o => Callback2 (o), bucket, 10, 10)) {
Assert.IsTrue (bucket.mre.Wait (5000), "#-1");
}
Thread.Sleep (20);
//If the callback is called after dispose, it will NRE and be reported
bucket.mre = null;
int c = bucket.count;
Assert.IsTrue (bucket.count > 5, "#1");
Thread.Sleep (200);
Assert.AreEqual (c, bucket.count, "#2");
Assert.IsTrue (c > 0, "#1");
}
[Test]
public void TestChange ()
{
Bucket bucket = new Bucket();
using (Timer t = new Timer (o => Callback2 (o), bucket, 10, 10)) {
Assert.IsTrue (bucket.mre.Wait (5000), "#-1");
int c = bucket.count;
Assert.IsTrue (c > 0, "#1 " + c);
t.Change (100000, 1000000);
c = bucket.count;
Thread.Sleep (500);
Assert.IsTrue (bucket.count <= c + 1, "#2 " + c);
}
}
[Test]
public void TestZeroDueTime ()
{
Bucket bucket = new Bucket();
using (Timer t = new Timer (o => Callback2 (o), bucket, 0, Timeout.Infinite)) {
Assert.IsTrue (bucket.mre.Wait (5000), "#-1");
bucket.mre.Reset ();
Assert.AreEqual (1, bucket.count, "#1");
t.Change (0, Timeout.Infinite);
Assert.IsTrue (bucket.mre.Wait (5000), "#1.5");
Assert.AreEqual (2, bucket.count, "#2");
}
}
[Test] // bug #320950

View File

@ -27,6 +27,7 @@
//
using System;
using System.Threading;
using System.Threading.Tasks;
using NUnit.Framework;
@ -57,7 +58,10 @@ namespace MonoTests.System {
[Test]
public void ReRegisterForFinalizeTest ()
{
Run_ReRegisterForFinalizeTest ();
var thread = new Thread (Run_ReRegisterForFinalizeTest);
thread.Start ();
thread.Join ();
var t = Task.Factory.StartNew (() => {
do {
GC.Collect ();

View File

@ -24,10 +24,11 @@ test-simple: simple.exe
mono --debug $(the_lib) --cross default simple.exe -o foo && ./foo
mono --debug $(the_lib) --sdk `dirname \`which mono\``/.. simple.exe -o foo && ./foo
-rm DEMO.zip
mono-package-runtime `dirname \`which mono\``/.. DEMO
$(topdir)/../scripts/mono-package-runtime `dirname \`which mono\``/.. DEMO
mkdir -p ~/.mono/targets/DEMO
unzip -d ~/.mono/targets/DEMO DEMO.zip
mono --debug $(the_lib) --cross DEMO simple.exe -o foo && ./foo
mono --debug $(the_lib) --cross DEMO simple.exe -o foo | grep "Assembly.*mscorlib.dll"
./foo
simple.exe: Makefile
echo 'class X { static void Main () { System.Console.WriteLine ("OK");}}' > simple.cs && mcs simple.cs

View File

@ -1082,14 +1082,14 @@ void mono_register_config_for_assembly (const char* assembly_name, cons
static void LoadLocalizedAssemblies (List<string> assemblies)
{
var other = i18n.Select (x => "I18N." + x + (x.Length > 0 ? "." : "") + "dll");
bool error = false;
string error = null;
foreach (string name in other) {
try {
Assembly a = LoadAssembly (name);
if (a == null) {
error = true;
error = "Failed to load " + name;
continue;
}
@ -1105,8 +1105,8 @@ void mono_register_config_for_assembly (const char* assembly_name, cons
}
}
if (error) {
Error ("Couldn't load one or more of the i18n assemblies.");
if (error != null) {
Error ("Couldn't load one or more of the i18n assemblies: " + error);
Environment.Exit (1);
}
}
@ -1114,6 +1114,7 @@ void mono_register_config_for_assembly (const char* assembly_name, cons
static readonly Universe universe = new Universe ();
static readonly Dictionary<string, string> loaded_assemblies = new Dictionary<string, string> ();
static readonly string resourcePathSeparator = (Path.DirectorySeparatorChar == '\\') ? $"\\{Path.DirectorySeparatorChar}" : $"{Path.DirectorySeparatorChar}";
public static string GetAssemblyName (string path)
{
@ -1126,7 +1127,7 @@ void mono_register_config_for_assembly (const char* assembly_name, cons
string dir = Path.GetDirectoryName (path);
int idx = dir.LastIndexOf (Path.DirectorySeparatorChar);
if (idx >= 0) {
name = dir.Substring (idx + 1) + Path.DirectorySeparatorChar + name;
name = dir.Substring (idx + 1) + resourcePathSeparator + name;
Console.WriteLine ($"Storing satellite assembly '{path}' with name '{name}'");
} else if (!quiet)
Console.WriteLine ($"Warning: satellite assembly {path} doesn't have locale path prefix, name conflicts possible");
@ -1158,7 +1159,7 @@ void mono_register_config_for_assembly (const char* assembly_name, cons
Assembly a = universe.LoadFile (path);
foreach (AssemblyName an in a.GetReferencedAssemblies ()) {
LoadAssembly (an.FullName);
a = universe.Load (an.FullName);
if (!QueueAssembly (files, a.CodeBase))
return false;
}
@ -1220,7 +1221,6 @@ void mono_register_config_for_assembly (const char* assembly_name, cons
static void Error (string msg, params object [] args)
{
Console.Error.WriteLine ("ERROR: {0}", string.Format (msg, args));
throw new Exception ();
Environment.Exit (1);
}

View File

@ -1970,7 +1970,7 @@ ves_icall_System_Reflection_Assembly_LoadFrom (MonoString *fname, MonoBoolean re
if (!is_ok (&error))
goto leave;
ass = mono_assembly_open_full (filename, &status, refOnly);
ass = mono_assembly_open_a_lot (filename, &status, refOnly, TRUE);
if (!ass) {
if (status == MONO_IMAGE_IMAGE_INVALID)

View File

@ -1 +1 @@
6319d6539ae88d35e1b1c3ac49c5be5c39e309a0
b304894d059baf706e16a1cf96e1fab367d91a79

View File

@ -10,4 +10,13 @@
MonoImage *
mono_find_image_owner (void *ptr);
MonoImage*
mono_image_load_file_for_image_checked (MonoImage *image, int fileidx, MonoError *error);
MonoImage*
mono_image_load_module_checked (MonoImage *image, int idx, MonoError *error);
MonoImage *
mono_image_open_a_lot (const char *fname, MonoImageOpenStatus *status, gboolean refonly, gboolean load_from_context);
#endif /* __MONO_METADATA_IMAGE_INTERNALS_H__ */

View File

@ -1188,9 +1188,13 @@ do_mono_image_load (MonoImage *image, MonoImageOpenStatus *status,
goto invalid_image;
if (!image->ref_only && is_problematic_image (image)) {
mono_trace (G_LOG_LEVEL_INFO, MONO_TRACE_ASSEMBLY, "Denying load of problematic image %s", image->name);
*status = MONO_IMAGE_IMAGE_INVALID;
goto invalid_image;
if (image->load_from_context) {
mono_trace (G_LOG_LEVEL_INFO, MONO_TRACE_ASSEMBLY, "Loading problematic image %s", image->name);
} else {
mono_trace (G_LOG_LEVEL_INFO, MONO_TRACE_ASSEMBLY, "Denying load of problematic image %s", image->name);
*status = MONO_IMAGE_IMAGE_INVALID;
goto invalid_image;
}
}
if (image->loader == &pe_loader && !image->metadata_only && !mono_verifier_verify_table_data (image, &errors))
@ -1220,7 +1224,7 @@ invalid_image:
static MonoImage *
do_mono_image_open (const char *fname, MonoImageOpenStatus *status,
gboolean care_about_cli, gboolean care_about_pecoff, gboolean refonly, gboolean metadata_only)
gboolean care_about_cli, gboolean care_about_pecoff, gboolean refonly, gboolean metadata_only, gboolean load_from_context)
{
MonoCLIImageInfo *iinfo;
MonoImage *image;
@ -1264,6 +1268,7 @@ do_mono_image_open (const char *fname, MonoImageOpenStatus *status,
image->name = mono_path_resolve_symlinks (fname);
image->ref_only = refonly;
image->metadata_only = metadata_only;
image->load_from_context = load_from_context;
image->ref_count = 1;
/* if MONO_SECURITY_MODE_CORE_CLR is set then determine if this image is platform code */
image->core_clr_platform_code = mono_security_core_clr_determine_platform_image (image);
@ -1460,6 +1465,12 @@ mono_image_open_from_module_handle (HMODULE module_handle, char* fname, gboolean
MonoImage *
mono_image_open_full (const char *fname, MonoImageOpenStatus *status, gboolean refonly)
{
return mono_image_open_a_lot (fname, status, refonly, FALSE);
}
MonoImage *
mono_image_open_a_lot (const char *fname, MonoImageOpenStatus *status, gboolean refonly, gboolean load_from_context)
{
MonoImage *image;
GHashTable *loaded_images = get_loaded_images_hash (refonly);
@ -1559,7 +1570,7 @@ mono_image_open_full (const char *fname, MonoImageOpenStatus *status, gboolean r
mono_images_unlock ();
// Image not loaded, load it now
image = do_mono_image_open (fname, status, TRUE, TRUE, refonly, FALSE);
image = do_mono_image_open (fname, status, TRUE, TRUE, refonly, FALSE, load_from_context);
if (image == NULL)
return NULL;
@ -1598,7 +1609,7 @@ mono_pe_file_open (const char *fname, MonoImageOpenStatus *status)
{
g_return_val_if_fail (fname != NULL, NULL);
return do_mono_image_open (fname, status, FALSE, TRUE, FALSE, FALSE);
return do_mono_image_open (fname, status, FALSE, TRUE, FALSE, FALSE, FALSE);
}
/**
@ -1615,7 +1626,7 @@ mono_image_open_raw (const char *fname, MonoImageOpenStatus *status)
{
g_return_val_if_fail (fname != NULL, NULL);
return do_mono_image_open (fname, status, FALSE, FALSE, FALSE, FALSE);
return do_mono_image_open (fname, status, FALSE, FALSE, FALSE, FALSE, FALSE);
}
/*
@ -1626,7 +1637,7 @@ mono_image_open_raw (const char *fname, MonoImageOpenStatus *status)
MonoImage *
mono_image_open_metadata_only (const char *fname, MonoImageOpenStatus *status)
{
return do_mono_image_open (fname, status, TRUE, TRUE, FALSE, TRUE);
return do_mono_image_open (fname, status, TRUE, TRUE, FALSE, TRUE, FALSE);
}
void

View File

@ -1 +1 @@
7b980453c593408f829e7098dc333ad5087a8865
aec93dfd6da7c7fdca217573f4c4110135f3d6e6

View File

@ -330,7 +330,7 @@ MonoMethodSignature*
mono_marshal_get_string_ctor_signature (MonoMethod *method);
MonoMethod *
mono_marshal_get_managed_wrapper (MonoMethod *method, MonoClass *delegate_klass, uint32_t this_loc);
mono_marshal_get_managed_wrapper (MonoMethod *method, MonoClass *delegate_klass, uint32_t this_loc, MonoError *exernal_error);
gpointer
mono_marshal_get_vtfixup_ftnptr (MonoImage *image, guint32 token, guint16 type);

View File

@ -210,6 +210,9 @@ struct _MonoImage {
/* Whenever this image contains metadata only without PE data */
guint8 metadata_only : 1;
/* Whether this image belongs to load-from context */
guint8 load_from_context: 1;
guint8 checked_module_cctor : 1;
guint8 has_module_cctor : 1;
@ -913,5 +916,8 @@ mono_find_image_set_owner (void *ptr);
void
mono_loader_register_module (const char *name, MonoDl *module);
MonoAssembly *
mono_assembly_open_a_lot (const char *filename, MonoImageOpenStatus *status, gboolean refonly, gboolean load_from_context);
#endif /* __MONO_METADATA_INTERNALS_H__ */

View File

@ -1041,7 +1041,7 @@ create_allocator (int atype, ManagedAllocatorVariant variant)
{
int p_var, size_var, thread_var G_GNUC_UNUSED;
gboolean slowpath = variant == MANAGED_ALLOCATOR_SLOW_PATH;
guint32 slowpath_branch, max_size_branch;
guint32 slowpath_branch, max_size_branch, no_oom_branch;
MonoMethodBuilder *mb;
MonoMethod *res;
MonoMethodSignature *csig;
@ -1330,6 +1330,13 @@ create_allocator (int atype, ManagedAllocatorVariant variant)
} else {
g_assert_not_reached ();
}
/* if (ret == NULL) throw OOM; */
mono_mb_emit_byte (mb, CEE_DUP);
no_oom_branch = mono_mb_emit_branch (mb, CEE_BRTRUE);
mono_mb_emit_exception (mb, "OutOfMemoryException", NULL);
mono_mb_patch_branch (mb, no_oom_branch);
mono_mb_emit_byte (mb, CEE_RET);
/* Fastpath */

View File

@ -117,7 +117,7 @@ restart_threads_until_none_in_managed_allocator (void)
if (info->client_info.skip || info->client_info.gc_disabled || info->client_info.suspend_done)
continue;
if (mono_thread_info_is_live (info) &&
(!info->client_info.stack_start || info->client_info.in_critical_region || info->client_info.info.inside_critical_region ||
(info->client_info.in_critical_region || info->client_info.info.inside_critical_region ||
is_ip_in_managed_allocator (info->client_info.stopped_domain, info->client_info.stopped_ip))) {
binary_protocol_thread_restart ((gpointer)mono_thread_info_get_tid (info));
SGEN_LOG (3, "thread %p resumed.", (void*) (size_t) info->client_info.info.native_handle);

View File

@ -861,7 +861,7 @@ EXTRA_DIST = TestDriver.cs \
Makefile.am.in
version.h: Makefile
echo "#define FULL_VERSION \"Stable 4.8.0.495/e4a3cf3\"" > version.h
echo "#define FULL_VERSION \"Stable 4.8.0.520/8f6d0f6\"" > version.h
# Utility target for patching libtool to speed up linking
patch-libtool:

View File

@ -861,7 +861,7 @@ EXTRA_DIST = TestDriver.cs \
Makefile.am.in
version.h: Makefile
echo "#define FULL_VERSION \"Stable 4.8.0.495/e4a3cf3\"" > version.h
echo "#define FULL_VERSION \"Stable 4.8.0.520/8f6d0f6\"" > version.h
# Utility target for patching libtool to speed up linking
patch-libtool:

View File

@ -1 +1 @@
1d2d50a79752da03d88b373dcfa4536e767c289d
0dc0111f92ce7928cc8fae909326c9c778d14418

View File

@ -1 +1 @@
c4f44c2ecbc5dc6f0532c59ad55c2f46f1ed7f73
12111cac30226110a818b7d30ed37495129ceefa

View File

@ -1 +1 @@
2fd57cf8561234d38c90801e15fa271c5a719a82
c9cf297db00016d19274c670f130a224b78f28e0

View File

@ -382,14 +382,14 @@ mono_unwind_ops_encode_full (GSList *unwind_ops, guint32 *out_len, gboolean enab
/* Emit an advance_loc if neccesary */
while (op->when > loc) {
if (op->when - loc > 65536) {
if (op->when - loc >= 65536) {
*p ++ = DW_CFA_advance_loc4;
guint32 v = (guint32)(op->when - loc);
memcpy (p, &v, 4);
g_assert (read32 (p) == (guint32)(op->when - loc));
p += 4;
loc = op->when;
} else if (op->when - loc > 256) {
} else if (op->when - loc >= 256) {
*p ++ = DW_CFA_advance_loc2;
guint16 v = (guint16)(op->when - loc);
memcpy (p, &v, 2);

View File

@ -1 +1 @@
#define FULL_VERSION "Stable 4.8.0.495/e4a3cf3"
#define FULL_VERSION "Stable 4.8.0.520/8f6d0f6"

View File

@ -1,4 +1 @@
es
ja
de
pt_BR
es ja de pt_BR

Binary file not shown.

View File

@ -1 +1 @@
24891e68bb877147f45264905411a3d29b9697a2
24b8d7013337ff47aac017d32f2a8894282ecf16

Binary file not shown.

View File

@ -1 +1 @@
9a0004e54942d65f96b8db4923ab25ae00b98111
5b0191f6046441a044d9c113716369b913a1ca05

Binary file not shown.

View File

@ -1 +1 @@
23ce3caec9ef14b46dd2699cb25dc0b6ba1e24b2
fe426ecab7608b26c99f42691e81fc635addb99f

View File

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: mono 4.8.0\n"
"Report-Msgid-Bugs-To: http://www.mono-project.com/Bugs\n"
"POT-Creation-Date: 2017-02-22 17:10+0000\n"
"POT-Creation-Date: 2017-03-15 10:16+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"

Binary file not shown.

View File

@ -1 +1 @@
d89d14404907c8feee684d37888501a226d846e8
9f431fd588278451bee3612d0d6090248da2a85f