You've already forked linux-packaging-mono
Imported Upstream version 4.8.0.520
Former-commit-id: b616177084b79e9a11491af6b1ad88f2f73a6093
This commit is contained in:
parent
af08d800c3
commit
dc50008e16
@@ -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)
|
||||
|
||||
@@ -1 +1 @@
|
||||
6319d6539ae88d35e1b1c3ac49c5be5c39e309a0
|
||||
b304894d059baf706e16a1cf96e1fab367d91a79
|
||||
@@ -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__ */
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -1 +1 @@
|
||||
7b980453c593408f829e7098dc333ad5087a8865
|
||||
aec93dfd6da7c7fdca217573f4c4110135f3d6e6
|
||||
@@ -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);
|
||||
|
||||
@@ -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__ */
|
||||
|
||||
|
||||
@@ -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 */
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -1 +1 @@
|
||||
1d2d50a79752da03d88b373dcfa4536e767c289d
|
||||
0dc0111f92ce7928cc8fae909326c9c778d14418
|
||||
@@ -1 +1 @@
|
||||
c4f44c2ecbc5dc6f0532c59ad55c2f46f1ed7f73
|
||||
12111cac30226110a818b7d30ed37495129ceefa
|
||||
@@ -1 +1 @@
|
||||
2fd57cf8561234d38c90801e15fa271c5a719a82
|
||||
c9cf297db00016d19274c670f130a224b78f28e0
|
||||
@@ -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);
|
||||
|
||||
@@ -1 +1 @@
|
||||
#define FULL_VERSION "Stable 4.8.0.495/e4a3cf3"
|
||||
#define FULL_VERSION "Stable 4.8.0.520/8f6d0f6"
|
||||
|
||||
Reference in New Issue
Block a user