Merge branch 'upstream'
Former-commit-id: ddafb75389c533677f5c1e689f72a39da93bc968
This commit is contained in:
commit
c83fe191ad
@ -1 +1 @@
|
||||
ac3c1fec80751ac6a5cc40288f081a109fea4933
|
||||
cfd298f0214dbe147b607ec867f5a0700ae52f03
|
@ -1 +1 @@
|
||||
7f99d462698fe5c7678472257969149675e4f373
|
||||
f9f812ae034d2087f5a64846fa6446d74bc9f020
|
@ -34,7 +34,7 @@ static class Consts
|
||||
// Use these assembly version constants to make code more maintainable.
|
||||
//
|
||||
|
||||
public const string MonoVersion = "4.6.0.0";
|
||||
public const string MonoVersion = "4.6.1.0";
|
||||
public const string MonoCompany = "Mono development team";
|
||||
public const string MonoProduct = "Mono Common Language Infrastructure";
|
||||
public const string MonoCopyright = "(c) Various Mono authors";
|
||||
|
@ -107,6 +107,7 @@ xammac_4_5_dirs := \
|
||||
System.ServiceModel.Internals \
|
||||
SMDiagnostics \
|
||||
System.Numerics \
|
||||
System.Numerics.Vectors \
|
||||
Mono.Data.Tds \
|
||||
System.Transactions \
|
||||
System.EnterpriseServices \
|
||||
|
@ -1 +1 @@
|
||||
3dd17d0c16ba42ad68b52821e4491c8eafe06c04
|
||||
999ca900d5443337a86927d0d2ef2add4422f2b4
|
@ -1 +1 @@
|
||||
f4586a253f8ce09c2b2178d6f5e08ad53b55445a
|
||||
7d024238d081e85b535a28cb160e824d94975df7
|
@ -1 +1 @@
|
||||
ad3993fd19839b18ea25f5027adfba1808a9b38e
|
||||
c083b93e7b6150b680d32a820f3b88c682ddf789
|
@ -1 +1 @@
|
||||
1273821e71f05ca43fbda455ebe7d4c747213ee3
|
||||
08ca578f5d7e96ee914dfbdbf084f73f3e8909b0
|
@ -1 +1 @@
|
||||
a03412e4144d551461b4f8b21d25f3258a2ec5f1
|
||||
619913794ad60026c6830bab6dbfd0527c03dcb3
|
@ -1 +1 @@
|
||||
013e06f897446058c505edc676ba7cf78939b671
|
||||
931b6d3637a95ae8cd8c492c6fa7126cffa90444
|
@ -1 +1 @@
|
||||
c3bbfb8e3d0bb1d4648a456800a8f616d8a28016
|
||||
e1e9686ed7784f6a16ea693a569012bf15888449
|
@ -1 +1 @@
|
||||
8410f10f87dea9524681b3f688dab2f70afbf9b5
|
||||
9b7e5806ba59d76556574f901304d48e15f9520f
|
@ -1 +1 @@
|
||||
d2b12594e92c61982d88980ec4bfaeb7c3bdf9ab
|
||||
48c23282983ab1e14ac9a68999ba56373af61c8d
|
@ -109,7 +109,6 @@ namespace Mono.CSharp
|
||||
var imported = MemberDefinition as ImportedTypeDefinition;
|
||||
if (imported != null && Kind != MemberKind.MissingType)
|
||||
imported.DefineInterfaces (this);
|
||||
|
||||
}
|
||||
|
||||
return ifaces;
|
||||
@ -1603,6 +1602,12 @@ namespace Mono.CSharp
|
||||
|
||||
public TypeSpec Element { get; private set; }
|
||||
|
||||
public override IList<TypeSpec> Interfaces {
|
||||
set {
|
||||
throw new NotSupportedException ();
|
||||
}
|
||||
}
|
||||
|
||||
bool ITypeDefinition.IsComImport {
|
||||
get {
|
||||
return false;
|
||||
@ -1777,13 +1782,19 @@ namespace Mono.CSharp
|
||||
readonly int rank;
|
||||
readonly ModuleContainer module;
|
||||
|
||||
private ArrayContainer (ModuleContainer module, TypeSpec element, int rank)
|
||||
ArrayContainer (ModuleContainer module, TypeSpec element, int rank)
|
||||
: base (MemberKind.ArrayType, element, null)
|
||||
{
|
||||
this.module = module;
|
||||
this.rank = rank;
|
||||
}
|
||||
|
||||
public override IList<TypeSpec> Interfaces {
|
||||
get {
|
||||
return BaseType.Interfaces;
|
||||
}
|
||||
}
|
||||
|
||||
public int Rank {
|
||||
get {
|
||||
return rank;
|
||||
@ -1926,7 +1937,6 @@ namespace Mono.CSharp
|
||||
if (!module.ArrayTypesCache.TryGetValue (key, out ac)) {
|
||||
ac = new ArrayContainer (module, element, rank);
|
||||
ac.BaseType = module.Compiler.BuiltinTypes.Array;
|
||||
ac.Interfaces = ac.BaseType.Interfaces;
|
||||
|
||||
module.ArrayTypesCache.Add (key, ac);
|
||||
}
|
||||
@ -1942,11 +1952,17 @@ namespace Mono.CSharp
|
||||
|
||||
class ReferenceContainer : ElementTypeSpec
|
||||
{
|
||||
private ReferenceContainer (TypeSpec element)
|
||||
ReferenceContainer (TypeSpec element)
|
||||
: base (MemberKind.Class, element, null) // TODO: Kind.Class is most likely wrong
|
||||
{
|
||||
}
|
||||
|
||||
public override IList<TypeSpec> Interfaces {
|
||||
get {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public override MetaType GetMetaInfo ()
|
||||
{
|
||||
if (info == null) {
|
||||
@ -1977,6 +1993,12 @@ namespace Mono.CSharp
|
||||
state &= ~StateFlags.CLSCompliant_Undetected;
|
||||
}
|
||||
|
||||
public override IList<TypeSpec> Interfaces {
|
||||
get {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public override MetaType GetMetaInfo ()
|
||||
{
|
||||
if (info == null) {
|
||||
|
@ -1927,20 +1927,6 @@ mono_domain_assembly_search (MonoAssemblyName *aname,
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
prevent_running_reference_assembly (MonoAssembly *ass, MonoError *error)
|
||||
{
|
||||
mono_error_init (error);
|
||||
gboolean refasm = mono_assembly_get_reference_assembly_attribute (ass, error);
|
||||
if (!is_ok (error))
|
||||
return TRUE;
|
||||
if (refasm) {
|
||||
mono_error_set_bad_image (error, ass->image, "Could not load file or assembly or one of its dependencies. Reference assemblies should not be loaded for execution. They can only be loaded in the Reflection-only loader context.\n");
|
||||
return TRUE;
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
MonoReflectionAssembly *
|
||||
ves_icall_System_Reflection_Assembly_LoadFrom (MonoString *fname, MonoBoolean refOnly)
|
||||
{
|
||||
@ -1949,40 +1935,37 @@ ves_icall_System_Reflection_Assembly_LoadFrom (MonoString *fname, MonoBoolean re
|
||||
MonoDomain *domain = mono_domain_get ();
|
||||
char *name, *filename;
|
||||
MonoImageOpenStatus status = MONO_IMAGE_OK;
|
||||
MonoAssembly *ass = NULL;
|
||||
|
||||
name = NULL;
|
||||
result = NULL;
|
||||
|
||||
mono_error_init (&error);
|
||||
MonoAssembly *ass;
|
||||
|
||||
if (fname == NULL) {
|
||||
mono_error_set_argument_null (&error, "assemblyFile", "");
|
||||
goto leave;
|
||||
MonoException *exc = mono_get_exception_argument_null ("assemblyFile");
|
||||
mono_set_pending_exception (exc);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
name = filename = mono_string_to_utf8_checked (fname, &error);
|
||||
if (!is_ok (&error))
|
||||
goto leave;
|
||||
if (mono_error_set_pending_exception (&error))
|
||||
return NULL;
|
||||
|
||||
ass = mono_assembly_open_full (filename, &status, refOnly);
|
||||
|
||||
if (!ass) {
|
||||
MonoException *exc;
|
||||
|
||||
if (status == MONO_IMAGE_IMAGE_INVALID)
|
||||
mono_error_set_bad_image_name (&error, name, "");
|
||||
exc = mono_get_exception_bad_image_format2 (NULL, fname);
|
||||
else
|
||||
mono_error_set_exception_instance (&error, mono_get_exception_file_not_found2 (NULL, fname));
|
||||
goto leave;
|
||||
exc = mono_get_exception_file_not_found2 (NULL, fname);
|
||||
g_free (name);
|
||||
mono_set_pending_exception (exc);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (!refOnly && prevent_running_reference_assembly (ass, &error))
|
||||
goto leave;
|
||||
g_free (name);
|
||||
|
||||
result = mono_assembly_get_object_checked (domain, ass, &error);
|
||||
|
||||
leave:
|
||||
mono_error_set_pending_exception (&error);
|
||||
g_free (name);
|
||||
if (!result)
|
||||
mono_error_set_pending_exception (&error);
|
||||
return result;
|
||||
}
|
||||
|
||||
@ -2017,11 +2000,6 @@ ves_icall_System_AppDomain_LoadAssemblyRaw (MonoAppDomain *ad,
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (!refonly && prevent_running_reference_assembly (ass, &error)) {
|
||||
mono_error_set_pending_exception (&error);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
refass = mono_assembly_get_object_checked (domain, ass, &error);
|
||||
if (!refass)
|
||||
mono_error_set_pending_exception (&error);
|
||||
@ -2039,7 +2017,7 @@ ves_icall_System_AppDomain_LoadAssembly (MonoAppDomain *ad, MonoString *assRef,
|
||||
MonoAssembly *ass;
|
||||
MonoAssemblyName aname;
|
||||
MonoReflectionAssembly *refass = NULL;
|
||||
gchar *name = NULL;
|
||||
gchar *name;
|
||||
gboolean parsed;
|
||||
|
||||
g_assert (assRef);
|
||||
@ -2048,13 +2026,16 @@ ves_icall_System_AppDomain_LoadAssembly (MonoAppDomain *ad, MonoString *assRef,
|
||||
if (mono_error_set_pending_exception (&error))
|
||||
return NULL;
|
||||
parsed = mono_assembly_name_parse (name, &aname);
|
||||
g_free (name);
|
||||
|
||||
if (!parsed) {
|
||||
/* This is a parse error... */
|
||||
if (!refOnly) {
|
||||
refass = mono_try_assembly_resolve (domain, assRef, NULL, refOnly, &error);
|
||||
if (!is_ok (&error))
|
||||
goto leave;
|
||||
if (!mono_error_ok (&error)) {
|
||||
mono_error_set_pending_exception (&error);
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
return refass;
|
||||
}
|
||||
@ -2066,31 +2047,25 @@ ves_icall_System_AppDomain_LoadAssembly (MonoAppDomain *ad, MonoString *assRef,
|
||||
/* MS.NET doesn't seem to call the assembly resolve handler for refonly assemblies */
|
||||
if (!refOnly) {
|
||||
refass = mono_try_assembly_resolve (domain, assRef, NULL, refOnly, &error);
|
||||
if (!is_ok (&error))
|
||||
goto leave;
|
||||
if (!mono_error_ok (&error)) {
|
||||
mono_error_set_pending_exception (&error);
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
else
|
||||
refass = NULL;
|
||||
if (!refass)
|
||||
goto leave;
|
||||
ass = refass->assembly;
|
||||
if (!refass) {
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
if (!refOnly && prevent_running_reference_assembly (ass, &error))
|
||||
goto leave;
|
||||
|
||||
g_assert (ass);
|
||||
if (refass == NULL) {
|
||||
if (refass == NULL)
|
||||
refass = mono_assembly_get_object_checked (domain, ass, &error);
|
||||
if (!is_ok (&error))
|
||||
goto leave;
|
||||
}
|
||||
|
||||
MONO_OBJECT_SETREF (refass, evidence, evidence);
|
||||
|
||||
leave:
|
||||
g_free (name);
|
||||
mono_error_set_pending_exception (&error);
|
||||
if (refass == NULL)
|
||||
mono_error_set_pending_exception (&error);
|
||||
else
|
||||
MONO_OBJECT_SETREF (refass, evidence, evidence);
|
||||
return refass;
|
||||
}
|
||||
|
||||
|
3653
mono/metadata/assembly.c
Normal file
3653
mono/metadata/assembly.c
Normal file
File diff suppressed because it is too large
Load Diff
@ -1 +0,0 @@
|
||||
7bd02ff37eea77a111cb30ce2d3b64953d487736
|
@ -1 +1 @@
|
||||
56e12ad673e2765956a4fc89dade62a15656a02f
|
||||
17da478b5e9c1f089d76de0bc275da6ab5e21077
|
@ -697,8 +697,4 @@ mono_runtime_init_checked (MonoDomain *domain, MonoThreadStartCB start_cb, MonoT
|
||||
void
|
||||
mono_context_init_checked (MonoDomain *domain, MonoError *error);
|
||||
|
||||
gboolean
|
||||
mono_assembly_get_reference_assembly_attribute (MonoAssembly *assembly, MonoError *error);
|
||||
|
||||
|
||||
#endif /* __MONO_METADATA_DOMAIN_INTERNALS_H__ */
|
||||
|
@ -807,16 +807,6 @@ mono_init_internal (const char *filename, const char *exe_filename, const char *
|
||||
|
||||
mono_profiler_appdomain_name (domain, domain->friendly_name);
|
||||
|
||||
/* Have to do this quite late so that we at least have System.Object */
|
||||
MonoError custom_attr_error;
|
||||
if (mono_assembly_get_reference_assembly_attribute (ass, &custom_attr_error)) {
|
||||
char *corlib_file = g_build_filename (mono_assembly_getrootdir (), "mono", current_runtime->framework_version, "mscorlib.dll", NULL);
|
||||
g_print ("Could not load file or assembly %s. Reference assemblies should not be loaded for execution. They can only be loaded in the Reflection-only loader context.", corlib_file);
|
||||
g_free (corlib_file);
|
||||
exit (1);
|
||||
}
|
||||
mono_error_assert_ok (&custom_attr_error);
|
||||
|
||||
return domain;
|
||||
}
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user