You've already forked linux-packaging-mono
Imported Upstream version 4.2.0.207
Former-commit-id: f90f74cb984aa12eac8e2a357db43169ae7378e5
This commit is contained in:
committed by
Jo Shields
parent
6992685b86
commit
afe402035c
@@ -2202,6 +2202,11 @@ get_module_filename (gpointer process, gpointer module,
|
||||
char *path;
|
||||
gunichar2 *proc_path;
|
||||
|
||||
size *= sizeof (gunichar2); /* adjust for unicode characters */
|
||||
|
||||
if (basename == NULL || size == 0)
|
||||
return 0;
|
||||
|
||||
pid = GetProcessId (process);
|
||||
|
||||
path = wapi_process_get_path (pid);
|
||||
@@ -2209,6 +2214,8 @@ get_module_filename (gpointer process, gpointer module,
|
||||
return 0;
|
||||
|
||||
proc_path = mono_unicode_from_external (path, &bytes);
|
||||
g_free (path);
|
||||
|
||||
if (proc_path == NULL)
|
||||
return 0;
|
||||
|
||||
@@ -2228,6 +2235,8 @@ get_module_filename (gpointer process, gpointer module,
|
||||
memcpy (basename, proc_path, bytes);
|
||||
}
|
||||
|
||||
g_free (proc_path);
|
||||
|
||||
return len;
|
||||
}
|
||||
|
||||
|
||||
@@ -534,16 +534,6 @@ MonoArray *ves_icall_System_Diagnostics_Process_GetModules_internal (MonoObject
|
||||
mono_array_setref (arr, i, mono_array_get (temp_arr, MonoObject*, i));
|
||||
}
|
||||
|
||||
if (count == num_added) {
|
||||
arr = temp_arr;
|
||||
} else {
|
||||
/* shorter version of the array */
|
||||
arr = mono_array_new (mono_domain_get (), proc_class, num_added);
|
||||
|
||||
for (i = 0; i < num_added; i++)
|
||||
mono_array_setref (arr, i, mono_array_get (temp_arr, MonoObject*, i));
|
||||
}
|
||||
|
||||
return arr;
|
||||
}
|
||||
|
||||
|
||||
@@ -103,6 +103,30 @@ enum {
|
||||
INTERNAL_MEM_MAX
|
||||
};
|
||||
|
||||
static inline mword
|
||||
sgen_mono_array_size (GCVTable vtable, MonoArray *array, mword *bounds_size, mword descr)
|
||||
{
|
||||
mword size, size_without_bounds;
|
||||
int element_size;
|
||||
|
||||
if ((descr & DESC_TYPE_MASK) == DESC_TYPE_VECTOR)
|
||||
element_size = ((descr) >> VECTOR_ELSIZE_SHIFT) & MAX_ELEMENT_SIZE;
|
||||
else
|
||||
element_size = vtable->klass->sizes.element_size;
|
||||
|
||||
size_without_bounds = size = sizeof (MonoArray) + element_size * mono_array_length_fast (array);
|
||||
|
||||
if (G_UNLIKELY (array->bounds)) {
|
||||
size += sizeof (mono_array_size_t) - 1;
|
||||
size &= ~(sizeof (mono_array_size_t) - 1);
|
||||
size += sizeof (MonoArrayBounds) * vtable->klass->rank;
|
||||
}
|
||||
|
||||
if (bounds_size)
|
||||
*bounds_size = size - size_without_bounds;
|
||||
return size;
|
||||
}
|
||||
|
||||
#define SGEN_CLIENT_OBJECT_HEADER_SIZE (sizeof (GCObject))
|
||||
#define SGEN_CLIENT_MINIMUM_OBJECT_SIZE SGEN_CLIENT_OBJECT_HEADER_SIZE
|
||||
|
||||
@@ -118,14 +142,7 @@ sgen_client_slow_object_get_size (GCVTable vtable, GCObject* o)
|
||||
if (klass == mono_defaults.string_class) {
|
||||
return G_STRUCT_OFFSET (MonoString, chars) + 2 * mono_string_length_fast ((MonoString*) o) + 2;
|
||||
} else if (klass->rank) {
|
||||
MonoArray *array = (MonoArray*)o;
|
||||
size_t size = sizeof (MonoArray) + klass->sizes.element_size * mono_array_length_fast (array);
|
||||
if (G_UNLIKELY (array->bounds)) {
|
||||
size += sizeof (mono_array_size_t) - 1;
|
||||
size &= ~(sizeof (mono_array_size_t) - 1);
|
||||
size += sizeof (MonoArrayBounds) * klass->rank;
|
||||
}
|
||||
return size;
|
||||
return sgen_mono_array_size (vtable, (MonoArray*)o, NULL, 0);
|
||||
} else {
|
||||
/* from a created object: the class must be inited already */
|
||||
return klass->instance_size;
|
||||
@@ -150,20 +167,7 @@ sgen_client_par_object_get_size (GCVTable vtable, GCObject* o)
|
||||
} else if (descr == SGEN_DESC_STRING) {
|
||||
return G_STRUCT_OFFSET (MonoString, chars) + 2 * mono_string_length_fast ((MonoString*) o) + 2;
|
||||
} else if (type == DESC_TYPE_VECTOR) {
|
||||
int element_size = ((descr) >> VECTOR_ELSIZE_SHIFT) & MAX_ELEMENT_SIZE;
|
||||
MonoArray *array = (MonoArray*)o;
|
||||
size_t size = sizeof (MonoArray) + element_size * mono_array_length_fast (array);
|
||||
|
||||
/*
|
||||
* Non-vector arrays with a single dimension whose lower bound is zero are
|
||||
* allocated without bounds.
|
||||
*/
|
||||
if ((descr & VECTOR_KIND_ARRAY) && array->bounds) {
|
||||
size += sizeof (mono_array_size_t) - 1;
|
||||
size &= ~(sizeof (mono_array_size_t) - 1);
|
||||
size += sizeof (MonoArrayBounds) * ((MonoVTable*)vtable)->klass->rank;
|
||||
}
|
||||
return size;
|
||||
return sgen_mono_array_size (vtable, (MonoArray*)o, NULL, descr);
|
||||
}
|
||||
|
||||
return sgen_client_slow_object_get_size (vtable, o);
|
||||
|
||||
@@ -1594,15 +1594,17 @@ sgen_client_cardtable_scan_object (GCObject *obj, mword block_obj_size, guint8 *
|
||||
SGEN_ASSERT (0, SGEN_VTABLE_HAS_REFERENCES (vt), "Why would we ever call this on reference-free objects?");
|
||||
|
||||
if (vt->rank) {
|
||||
MonoArray *arr = (MonoArray*)obj;
|
||||
guint8 *card_data, *card_base;
|
||||
guint8 *card_data_end;
|
||||
char *obj_start = sgen_card_table_align_pointer (obj);
|
||||
mword obj_size = sgen_client_par_object_get_size (vt, obj);
|
||||
char *obj_end = (char*)obj + obj_size;
|
||||
mword bounds_size;
|
||||
mword obj_size = sgen_mono_array_size (vt, arr, &bounds_size, sgen_vtable_get_descriptor (vt));
|
||||
/* We don't want to scan the bounds entries at the end of multidimensional arrays */
|
||||
char *obj_end = (char*)obj + obj_size - bounds_size;
|
||||
size_t card_count;
|
||||
size_t extra_idx = 0;
|
||||
|
||||
MonoArray *arr = (MonoArray*)obj;
|
||||
mword desc = (mword)klass->element_class->gc_descr;
|
||||
int elem_size = mono_array_element_size (klass);
|
||||
|
||||
|
||||
@@ -749,7 +749,7 @@ EXTRA_DIST = TestDriver.cs \
|
||||
Makefile.am.in
|
||||
|
||||
version.h: Makefile
|
||||
echo "#define FULL_VERSION \"Stable 4.2.0.179/a224653\"" > version.h
|
||||
echo "#define FULL_VERSION \"Stable 4.2.0.207/2701b19\"" > version.h
|
||||
|
||||
# Utility target for patching libtool to speed up linking
|
||||
patch-libtool:
|
||||
|
||||
@@ -749,7 +749,7 @@ EXTRA_DIST = TestDriver.cs \
|
||||
Makefile.am.in
|
||||
|
||||
version.h: Makefile
|
||||
echo "#define FULL_VERSION \"Stable 4.2.0.179/a224653\"" > version.h
|
||||
echo "#define FULL_VERSION \"Stable 4.2.0.207/2701b19\"" > version.h
|
||||
|
||||
# Utility target for patching libtool to speed up linking
|
||||
patch-libtool:
|
||||
|
||||
@@ -1 +1 @@
|
||||
ca69c875348787c45a14730f1e90051c3da6f74f
|
||||
3067f960d61f7e500f6a1568f95ac6b739298ae5
|
||||
@@ -1 +1 @@
|
||||
2a52f825d9bef37957ef6702c8f691ee8b61c831
|
||||
39d38dab51642f90e7abc6171668bf4f7ceac01c
|
||||
@@ -1300,6 +1300,7 @@ public class Tests
|
||||
|
||||
interface IFaceBox {
|
||||
object box<T> (T t);
|
||||
bool is_null<T> (T t);
|
||||
}
|
||||
|
||||
class ClassBox : IFaceBox {
|
||||
@@ -1307,6 +1308,12 @@ public class Tests
|
||||
object o = t;
|
||||
return o;
|
||||
}
|
||||
|
||||
public bool is_null<T> (T t) {
|
||||
if (!(default(T) == null))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
public static int test_0_nullable_box () {
|
||||
@@ -1329,6 +1336,15 @@ public class Tests
|
||||
return 0;
|
||||
}
|
||||
|
||||
public static int test_0_nullable_box_brtrue_opt () {
|
||||
IFaceBox c = new ClassBox ();
|
||||
|
||||
if (c.is_null<double?> (null))
|
||||
return 0;
|
||||
else
|
||||
return 1;
|
||||
}
|
||||
|
||||
interface IFaceUnbox2 {
|
||||
T unbox<T> (object o);
|
||||
}
|
||||
|
||||
@@ -1 +1 @@
|
||||
27a91b1add7366b9c9316d9ee7cc45c8a3a407e5
|
||||
8901046041bb65808a7d99cb9b185596c7be01c5
|
||||
@@ -250,12 +250,14 @@ mono_gdb_render_native_backtraces (pid_t crashed_pid)
|
||||
FILE *commands;
|
||||
gboolean using_lldb = FALSE;
|
||||
|
||||
using_lldb = TRUE;
|
||||
/*
|
||||
argv [0] = g_find_program_in_path ("gdb");
|
||||
if (!argv [0]) {
|
||||
// FIXME: LLDB doesn't quit when given the 'quit' command
|
||||
//argv [0] = g_find_program_in_path ("lldb");
|
||||
//using_lldb = TRUE;
|
||||
}
|
||||
if (!argv [0])
|
||||
using_lldb = TRUE;
|
||||
*/
|
||||
if (using_lldb)
|
||||
argv [0] = g_find_program_in_path ("lldb");
|
||||
|
||||
if (argv [0] == NULL)
|
||||
return;
|
||||
@@ -286,6 +288,8 @@ mono_gdb_render_native_backtraces (pid_t crashed_pid)
|
||||
fflush (commands);
|
||||
fclose (commands);
|
||||
|
||||
fclose (stdin);
|
||||
|
||||
execv (argv [0], (char**)argv);
|
||||
unlink (template);
|
||||
}
|
||||
|
||||
@@ -618,50 +618,6 @@ mono_exception_walk_trace (MonoException *ex, MonoExceptionFrameWalk func, gpoin
|
||||
return len > 0;
|
||||
}
|
||||
|
||||
MonoString *
|
||||
ves_icall_System_Exception_get_trace (MonoException *ex)
|
||||
{
|
||||
MonoDomain *domain = mono_domain_get ();
|
||||
MonoString *res;
|
||||
MonoArray *ta = ex->trace_ips;
|
||||
int i, len;
|
||||
GString *trace_str;
|
||||
|
||||
if (ta == NULL)
|
||||
/* Exception is not thrown yet */
|
||||
return NULL;
|
||||
|
||||
len = mono_array_length (ta) >> 1;
|
||||
trace_str = g_string_new ("");
|
||||
for (i = 0; i < len; i++) {
|
||||
MonoJitInfo *ji;
|
||||
gpointer ip = mono_array_get (ta, gpointer, i * 2 + 0);
|
||||
gpointer generic_info = mono_array_get (ta, gpointer, i * 2 + 1);
|
||||
|
||||
ji = mono_jit_info_table_find (domain, ip);
|
||||
if (ji == NULL) {
|
||||
/* Unmanaged frame */
|
||||
g_string_append_printf (trace_str, "in (unmanaged) %p\n", ip);
|
||||
} else {
|
||||
gchar *location;
|
||||
gint32 address;
|
||||
MonoMethod *method = get_method_from_stack_frame (ji, generic_info);
|
||||
|
||||
address = (char *)ip - (char *)ji->code_start;
|
||||
location = mono_debug_print_stack_frame (
|
||||
method, address, ex->object.vtable->domain);
|
||||
|
||||
g_string_append_printf (trace_str, "%s\n", location);
|
||||
g_free (location);
|
||||
}
|
||||
}
|
||||
|
||||
res = mono_string_new (ex->object.vtable->domain, trace_str->str);
|
||||
g_string_free (trace_str, TRUE);
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
MonoArray *
|
||||
ves_icall_get_trace (MonoException *exc, gint32 skip, MonoBoolean need_file_info)
|
||||
{
|
||||
@@ -1191,9 +1147,6 @@ build_native_trace (void)
|
||||
trace_ips = g_list_reverse (trace_ips); \
|
||||
MONO_OBJECT_SETREF (mono_ex, trace_ips, glist_to_array (trace_ips, mono_defaults.int_class)); \
|
||||
MONO_OBJECT_SETREF (mono_ex, native_trace_ips, build_native_trace ()); \
|
||||
if (has_dynamic_methods) \
|
||||
/* These methods could go away anytime, so compute the stack trace now */ \
|
||||
MONO_OBJECT_SETREF (mono_ex, stack_trace, ves_icall_System_Exception_get_trace (mono_ex)); \
|
||||
} \
|
||||
g_list_free (trace_ips); \
|
||||
trace_ips = NULL; \
|
||||
|
||||
@@ -1 +1 @@
|
||||
c870782f0d4657331dc5c35647ccd1889a8eb124
|
||||
8b14d1f670c108df89e59f0ab80f793a259597e1
|
||||
@@ -1 +1 @@
|
||||
6b5def572a57ab04f15d8fa150e09fa60f431cf4
|
||||
027aa259a942beaf7c3ed1fd6d29387d9ce70ae9
|
||||
@@ -1 +1 @@
|
||||
b0a5b2c287cb2b0e774c16233bb254dcd05b777e
|
||||
1cbbf289bd0e3394b2850dfd3d558327f35ec6cc
|
||||
@@ -1 +1 @@
|
||||
#define FULL_VERSION "Stable 4.2.0.179/a224653"
|
||||
#define FULL_VERSION "Stable 4.2.0.207/2701b19"
|
||||
|
||||
@@ -1 +1 @@
|
||||
9924906bd90e625e238e6ca9ad03893a171431f1
|
||||
0df2d3cd1af74d33f445fa11a8beaef0d820a95e
|
||||
@@ -1 +1 @@
|
||||
50fc30913bc08a4bfbc14f0b0bd30d36c2273512
|
||||
549a7cf0c9085eb4b819e7233c09a5a5fedb2835
|
||||
@@ -24,6 +24,7 @@
|
||||
load/unload for contexts
|
||||
load/unload/name for assemblies
|
||||
removed TYPE_LOAD_ERR flag (profiler never generated it, now removed from the format itself)
|
||||
added TYPE_GC_HANDLE_{CREATED,DESTROYED}_BT
|
||||
*/
|
||||
|
||||
enum {
|
||||
@@ -56,8 +57,10 @@ enum {
|
||||
TYPE_GC_EVENT = 1 << 4,
|
||||
TYPE_GC_RESIZE = 2 << 4,
|
||||
TYPE_GC_MOVE = 3 << 4,
|
||||
TYPE_GC_HANDLE_CREATED = 4 << 4,
|
||||
TYPE_GC_HANDLE_DESTROYED = 5 << 4,
|
||||
TYPE_GC_HANDLE_CREATED = 4 << 4,
|
||||
TYPE_GC_HANDLE_DESTROYED = 5 << 4,
|
||||
TYPE_GC_HANDLE_CREATED_BT = 6 << 4,
|
||||
TYPE_GC_HANDLE_DESTROYED_BT = 7 << 4,
|
||||
/* extended type for TYPE_METHOD */
|
||||
TYPE_LEAVE = 1 << 4,
|
||||
TYPE_ENTER = 2 << 4,
|
||||
|
||||
@@ -1 +1 @@
|
||||
a24badfaf7c185d8a870932a9ed92ad26f23face
|
||||
21fd9dab9e70d3456026645e195f183d4ffb2739
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user