Imported Upstream version 4.8.0.395

Former-commit-id: bc4eb15577ba347ac08038f1ebaa41e253f5b948
This commit is contained in:
Xamarin Public Jenkins (auto-signing)
2017-01-03 15:17:25 +00:00
parent 006de68e1e
commit 693afccc61
28 changed files with 123 additions and 60 deletions

View File

@@ -630,18 +630,19 @@ mono_object_hash (MonoObject* obj)
#endif
}
static void
static gboolean
mono_monitor_ensure_owned (LockWord lw, guint32 id)
{
if (lock_word_is_flat (lw)) {
if (lock_word_get_owner (lw) == id)
return;
return TRUE;
} else if (lock_word_is_inflated (lw)) {
if (mon_status_get_owner (lock_word_get_inflated_lock (lw)->status) == id)
return;
return TRUE;
}
mono_set_pending_exception (mono_get_exception_synchronization_lock ("Object synchronization method was called from an unsynchronized block of code."));
return FALSE;
}
/*
@@ -1038,7 +1039,8 @@ mono_monitor_exit (MonoObject *obj)
lw.sync = obj->synchronisation;
mono_monitor_ensure_owned (lw, mono_thread_info_get_small_id ());
if (!mono_monitor_ensure_owned (lw, mono_thread_info_get_small_id ()))
return;
if (G_UNLIKELY (lock_word_is_inflated (lw)))
mono_monitor_exit_inflated (obj);
@@ -1185,7 +1187,8 @@ ves_icall_System_Threading_Monitor_Monitor_pulse (MonoObject *obj)
id = mono_thread_info_get_small_id ();
lw.sync = obj->synchronisation;
mono_monitor_ensure_owned (lw, id);
if (!mono_monitor_ensure_owned (lw, id))
return;
if (!lock_word_is_inflated (lw)) {
/* No threads waiting. A wait would have inflated the lock */
@@ -1216,7 +1219,8 @@ ves_icall_System_Threading_Monitor_Monitor_pulse_all (MonoObject *obj)
id = mono_thread_info_get_small_id ();
lw.sync = obj->synchronisation;
mono_monitor_ensure_owned (lw, id);
if (!mono_monitor_ensure_owned (lw, id))
return;
if (!lock_word_is_inflated (lw)) {
/* No threads waiting. A wait would have inflated the lock */
@@ -1252,7 +1256,8 @@ ves_icall_System_Threading_Monitor_Monitor_wait (MonoObject *obj, guint32 ms)
lw.sync = obj->synchronisation;
mono_monitor_ensure_owned (lw, id);
if (!mono_monitor_ensure_owned (lw, id))
return FALSE;
if (!lock_word_is_inflated (lw)) {
mono_monitor_inflate_owned (obj, id);

View File

@@ -860,7 +860,7 @@ EXTRA_DIST = TestDriver.cs \
Makefile.am.in
version.h: Makefile
echo "#define FULL_VERSION \"Stable 4.8.0.382/aca1492\"" > version.h
echo "#define FULL_VERSION \"Stable 4.8.0.395/df81fe4\"" > version.h
# Utility target for patching libtool to speed up linking
patch-libtool:

View File

@@ -860,7 +860,7 @@ EXTRA_DIST = TestDriver.cs \
Makefile.am.in
version.h: Makefile
echo "#define FULL_VERSION \"Stable 4.8.0.382/aca1492\"" > version.h
echo "#define FULL_VERSION \"Stable 4.8.0.395/df81fe4\"" > version.h
# Utility target for patching libtool to speed up linking
patch-libtool:

View File

@@ -1 +1 @@
de8ec0d53c8240e10d3267814eb8ab2f2114e5db
2128ee71f4bedcfbe65320e1befa9d3044dd5a0b

View File

@@ -1 +1 @@
a1c359f96a9f1549227cba4f1d82f9b535458f19
14bc01ca5a1c785611092113ce9726193bb24fd9

View File

@@ -66,26 +66,6 @@ known_kernel_helper (void)
#endif
}
static void
dump_code (guint32 *ptr)
{
char current_impl [256];
char hex [16];
int i;
guint32 page_mask = ~((guint32)mono_pagesize () - 1);
current_impl [0] = 0;
for (i = 0; i < 16; i++) {
/* Don't risk page fault since we don't know where the code ends */
if (((guint32)&ptr [i] & page_mask) != ((guint32)ptr & page_mask))
break;
sprintf (hex, "0x%x ", ptr [i]);
strcat (current_impl, hex);
}
g_warning (current_impl);
}
static MonoTlsImplementation
mono_arm_get_tls_implementation (void)
{
@@ -110,9 +90,6 @@ mono_arm_get_tls_implementation (void)
}
}
g_warning ("No fast tls on device. Using fallbacks. Current implementation : ");
dump_code (check_addr);
return (MonoTlsImplementation) { NULL, 0, FALSE, mono_fallback_get_tls_key, NULL, mono_fallback_set_tls_key, NULL };
#endif
}

View File

@@ -1 +1 @@
e249d1215b974ea22b97135efc8865641fd6e064
135519aac6d9aac84c8ac83259d5bb8ea8cc9c61

View File

@@ -1 +1 @@
#define FULL_VERSION "Stable 4.8.0.382/aca1492"
#define FULL_VERSION "Stable 4.8.0.395/df81fe4"

View File

@@ -346,10 +346,16 @@ mono_sigctx_to_monoctx (void *sigctx, MonoContext *mctx)
memcpy (mctx->regs, UCONTEXT_GREGS (sigctx), sizeof (mgreg_t) * 31);
mctx->pc = UCONTEXT_REG_PC (sigctx);
mctx->regs [ARMREG_SP] = UCONTEXT_REG_SP (sigctx);
/*
* We don't handle fp regs, this is not currrently a
* problem, since we don't allocate them globally.
*/
#ifdef __linux__
struct fpsimd_context *fpctx = (struct fpsimd_context*)&((ucontext_t*)sigctx)->uc_mcontext.__reserved;
int i;
g_assert (fpctx->head.magic == FPSIMD_MAGIC);
for (i = 0; i < 32; ++i)
/* Only store the bottom 8 bytes for now */
*(guint64*)&(mctx->fregs [i]) = fpctx->vregs [i];
#endif
/* FIXME: apple */
#endif
}