Marcos Henrich [Fri, 14 Aug 2015 09:08:23 +0000 (10:08 +0100)]
Merge pull request #1972 from esdrubal/proc_pidpath
[runtime] GetModuleFileNameEx
Alex Rønne Petersen [Fri, 14 Aug 2015 08:44:56 +0000 (10:44 +0200)]
Merge pull request #1975 from alexrp/profiler-gch-bt
[profiler] Add GC handle events with backtraces.
Sebastien Pouliot [Thu, 13 Aug 2015 20:43:00 +0000 (16:43 -0400)]
[tests] Remove CWL from test catch clause as it can be confused with a real error [#32593]
Ludovic Henry [Mon, 25 May 2015 14:12:32 +0000 (11:12 -0300)]
[referencesource] Import System.Math
Rolf Bjarne Kvinge [Thu, 13 Aug 2015 15:31:34 +0000 (17:31 +0200)]
Add specific configure option to enable the WatchOS BCL libraries.
Rolf Bjarne Kvinge [Thu, 13 Aug 2015 09:13:53 +0000 (11:13 +0200)]
Build an initial version of System.Net.Http.dll for monotouch as part of the regular BCL build.
We have Facade assemblies that depend on System.Net.Http.dll to exist, so
we can't delay building it (at least one version of it).
João Matos [Thu, 13 Aug 2015 15:07:17 +0000 (16:07 +0100)]
Added support for WatchOS's armv7k to configure.ac.
Marek Habersack [Mon, 3 Aug 2015 14:48:25 +0000 (10:48 -0400)]
Posix RTS test fixes and Android compatibility
Android's libc (bionic) defines the _GNU_SOURCE macro but fails to adhere
to the GNU sematics in (at least) one case - the strerror_r function.
The function follows XSI semantics instead of the GNU one which caused our
code to segfault on Android. This patch special-cases Android to use the XSI
semantics for strerror_r. This un-breaks some POSX real-time singals tests.
It also makes provisions for detecting whether the real-time signals are safe
to use on the current platform. They are safe for all platforms desktop Mono
runs on, but they're not safe on most Android platforms.
Marek Safar [Thu, 13 Aug 2015 09:17:25 +0000 (11:17 +0200)]
[corlib] Remove unused code
Alex Rønne Petersen [Wed, 12 Aug 2015 06:20:39 +0000 (08:20 +0200)]
[profiler] Add GC handle events with backtraces.
Alex Rønne Petersen [Wed, 12 Aug 2015 04:28:16 +0000 (06:28 +0200)]
[profiler] Remove CodeAnalyst profiler module.
This product has been discontinued by AMD and we don't even have support for
building this profiler module in the build system anyway; chances are pretty
good that bitrot has set in.
Zoltan Varga [Wed, 12 Aug 2015 02:26:56 +0000 (22:26 -0400)]
[jit] Add another suspend check to the JIT.
Zoltan Varga [Wed, 12 Aug 2015 01:49:45 +0000 (21:49 -0400)]
[jit] Avoid asserts during stack walks if the thread is not attached.
Zoltan Varga [Wed, 12 Aug 2015 01:11:40 +0000 (21:11 -0400)]
[runtime] Make sure Monitor.Enter () is always inlined since it consists only of a call to an icall.
Zoltan Varga [Tue, 11 Aug 2015 19:54:07 +0000 (15:54 -0400)]
[aot] Fix the calculate of the llvm code range for aot image with only 1 llvm method.
Jo Shields [Tue, 11 Aug 2015 18:41:23 +0000 (19:41 +0100)]
Un-revoke fix in BNC#144655 - mono-find-provides should ONLY work on GAC libraries, and any packages which break on this behaviour should be fixed - rather than generating utterly broken Provides.
(cherry picked from commit
1f4133a06f252ec1b78637dd91e49f50836cf570)
Zoltan Varga [Tue, 11 Aug 2015 18:37:47 +0000 (14:37 -0400)]
[runtime] Move the kevent() calls from KeventWatcher to the runtime, add support for interrupts.
Ludovic Henry [Tue, 11 Aug 2015 17:20:36 +0000 (14:20 -0300)]
Merge pull request #1973 from rolfbjarne/bug32947
[threadpool-ms-io] Remove unnecessary asserts. Fixes #32947.
Rolf Bjarne Kvinge [Tue, 11 Aug 2015 13:07:10 +0000 (15:07 +0200)]
[threadpool-ms-io] Remove unnecessary asserts. Fixes #32947.
Neither is_socket_async_callback nor is_async_read_handler need to
actually successfully load the classes they're comparing against;
if the classes can't be loaded, then the input class is obviously
not of that class.
This occurs when mscorlib is linked, the classes to compare against
might be linked away.
https://bugzilla.xamarin.com/show_bug.cgi?id=32947
Marcos Henrich [Tue, 11 Aug 2015 11:51:12 +0000 (12:51 +0100)]
[runtime] GetModuleFileNameEx
GetModuleFileNameEx now returns a full path instead of the process name.
Fixes #32579
Marcos Henrich [Tue, 11 Aug 2015 12:10:27 +0000 (13:10 +0100)]
Merge pull request #1952 from esdrubal/proc_name
Fixes process names trimmed to 15 chars.
Zoltan Varga [Tue, 11 Aug 2015 03:20:43 +0000 (23:20 -0400)]
[coop] Handle blocking in parked threads correctly.
Zoltan Varga [Tue, 11 Aug 2015 02:20:10 +0000 (22:20 -0400)]
[runtime] Add a missing MONO_FINISH_BLOCKING to ves_icall_System_Net_Dns_GetHostByName_internal.
Zoltan Varga [Tue, 11 Aug 2015 00:55:32 +0000 (20:55 -0400)]
[jit] Emit the seq point for filter clauses after the op_get_exc instruction.
Zoltan Varga [Mon, 10 Aug 2015 19:51:39 +0000 (15:51 -0400)]
Revert "[runtime] Move the kevent() calls from KeventWatcher to the runtime, add support for interrupts."
This reverts commit
7f4428165809bed674697d482f76c7e9446bae4e.
Revert this as icalls don't marshal kevent structures correctly.
Zoltan Varga [Mon, 10 Aug 2015 19:25:03 +0000 (15:25 -0400)]
[runtime] Remove some debug printfs.
Zoltan Varga [Mon, 10 Aug 2015 18:33:30 +0000 (14:33 -0400)]
[coop] Fix a crash introduced by
edb4d8f3faef5f5d0ad3fc639d58b4d490c82c94, some wrappers don't have wrapper infos.
Zoltan Varga [Mon, 10 Aug 2015 18:32:37 +0000 (14:32 -0400)]
[runtime] Move the kevent() calls from KeventWatcher to the runtime, add support for interrupts.
Marcos Henrich [Wed, 29 Jul 2015 15:16:03 +0000 (16:16 +0100)]
Fixes process names trimmed to 15 chars.
Process names were trimmed to 15 characters. proc_name was used to
retrieve the process name, by looking at its implementation we can see
that it returns a buffer which the size is MAXCOMLEN defined as 16.
When the proc_name result length is equal to 15 (MAXCOMLEN - 1) we now check if
proc_pidpath is able to return a longer process name.
Fixes #32539.
Rodrigo Kumpera [Mon, 10 Aug 2015 14:33:35 +0000 (10:33 -0400)]
[coop] Fix MONO_SUSPEND_CHECK to use the right variable name.
Rodrigo Kumpera [Sun, 9 Aug 2015 15:02:33 +0000 (11:02 -0400)]
[coop] Cue card now mentions that blocking has a suspend count.
Rodrigo Kumpera [Sun, 9 Aug 2015 05:55:26 +0000 (01:55 -0400)]
[coop] Don't emit safepoints in the wrapper of the polling function.
Otherwise during a collection the wrapper would call itself resulting
in a stack overflow.
Rodrigo Kumpera [Sat, 8 Aug 2015 14:17:58 +0000 (10:17 -0400)]
[coop] Switch from thread_state_init_from_sigctx to thread_state_init.
Suspend needs to work in the intermediate state where the mono-thread
is attached but not the managed thread. This happens in the startup
and cleanup paths and leads to crashes there.
The suspend initiator is now responsible to check if the thread is
attached or not. Which is easy, just check lmf/jit_tls.
Rodrigo Kumpera [Sat, 8 Aug 2015 14:15:11 +0000 (10:15 -0400)]
[coop] Add thread_state_init that initializes the thread from the current stack state.
This new function works differently that others in that it always succeed, but might
provide incomplete data in some cases - like when the thread is not attached.
Rodrigo Kumpera [Sat, 8 Aug 2015 14:12:41 +0000 (10:12 -0400)]
[coop] Attach mono-thread as early as possible.
This makes early suspend checks work. This makes it easier
to debug suspend errors by asserting on suspend fails.
Rodrigo Kumpera [Fri, 7 Aug 2015 18:58:57 +0000 (14:58 -0400)]
[configure] Add checked build configure option.
Marek Safar [Mon, 10 Aug 2015 11:03:44 +0000 (13:03 +0200)]
[corlib] Handle Module in RuntimePropertyInfo. Fixes #32815
Marek Safar [Mon, 10 Aug 2015 09:12:56 +0000 (11:12 +0200)]
[mcs] Fix string interpolation parsing where inner expression contains { } tokens. Fixes #32832
Zoltan Varga [Sun, 9 Aug 2015 02:39:13 +0000 (22:39 -0400)]
[runtime] Remove an unused functions.
Zoltan Varga [Sun, 9 Aug 2015 02:39:00 +0000 (22:39 -0400)]
[runtime] Mark mono_monitor_try_enter_internal () as inline.
Zoltan Varga [Sun, 9 Aug 2015 02:31:47 +0000 (22:31 -0400)]
[runtime] Make synchronized methods use the Monitor.Enter(object,bool&) overload.
Zoltan Varga [Sat, 8 Aug 2015 22:44:06 +0000 (22:44 +0000)]
[runtime] Fix the coop build on posix platforms.
Zoltan Varga [Sat, 8 Aug 2015 22:43:42 +0000 (22:43 +0000)]
[arm] Implement support for gc safe points.
Zoltan Varga [Sat, 8 Aug 2015 22:08:21 +0000 (18:08 -0400)]
[runtime] Remove mono_g_hash_table_new (), use mono_g_hash_table_new_type () instead.
Zoltan Varga [Sat, 8 Aug 2015 22:00:24 +0000 (18:00 -0400)]
[runtime] Use a GHashTable instead of a MonoGHashTable in mono_class_from_name (), the hash table doesn't need to be GC aware.
Zoltan Varga [Sat, 8 Aug 2015 17:35:49 +0000 (13:35 -0400)]
[runtime] Remove the sgen_supported conditional from configure, we don't support architectures which don't have SGEN.
Marek Safar [Sat, 8 Aug 2015 07:00:21 +0000 (09:00 +0200)]
Merge pull request #1968 from LogosBible/uribuilder-no-hostname
Fix UriBuilder.ToString() when the host is empty.
Zoltan Varga [Sat, 8 Aug 2015 02:22:31 +0000 (22:22 -0400)]
Fix the build.
Zoltan Varga [Sat, 8 Aug 2015 00:40:39 +0000 (20:40 -0400)]
[jit] Add a suspect check into the middle of the JIT pipeline.
Zoltan Varga [Fri, 7 Aug 2015 20:11:16 +0000 (16:11 -0400)]
[runtime] Revert part of the previous commit to avoid the profiler crashing.
Zoltan Varga [Fri, 7 Aug 2015 20:02:28 +0000 (16:02 -0400)]
[runtime] Avoid passing gshared methods to clients of the embedding api.
Ludovic Henry [Fri, 7 Aug 2015 13:52:04 +0000 (09:52 -0400)]
[runtime] Fix missing method at link time
Rolf Bjarne Kvinge [Fri, 7 Aug 2015 08:47:00 +0000 (10:47 +0200)]
Add a conditional for fork and exec* functions.
They're not available on WatchOS.
Zoltan Varga [Fri, 7 Aug 2015 02:15:30 +0000 (22:15 -0400)]
[runtime] Avoid a memory overflow in Buffer.InternalBlockCopy () if the caller passes in a negative value by mistake.
Zoltan Varga [Wed, 5 Aug 2015 04:08:03 +0000 (00:08 -0400)]
[runtime] Remove some dead code.
Ludovic Henry [Thu, 6 Aug 2015 18:58:13 +0000 (14:58 -0400)]
[runtime] Fix memory corruption due to incorrect use of MONO_OBJECT_SETREF
MONO_OBJECT_SETREF would use mono_gc_wbarrier_set_field which would write over 8 bytes ( *(void**)field = value ), while we want to write over 1 byte here.
Dave Dunkin [Thu, 6 Aug 2015 18:55:46 +0000 (11:55 -0700)]
Add UriBuilder test for no hostname.
Martin Potter [Wed, 18 Jul 2012 00:54:33 +0000 (17:54 -0700)]
Uri.ShemeDelimiter should not be used when the host is empty.
João Matos [Thu, 6 Aug 2015 12:22:20 +0000 (13:22 +0100)]
Merge pull request #1966 from angeloc/master
Better handling of vasprintf checking
Angelo Compagnucci [Thu, 6 Aug 2015 07:36:36 +0000 (09:36 +0200)]
Better handling of vasprintf checking
This patch improves the handling of vasprint checking.
It switches the unneeded have_vasprintf variable with the
AC_CHECK_FUNCS defined ac_cv_func_vasprintf one.
Zoltan Varga [Wed, 5 Aug 2015 23:09:39 +0000 (19:09 -0400)]
Merge pull request #1965 from akoeplinger/fix-flaky-test
[System.ServiceModel] Fix flaky Bug652331_2 test
Alexander Köplinger [Wed, 5 Aug 2015 18:09:32 +0000 (20:09 +0200)]
[System.ServiceModel] Fix flaky Bug652331_2 test
The test sometimes failed on Jenkins with the timeout assert. Running only this single test locally
with `make check TESTNAME=System.ServiceModel.Dispatcher.Bug652331Test.Bug652331_2` however reproduced
this almost every single time.
It seems that WCF takes a bit to initialize until it accepts connections, so putting a little sleep
fixed this for me locally and running it in a loop for half an hour didn't assert even once.
João Matos [Wed, 5 Aug 2015 16:49:39 +0000 (17:49 +0100)]
[runtime] Re-enable the soft debugger on x86 without presence of signals.
As of
b76665b8485e45bea13e2694107117877f96c98b the debugger does not rely on signals anymore for stepping.
João Matos [Wed, 5 Aug 2015 16:47:06 +0000 (17:47 +0100)]
[sgen] Do not use Mach OS initialisation if using coop GC.
Ludovic Henry [Tue, 4 Aug 2015 20:40:36 +0000 (16:40 -0400)]
[runtime] Add testing for unhandled exception
Ludovic Henry [Tue, 4 Aug 2015 13:42:41 +0000 (09:42 -0400)]
[runtime] Refactor AsyncResult.Invoke icall and swallow exception on AsyncCallback
The swallowed exception is the behavior we can observe on .NET and Mono 4.0
João Matos [Wed, 5 Aug 2015 11:50:16 +0000 (12:50 +0100)]
Merge pull request #1963 from angeloc/patch-1
Fixing initialization of have_vasprintf
Angelo Compagnucci [Wed, 5 Aug 2015 10:59:45 +0000 (12:59 +0200)]
Fixing initialization of have_vasprintf
This patch initialize properly have_vasprintf in case vasprint function is found.
Solves multiple definition of `vasprintf' error in case vasprint is not properly detected.
Marek Safar [Wed, 5 Aug 2015 08:10:53 +0000 (10:10 +0200)]
[system.net.http] Add special handling for chunked transfer-encoding httpwebrequest initialization. Fixes #31877
Zoltan Varga [Wed, 5 Aug 2015 03:01:56 +0000 (23:01 -0400)]
Fix the build.
Zoltan Varga [Wed, 5 Aug 2015 02:59:12 +0000 (22:59 -0400)]
[sdb] Transition to using sdb trampolines instead of signals for single stepping/breakpoints.
Zoltan Varga [Wed, 5 Aug 2015 02:37:12 +0000 (22:37 -0400)]
[sdb] Improve logging a bit.
Rodrigo Kumpera [Wed, 5 Aug 2015 02:04:29 +0000 (22:04 -0400)]
[runtime] Reenable Frak TLS on OSX
Ludovic Henry [Tue, 4 Aug 2015 22:35:48 +0000 (18:35 -0400)]
[bcl] Remove old ThreadPool managed class
Vlad Brezae [Thu, 22 Jan 2015 21:01:16 +0000 (13:01 -0800)]
[tests] MonoThreadsSync structures are no longer allocated at the first Enter.
Overflow the nest count in order to achieve the same effect.
Vlad Brezae [Tue, 20 Jan 2015 01:53:23 +0000 (17:53 -0800)]
Throw exception when trying to unlock unowned lock.
Vlad Brezae [Mon, 19 Jan 2015 21:51:32 +0000 (13:51 -0800)]
Unmanaged thin lock implementation.
This commit avoids allocation of new MonoThreadsSync structures for the typical cases of shallow nesting of uncontended locks. The necessary information (owner, nest and status bits) is embedded in the synchronisation field of a MonoObject. The lock is inflated when the nest overflows or when there is contention on the lock.
This greatly improves performance (over 10 times) for the case of locking a lock only a few times, due to the inflation avoidance. It also improves performance up to 25% for the case of locking a thin lock. A decrease in performance (up to 3 times slower) can happen for the case of repetitive nesting of a lock, due to the need of a CAS at each entry/exit.
Disable native fastpaths for now, until they are updated to the new implementation.
Merge notes from Rodrigo:
Remove the enter fast paths in monitor.c as the new code already has them.
triton [Tue, 4 Aug 2015 18:16:18 +0000 (19:16 +0100)]
Added mono_runtime_posix_install_handlers stub for WatchOS.
triton [Tue, 4 Aug 2015 18:15:43 +0000 (19:15 +0100)]
Added SGen OS support code stubs for coop backend.
Ludovic Henry [Tue, 4 Aug 2015 13:31:33 +0000 (09:31 -0400)]
Revert "[runtime] Refactor AsyncResult.Invoke internal call"
This reverts commit
e4ce838cd3616876f4f59aa3702a52ab1f5bf2ca.
Ludovic Henry [Tue, 4 Aug 2015 13:31:30 +0000 (09:31 -0400)]
Revert "[runtime] Refactor AsyncResult creation with MonoAsyncCall"
This reverts commit
0e27abd93ae9821bf13257b0aa3d283b4fc6857f.
Ludovic Henry [Tue, 4 Aug 2015 13:31:26 +0000 (09:31 -0400)]
Revert "[runtime] Move AsyncResult.Invoke to managed"
This reverts commit
29b07ab3ad3bc7cea2178035a94dfb61ddf6bb4a.
Marek Safar [Tue, 4 Aug 2015 13:26:50 +0000 (15:26 +0200)]
[mcs] Cached labels definite assignment check does not need exact match but anything larger than original set satisfies the condition. Fixes #32732
Marek Safar [Tue, 4 Aug 2015 11:00:41 +0000 (13:00 +0200)]
[mcs] Special case return expression of Task<Task> in async block. Fixes #32712
Zoltan Varga [Tue, 4 Aug 2015 02:07:40 +0000 (22:07 -0400)]
[llvm] Use the default code model on amd64, the 'large' code model leads to problems since the runtime doesn't support thunks on amd64.
Zoltan Varga [Mon, 3 Aug 2015 22:51:54 +0000 (18:51 -0400)]
[jit] Remove monitor enter/exit trampolines, their performance is similar to calling the icalls directly, so its not worth the complexity.
Zoltan Varga [Mon, 3 Aug 2015 22:35:42 +0000 (18:35 -0400)]
[runtime] Add a separate icall for Monitor.Enter(obj,&bool).
Zoltan Varga [Mon, 3 Aug 2015 22:20:24 +0000 (18:20 -0400)]
[runtime] Add fastpaths to the Monitor.Enter () methods.
Rodrigo Kumpera [Mon, 3 Aug 2015 21:37:54 +0000 (17:37 -0400)]
Merge pull request #1912 from ludovic-henry/threadpool-managed-asyncresult
[runtime] Move AsyncResult.Invoke to managed
Ludovic Henry [Mon, 3 Aug 2015 18:47:11 +0000 (14:47 -0400)]
[runtime] Move AsyncResult.Invoke to managed
Alexander Köplinger [Mon, 3 Aug 2015 19:24:25 +0000 (21:24 +0200)]
[System] Increase timeout of a test in SslStreamTest
The AuthenticateClientAndServer_ClientSendsNoData test sometimes failed on Jenkins,
but the 2s timeout is pretty short (it takes about 0.5s on my fast machine as well).
Increasing it to 5s should allow the test to work on the slower Jenkins machines as well.
Ludovic Henry [Mon, 3 Aug 2015 16:40:27 +0000 (12:40 -0400)]
[runtime] Refactor AsyncResult creation with MonoAsyncCall
Ludovic Henry [Mon, 3 Aug 2015 16:24:31 +0000 (12:24 -0400)]
[runtime] Refactor AsyncResult.Invoke internal call
Instead of catching the exception and rethrowin it right away, we do not catch it. This simplifies the code, and will give us more insight into the underlying exception.
Also merge mono_async_result_invoke into ves_icall_System_Runtime_Remoting_Messaging_AsyncResult_Invoke as it is the only place we use it.
Zoltan Varga [Mon, 3 Aug 2015 16:20:41 +0000 (12:20 -0400)]
Merge pull request #1959 from alexrp/master
Fix atomic_add_i4 on PPC
Zoltan Varga [Mon, 3 Aug 2015 16:01:46 +0000 (12:01 -0400)]
Merge pull request #1958 from rolfbjarne/aot-error-reporting
[aot] use g_error instead of fprintf + exit(1).
Alex Rønne Petersen [Mon, 3 Aug 2015 15:32:31 +0000 (17:32 +0200)]
[ppc] Fix atomic_add_i4 support for 32-bit PPC.
Alex Rønne Petersen [Mon, 3 Aug 2015 15:32:07 +0000 (17:32 +0200)]
[ppc] Instruction length of atomic_add_i4 is 28.
Rolf Bjarne Kvinge [Mon, 3 Aug 2015 14:02:18 +0000 (16:02 +0200)]
[aot] use g_error instead of fprintf + exit(1).
printfs don't always show up in the iOS device log, and exit(1) does
not create a crash report, making these conditions hard to debug
(all you get is "app X exited with code 1", and then you need to
attach a native debugger and break on 'exit' to figure out more).
g_error will end up producing output using NSLog (which always
shows up in the device log), and a crash report as well, making
debugging a lot easier.
Zoltan Varga [Mon, 3 Aug 2015 04:05:12 +0000 (00:05 -0400)]
[llvm] Reenable the 'handler without invokes' llvm restriction, it causes llvm to eliminate the handler, causing finally_block_ending_in_dead_bb.exe to fail on amd64.
Zoltan Varga [Mon, 3 Aug 2015 04:04:23 +0000 (00:04 -0400)]
Revert "[runtime] Disable finally_block_ending_in_dead_bb.exe on wrench, it fails with llvm."
This reverts commit
7b7692a988f82e71c575e2c75b9293d8bef9ffe7.
Revert this as its not needed.