Alexander Köplinger [Tue, 5 Apr 2016 13:04:31 +0000 (15:04 +0200)]
Merge pull request #2831 from razzfazz/fix_dllimport
clean up DllImport attributes
Marek Safar [Tue, 5 Apr 2016 11:38:36 +0000 (13:38 +0200)]
[System] Always pass -noconfig to codedom c# compiler
Alexander Köplinger [Tue, 5 Apr 2016 11:19:25 +0000 (13:19 +0200)]
[build] Exclude generated .g.cs files from "make dist"
The recent changes to the mobile profiles introduced generated files in their .sources like CommonCrypto/MD5CryptoServiceProvider.g.cs
However, those are not generated when the mobile profiles aren't enabled at configure time.
This caused a problem during "make dist" since it tries to grab the entries in .sources from *all* profiles, causing errors like:
cp: cannot stat ‘CommonCrypto/MD5CryptoServiceProvider.g.cs’: No such file or directory
make[5]: *** [dist-local] Error 1
The easiest fix is to filter out those generated files.
Daniel Becker [Tue, 5 Apr 2016 07:35:21 +0000 (00:35 -0700)]
clean up DllImport attributes
Any native function that can modify errno should have the
SetLastError attribute set to true. Also, no need to specify
EntryPoint if it's the same as the function name.
Zoltan Varga [Mon, 4 Apr 2016 23:13:33 +0000 (19:13 -0400)]
[runtime] Allow the options in MONO_DEBUG to be passed as a command line option too.
Zoltan Varga [Mon, 4 Apr 2016 23:02:56 +0000 (19:02 -0400)]
[llvm] Enable pinvoke call using the C calling conv in llvm-only mode.
Zoltan Varga [Mon, 4 Apr 2016 22:20:49 +0000 (18:20 -0400)]
[corlib] Make some ExceptionDispatchInfo tests with BitcodeNotWorking because we don't truncate stack traces of exceptions at the catch site when running with bitcode.
Rodrigo Kumpera [Mon, 4 Apr 2016 21:24:52 +0000 (17:24 -0400)]
Merge pull request #2827 from xmcclure/profile-clean-0.1
Continued profiler loading cleanup (PR#2816 follow up)
monojenkins [Mon, 4 Apr 2016 20:11:31 +0000 (21:11 +0100)]
Merge pull request #2545 from ermshiperete/Xamarin-24974
[corlib] Fix exception in __ComObject finalizer during shutdown
* keep a reference to a __ComObject's proxy so it doesn't get garbage
collected
* don't create __ComObjects unnecessarily
* Fix for bug [24974](https://bugzilla.xamarin.com/show_bug.cgi?id=24974)
Marek Safar [Mon, 4 Apr 2016 15:30:08 +0000 (17:30 +0200)]
[build] Update nunit-console path for xbuild profiles
Marek Safar [Mon, 4 Apr 2016 15:25:22 +0000 (17:25 +0200)]
[Microsoft.Build.Engine] Update test files
Marek Safar [Mon, 4 Apr 2016 15:03:47 +0000 (17:03 +0200)]
[mcs] Make more errors build explicit
Marek Safar [Mon, 4 Apr 2016 14:40:22 +0000 (16:40 +0200)]
[System.Runtime.Serialization.dll] Update referencesource strings
Marek Safar [Mon, 4 Apr 2016 13:37:32 +0000 (15:37 +0200)]
[tools] Update missing reference
Alexander Köplinger [Mon, 4 Apr 2016 14:34:20 +0000 (16:34 +0200)]
Fix make dist
Alexander Köplinger [Mon, 4 Apr 2016 13:34:24 +0000 (15:34 +0200)]
[test-runner] Ignore exceptions during process kill
We hit this on Jenkins over the weekend:
https://jenkins.mono-project.com/job/test-mono-mainline/label=osx-amd64/3845/parsed_console/log_content.html#WARNING1
```
Unhandled Exception:
System.InvalidOperationException: Cannot process request because the process (51792) has exited.
at System.Diagnostics.Process.GetProcessHandle (Int32 access, Boolean throwIfExited) <0x10d7ea000 + 0x001b6> in <filename unknown>:0
at System.Diagnostics.Process.GetProcessHandle (Int32 access) <0x10d7f2fd0 + 0x0001e> in <filename unknown>:0
at System.Diagnostics.Process.Kill () <0x10d7f2ee0 + 0x00031> in <filename unknown>:0
at (wrapper remoting-invoke-with-check) System.Diagnostics.Process:Kill ()
at TestRunner+<Main>c__AnonStorey0.<>m__0 () <0x10a9b50b0 + 0x00e30> in <filename unknown>:0
at System.Threading.ThreadHelper.ThreadStart_Context (System.Object state) <0x10c55bc90 + 0x0009a> in <filename unknown>:0
at System.Threading.ExecutionContext.RunInternal (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, Boolean preserveSyncCtx) <0x10c55a210 + 0x001c6> in <filename unknown>:0
at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, Boolean preserveSyncCtx) <0x10c55a1e0 + 0x00020> in <filename unknown>:0
at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state) <0x10c55a130 + 0x00059> in <filename unknown>:0
at System.Threading.ThreadHelper.ThreadStart () <0x10c55be50 + 0x0002e> in <filename unknown>:0
[ERROR] FATAL UNHANDLED EXCEPTION: System.InvalidOperationException: Cannot process request because the process (51792) has exited.
at System.Diagnostics.Process.GetProcessHandle (Int32 access, Boolean throwIfExited) <0x10d7ea000 + 0x001b6> in <filename unknown>:0
at System.Diagnostics.Process.GetProcessHandle (Int32 access) <0x10d7f2fd0 + 0x0001e> in <filename unknown>:0
at System.Diagnostics.Process.Kill () <0x10d7f2ee0 + 0x00031> in <filename unknown>:0
at (wrapper remoting-invoke-with-check) System.Diagnostics.Process:Kill ()
at TestRunner+<Main>c__AnonStorey0.<>m__0 () <0x10a9b50b0 + 0x00e30> in <filename unknown>:0
at System.Threading.ThreadHelper.ThreadStart_Context (System.Object state) <0x10c55bc90 + 0x0009a> in <filename unknown>:0
at System.Threading.ExecutionContext.RunInternal (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, Boolean preserveSyncCtx) <0x10c55a210 + 0x001c6> in <filename unknown>:0
at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, Boolean preserveSyncCtx) <0x10c55a1e0 + 0x00020> in <filename unknown>:0
at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state) <0x10c55a130 + 0x00059> in <filename unknown>:0
at System.Threading.ThreadHelper.ThreadStart () <0x10c55be50 + 0x0002e> in <filename unknown>:0
make[1]: *** [test-generic-sharing-managed] Error 1
```
We can't do anything about those errors, so just catch and ignore it.
Marek Safar [Mon, 4 Apr 2016 13:23:06 +0000 (15:23 +0200)]
[build] Update mcs path in mini tests
Marek Safar [Mon, 4 Apr 2016 12:40:56 +0000 (14:40 +0200)]
[Facades] Update list of full assemblies
Marek Safar [Mon, 4 Apr 2016 12:12:51 +0000 (14:12 +0200)]
[mcs] Basic boostrap references are always default ones
Marek Safar [Mon, 4 Apr 2016 12:02:10 +0000 (14:02 +0200)]
Marek Safar [Mon, 4 Apr 2016 12:01:02 +0000 (14:01 +0200)]
[Microsoft.Build.Engine] clean/copy mdb files as well
Marek Safar [Mon, 4 Apr 2016 11:42:47 +0000 (13:42 +0200)]
[build] Change the way how mcs references are passed to compiler to always use full path.
One of csc prerequisites because csc uses -lib as path which is considered after
RuntimeEnvironment.GetRuntimeDirectory which makes -lib useless
Marek Safar [Sun, 3 Apr 2016 18:26:33 +0000 (20:26 +0200)]
[System.Runtime.Serialization.Formatters.Soap] Make test output deterministic
Marek Safar [Sun, 3 Apr 2016 18:12:41 +0000 (20:12 +0200)]
[Mono.C5] Make test output deterministic
Ludovic Henry [Mon, 4 Apr 2016 10:15:08 +0000 (11:15 +0100)]
Merge pull request #2713 from gregoryyoung/master
handles AwaitAsync finishing synchronously
Zoltan Varga [Sun, 3 Apr 2016 01:02:50 +0000 (21:02 -0400)]
[amd64] Add a separate ArgStorage entry for gsharedvt return types instead of using a separate flag in CallInfo.
Alexander Köplinger [Sun, 3 Apr 2016 00:56:29 +0000 (02:56 +0200)]
[acceptance-tests] Fix test-runner.exe compilation after 136dd0
monojenkins [Sat, 2 Apr 2016 15:50:31 +0000 (16:50 +0100)]
Merge pull request #2720 from mono/fix-39325
[Profiler] Keep a reference to assemblies while coverage is running
In certain circumstances, for example when running under nunit-console, assemblies could be unloaded while the profiler still had a reference to them in order to generate the coverage data. In these cases, the memory referred to by the profiler would be invalid and would crash.
Fix this by incrementing the reference count of the assemblies preventing them from being unloaded while coverage is being collected.
Fixes BXC #39325
Zoltan Varga [Sat, 2 Apr 2016 06:32:04 +0000 (02:32 -0400)]
[runtime] Move the test for shutting down the stat profiler to mini_cleanup ().
Zoltan Varga [Sat, 2 Apr 2016 05:38:43 +0000 (01:38 -0400)]
[arm64] Fix the generation of static rgctx trampolines when using aot on linux.
Zoltan Varga [Sat, 2 Apr 2016 05:27:27 +0000 (01:27 -0400)]
[arm64] Implement handler block guard trampolines.
Zoltan Varga [Sat, 2 Apr 2016 05:23:35 +0000 (01:23 -0400)]
[runtime] Fix a crash when shutting down the sampling thread.
Zoltan Varga [Sat, 2 Apr 2016 02:36:15 +0000 (22:36 -0400)]
[tests] Increase the timeout in the test runner so running tests with llvm doesn't time out.
Alexander Köplinger [Sat, 2 Apr 2016 01:56:01 +0000 (18:56 -0700)]
[metadata] Remove invalid Win32 entry in object-offsets.h
The lmf_addr field in MonoLMF only exists for TARGET_X86.
Alexander Köplinger [Sat, 2 Apr 2016 01:53:22 +0000 (18:53 -0700)]
[mini] Remove duplicate stubs from tramp-amd64/x86-gsharedvt.c
They already exist in arch-stubs.c and caused conflicts on the MSVC build.
Alexander Köplinger [Sat, 2 Apr 2016 01:17:39 +0000 (18:17 -0700)]
[msvc] Add missing files to MSVC project files
Alex Rønne Petersen [Fri, 1 Apr 2016 20:25:10 +0000 (22:25 +0200)]
[mini] Fix build on systems without clock_nanosleep ().
Rodrigo Kumpera [Fri, 1 Apr 2016 20:15:41 +0000 (13:15 -0700)]
[jit] Handle verification failing with InvalidProgramException. Fixes #40040.
Zoltan Varga [Fri, 1 Apr 2016 20:12:23 +0000 (16:12 -0400)]
[runtime] Make a copy of the types passed to mono_mb_add_local () earlier since they could be transient.
Zoltan Varga [Fri, 1 Apr 2016 20:03:20 +0000 (16:03 -0400)]
[arm64] Fix clearing of stack traces when an exception is rethrown. Fix the calculation of struct sizes in pinvoke calls. Remove some dead code.
Andi McClure [Fri, 1 Apr 2016 19:39:38 +0000 (15:39 -0400)]
Continued profiler loading cleanup (PR#2816 follow up)
- Back out MONO_PROFILER_LIB_DIR change
- Profiler loading traces should use log mask “dll” not “asm”
- mono_dl_open_runtime_lib should preempt standard paths when loading
profiler
- mono_dl_open_runtime_lib should check in profiler library directory
- mono_dl_open_runtime_lib contained a memory leak
- With above changes, ptestrunner.pl can remove some environment
massaging
Rodrigo Kumpera [Fri, 1 Apr 2016 18:19:24 +0000 (11:19 -0700)]
Merge pull request #2825 from kumpera/loader_error_removal
GOOD RIDDANCE LOADER ERROR
Alexander Köplinger [Fri, 1 Apr 2016 13:08:50 +0000 (15:08 +0200)]
Merge pull request #2826 from mattleibow/mono.options-update
[Mono.Options] Added support for Enums in the PCL version
Alexander Köplinger [Fri, 1 Apr 2016 12:11:03 +0000 (14:11 +0200)]
[System.Web.Extensions] Add test for last fix
Jussi Sainio [Fri, 6 Jun 2014 12:54:21 +0000 (15:54 +0300)]
[System.Web.Extensions] Use CultureInfo.InvariantCulture for number parsing
Fixes #4242, see bug comments. JsonSerializer seems to have been already
fixed in
abe9dc62. The JsonDeserializer number conversion is now much
stricter, allowing only integer number style for integers and float number
style for floats.
monojenkins [Fri, 1 Apr 2016 07:00:18 +0000 (08:00 +0100)]
Merge pull request #2805 from alexrp/profiler-sampling-thread2
[profiler] Use a background thread to send out sampling signals.
Previously, when using an interval timer, the initial profiling signal could be
delivered to *any* thread in the process. This is not normally a problem, but
if the signaled thread has not even finished its initialization inside libc, it
can happen that it hasn't even set up thread-local storage yet. We then blow up
spectacularly when trying to back up errno in the SIGPROF signal handler, as
it's a TLS variable. Even the SIGSEGV handler blows up immediately after as it
can't access JIT TLS data.
Since there appears to be no reliable and portable way for a library like Mono
to control which exact thread gets the initial timer signal, instead switch to
using a background thread that uses a high-resolution sleep and attempts to
switch itself to real time scheduling if possible. This way, we have full
control over which threads we send SIGPROF to, letting us avoid any threads
which aren't in a 'good' state for profiling.
This commit also gets rid of the multiplexing that was going on in the SIGPROF
signal handler, since we now send out the signals from a background thread. As
this was the only use of the async job API, that API has been removed. This
indirectly fixes the signal storming issue that sometimes popped up, where for
some reason multiple threads would think that they're the initiating thread,
resulting in way too many signals going out.
A nice side-effect of doing the signaling ourselves is that we can now use
real-time signals on systems that have them (e.g. Linux), resulting in a nearly
100% signal delivery rate in all cases. Previously, we would lose a tremendous
amount of signals when an application was under heavy load.
Zoltan Varga [Fri, 1 Apr 2016 04:27:48 +0000 (00:27 -0400)]
[arm64] Implement interruption checking in the trampoline code.
Matthew Leibowitz [Fri, 1 Apr 2016 03:13:46 +0000 (05:13 +0200)]
[Mono.Options] Added support for Enums in the PCL version
- Support for String to Enum
- Support for Number to Enum
- Support for Flags to Enum
- Added a UnitTest
Alex Rønne Petersen [Sun, 20 Mar 2016 02:08:42 +0000 (03:08 +0100)]
[profiler] Use a background thread to send out sampling signals.
Previously, when using an interval timer, the initial profiling signal could be
delivered to *any* thread in the process. This is not normally a problem, but
if the signaled thread has not even finished its initialization inside libc, it
can happen that it hasn't even set up thread-local storage yet. We then blow up
spectacularly when trying to back up errno in the SIGPROF signal handler, as
it's a TLS variable. Even the SIGSEGV handler blows up immediately after as it
can't access JIT TLS data.
Since there appears to be no reliable and portable way for a library like Mono
to control which exact thread gets the initial timer signal, instead switch to
using a background thread that uses a high-resolution sleep and attempts to
switch itself to real time scheduling if possible. This way, we have full
control over which threads we send SIGPROF to, letting us avoid any threads
which aren't in a 'good' state for profiling.
This commit also gets rid of the multiplexing that was going on in the SIGPROF
signal handler, since we now send out the signals from a background thread. As
this was the only use of the async job API, that API has been removed. This
indirectly fixes the signal storming issue that sometimes popped up, where for
some reason multiple threads would think that they're the initiating thread,
resulting in way too many signals going out.
A nice side-effect of doing the signaling ourselves is that we can now use
real-time signals on systems that have them (e.g. Linux), resulting in a nearly
100% signal delivery rate in all cases. Previously, we would lose a tremendous
amount of signals when an application was under heavy load.
Alexander Köplinger [Fri, 1 Apr 2016 00:34:44 +0000 (02:34 +0200)]
[Mono.Security] Remove leftover .sources files
Rodrigo Kumpera [Fri, 1 Apr 2016 00:23:26 +0000 (17:23 -0700)]
[runtime] Remove mono_loader_clear_error, mono_loader_assert_no_error and set_failure_from_loader_error. The loader error is no more.
Rodrigo Kumpera [Fri, 1 Apr 2016 00:09:56 +0000 (17:09 -0700)]
[runtime] Remove mono_loader_get_last_error, nothing produces loader errors anymore.
Rodrigo Kumpera [Thu, 31 Mar 2016 23:39:00 +0000 (16:39 -0700)]
[runtime] Remove mono_loader_error_prepare_exception, nothing can produce loader errors anymore.
Rodrigo Kumpera [Thu, 31 Mar 2016 23:10:57 +0000 (16:10 -0700)]
[runtime] Remove all functions that set the loader error. It's dead code now.
Rodrigo Kumpera [Thu, 31 Mar 2016 22:53:33 +0000 (15:53 -0700)]
[mono-error] Remove mono_loader_set_error_from_mono_error, nothing uses it.
Rodrigo Kumpera [Thu, 31 Mar 2016 22:44:37 +0000 (15:44 -0700)]
[mono-error] Since nothing sets the loader error anymore, mono_error_set_from_loader_error can be removed.
Zoltan Varga [Thu, 31 Mar 2016 22:28:47 +0000 (18:28 -0400)]
Fix warnings/remove dead code.
Zoltan Varga [Thu, 31 Mar 2016 22:21:59 +0000 (18:21 -0400)]
Fix a warning.
Zoltan Varga [Thu, 31 Mar 2016 22:18:48 +0000 (18:18 -0400)]
[runtime] Fix the arm linux build by using the fallback InterlockedCompareExchange64 () implementation for now.
Zoltan Varga [Thu, 31 Mar 2016 22:12:19 +0000 (18:12 -0400)]
[runtime] Fix some warnings/remove dead code.
Alexander Köplinger [Thu, 31 Mar 2016 22:08:31 +0000 (00:08 +0200)]
[corlib] Ensure newline in .sources file
It causes build issues on .sources with #include on Linux otherwise.
Alexander Köplinger [Thu, 31 Mar 2016 22:02:04 +0000 (00:02 +0200)]
[corlib] Fix monotouch_tv_runtime and monotouch_watch_runtime build
Martin Baulig [Thu, 24 Mar 2016 00:53:41 +0000 (20:53 -0400)]
Update X509CertificateImplApple to reflect latest X509CertificateImpl changes.
(cherry picked from commit
2fdfbe3479b0d3d24a5471ed7032eede80e58a2d)
Aleksey Kliger [Thu, 31 Mar 2016 21:26:19 +0000 (17:26 -0400)]
[reflection] Fix leak in mono_reflection_get_custom_attrs_{by_type,data_checked}
If there's an error, first call mono_custom_attrs_free, then deal with
the error.
Aleksey Kliger [Thu, 31 Mar 2016 21:25:28 +0000 (17:25 -0400)]
[security-core-clr] Fixup function signature to match header
mono_security_core_clr_ensure_reflection_access_method should return a
boolean now.
monojenkins [Thu, 31 Mar 2016 19:05:17 +0000 (20:05 +0100)]
Merge pull request #2816 from xmcclure/profile-clean-0
Various cleanups on profiler
3 commits:
Assist on profiler module loading
- Add a MONO_PROFILER_LIB_DIR from which profiler modules are
dynamically loading, in case it is not the normal library path
- Add information about profiler loading to mono_trace
Comments and clarity in proflog.c
- Add comments on structures
- Rename 'data' and 'data_end' to 'cursor' and 'buf_end' in LogBuffer/StatsBuffer as the old names were confusing
- Add new assert when processing samples
Improve a safety check when writing data into StatBuffer
- The safety check should occur such that if the new value for
StatBuffer::cursor is beyond the bounds of the StatBuffer, the cursor
is not updated.
monojenkins [Thu, 31 Mar 2016 19:00:19 +0000 (20:00 +0100)]
Merge pull request #2810 from kumpera/fix_hazard_free
Fix hazard free
Replace usage of mono_thread_hazardous_free_or_queue and remove it.
mono_thread_hazardous_free_or_queue has a fundamentally broken design.
It allows arbitrary free code to run in the context of its caller.
The sync/async split on where it's called is not enough to know whether
we can run free'ing code or not.
Since in sync context we called free functions that could take locks,
it happened that those locks conflicted with the ones already taken.
In particular, mono_jit_info_table_free did take a domain lock and
quite a few of the sync context calls would hold locks that must
not be held when taking a domain lock.
This, is practice, means that we'd need to partition the free calls
into 3 groups: async context, reentrant context (no runtime locks held)
and sync context (maybe some locks held).
There was no case where reentrant context would be usable meaning,
in practice, that all calls happens in what effectively is async context
where free functions can't be called.
The new design is a lot more straightforward:
- No implicit free queue pumping
- A pair of free functions with well defined behavior.
mono_thread_hazardous_try_free - to be used where the caller expects the free function to be called
mono_thread_hazardous_queue_free - to be used where the caller don't expect the free function to be called [1]
- Explicit pumping on places that known to be ok
Thread detach
Finalizer thread
[1] This might sound like a weird condition, but a lot of lock-free code
have compensation logic that trigger free'ing during lookups.
Zoltan Varga [Thu, 31 Mar 2016 18:12:05 +0000 (14:12 -0400)]
Fix warnings.
Zoltan Varga [Thu, 31 Mar 2016 17:42:49 +0000 (13:42 -0400)]
[gsharedvt] Change the --enable-gsharedvt configure option to a no-op, its always enabled by default.
Zoltan Varga [Thu, 31 Mar 2016 17:37:02 +0000 (13:37 -0400)]
[gsharedvt] Integrate mini-generic-sharing-gsharedvt.c into mini-generic-sharing.c.
Aleksey Kliger [Thu, 31 Mar 2016 17:32:19 +0000 (13:32 -0400)]
[runtime] Use mono_object_isinst_checked
rather than mono_object_isinst.
Zoltan Varga [Thu, 31 Mar 2016 17:24:48 +0000 (13:24 -0400)]
[arm64] Fix passing of small gsharedvt argument on the stack on ios. Fixes #39528.
Zoltan Varga [Thu, 31 Mar 2016 17:18:26 +0000 (13:18 -0400)]
Merge pull request #2820 from kumpera/license-change-rebased
Change license and publish xamarin mono extensions
Rodrigo Kumpera [Thu, 31 Mar 2016 16:18:04 +0000 (09:18 -0700)]
Update COPYING.LIB
Rodrigo Kumpera [Thu, 31 Mar 2016 16:12:22 +0000 (09:12 -0700)]
[utils] Fix the build.
monojenkins [Thu, 31 Mar 2016 16:05:56 +0000 (17:05 +0100)]
Merge pull request #2394 from Mailaender/patch-1
Fixed runtime dependency on libgdiplus with developer soname
Fixes https://bugzilla.xamarin.com/show_bug.cgi?id=34314.
hannakim123 [Wed, 30 Mar 2016 22:15:37 +0000 (15:15 -0700)]
Update trademark
Miguel de Icaza [Thu, 31 Mar 2016 01:24:09 +0000 (18:24 -0700)]
Merge pull request #1 from xamarin/hannakim123-patch-1
Update for CLA
Rodrigo Kumpera [Thu, 31 Mar 2016 00:38:43 +0000 (17:38 -0700)]
[runtime] Cycle the finalizer thread if there are too many outstanding hazard pointers to free.
We add a callback to the HP so the GC can monitor the queue size and act on it.
The queue size was picked to keep the overhead limited even under high load.
iain holmes [Wed, 30 Mar 2016 23:23:58 +0000 (00:23 +0100)]
[Profiler] Use the correct function to increment the refcount
Alexander Köplinger [Wed, 30 Mar 2016 22:36:57 +0000 (00:36 +0200)]
Merge pull request #2807 from akoeplinger/gchandle
[corlib] Two small fixes for GCHandle
monojenkins [Wed, 30 Mar 2016 21:11:01 +0000 (22:11 +0100)]
Merge pull request #2786 from alexanderkyte/leaked_type_in_parse_header
[runtime] Free leaked short-lived MonoType
Andi McClure [Wed, 30 Mar 2016 21:09:08 +0000 (17:09 -0400)]
Improve a safety check when writing data into StatBuffer
The safety check should occur such that if the new value for
StatBuffer::cursor is beyond the bounds of the StatBuffer, the cursor
is not updated.
Andi McClure [Thu, 31 Mar 2016 16:34:08 +0000 (12:34 -0400)]
Comments and clarity in proflog.c
- Add comments on structures
- Rename 'data' and 'data_end' to 'cursor' and 'buf_end' in
LogBuffer/StatsBuffer as the old names were confusing
- Add new assert when processing samples
Andi McClure [Thu, 31 Mar 2016 15:02:21 +0000 (11:02 -0400)]
Assist on profiler module loading
- Add a MONO_PROFILER_LIB_DIR from which custom profilers are
dynamically loaded, in case it is not the normal library path
- Modify mono/profiler make check to use MONO_PROFILER_LIB_DIR
(this fixes a bug where it would sometimes load the wrong profiler)
- Add information about profiler loading to mono_trace
Vlad Brezae [Wed, 30 Mar 2016 19:54:57 +0000 (02:54 +0700)]
Merge pull request #2799 from BrzVlad/fix-conc-card-clean
[sgen] Fix concurrent card clean
monojenkins [Wed, 30 Mar 2016 19:25:17 +0000 (20:25 +0100)]
Merge pull request #2808 from lambdageek/dev/monoerror-security-core-clr
[security-core-clr] Use MonoError outarg instead of mono_raise_exception
Zoltan Varga [Wed, 30 Mar 2016 19:13:02 +0000 (15:13 -0400)]
Merge pull request #2812 from madewokherd/threadpool-ms-rand
[threadpool-ms] Fix incorrect use of mono_rand.
Vincent Povirk [Wed, 30 Mar 2016 16:16:12 +0000 (11:16 -0500)]
[threadpool-ms] Fix incorrect use of mono_rand.
This takes a pointer to an RNG handle, not the handle itself.
Marcos Henrich [Wed, 30 Mar 2016 10:57:56 +0000 (11:57 +0100)]
Merge pull request #2698 from esdrubal/iosxmlarray
[System.Runtime.Serialization] Static writer fix.
Marcos Henrich [Wed, 30 Mar 2016 07:55:15 +0000 (08:55 +0100)]
Merge pull request #2763 from esdrubal/mono-symbolicate-standalone2
Mono-symbolicate standalone
Marcos Henrich [Wed, 30 Mar 2016 07:37:40 +0000 (08:37 +0100)]
Merge pull request #2787 from esdrubal/endpointaddress10
[System.ServiceModel] Fixes reflection call to undefined method
Rodrigo Kumpera [Wed, 30 Mar 2016 00:15:24 +0000 (17:15 -0700)]
Merge pull request #2781 from alexanderkyte/inflated_method_header_leak
[runtime] Fix leaking of inflated method headers
hannakim123 [Tue, 29 Mar 2016 23:07:39 +0000 (16:07 -0700)]
Update CONTRIBUTING.md
Rodrigo Kumpera [Tue, 29 Mar 2016 22:25:07 +0000 (15:25 -0700)]
[sgen] Don't pump the hazard free queue from sgen, the finalizer thread does it now.
Rodrigo Kumpera [Tue, 29 Mar 2016 22:09:49 +0000 (15:09 -0700)]
[utils] Replace usage of mono_thread_hazardous_free_or_queue and remove it.
mono_thread_hazardous_free_or_queue has a fundamentally broken design.
It allows arbitrary free code to run in the context of its caller.
The sync/async split on where it's called is not enough to know whether
we can run free'ing code or not.
Since in sync context we called free functions that could take locks,
it happened that those locks conflicted with the ones already taken.
In particular, mono_jit_info_table_free did take a domain lock and
quite a few of the sync context calls would hold locks that must
not be held when taking a domain lock.
This, is practice, means that we'd need to partition the free calls
into 3 groups: async context, reentrant context (no runtime locks held)
and sync context (maybe some locks held).
There was no case where reentrant context would be usable meaning,
in practice, that all calls happens in what effectively is async context
where free functions can't be called.
The new design is a lot more straightforward:
- No implicit free queue pumping
- A pair of free functions with well defined behavior.
mono_thread_hazardous_try_free - to be used where the caller expects the free function to be called
mono_thread_hazardous_queue_free - to be used where the caller don't expect the free function to be called [1]
- Explicit pumping on places that known to be ok
Thread detach
Finalizer thread
[1] This might sound like a weird condition, but a lot of lock-free code
have compensation logic that trigger free'ing during lookups.
Aleksey Kliger [Tue, 29 Mar 2016 20:23:19 +0000 (16:23 -0400)]
[security-core-clr] Add MonoError arg to
mono_security_core_clr_ensure_delegate_creation
Aleksey Kliger [Tue, 29 Mar 2016 19:58:12 +0000 (15:58 -0400)]
[security-core-clr] Add MonoError arg to mono_security_core_clr_ensure_reflection_access_method
Aleksey Kliger [Tue, 29 Mar 2016 19:43:45 +0000 (15:43 -0400)]
[security-core-clr] Add MonoError to mono_security_core_clr_ensure_reflection_access_field
monojenkins [Tue, 29 Mar 2016 20:01:05 +0000 (21:01 +0100)]
Merge pull request #1718 from madewokherd/sgenthreadcleanup
[sgen] Clean up thread pool on shutdown.
Keeping threads around can cause processes to keep running when they shouldn't, particularly on Windows when the entry point returns.
(The reason this is important for me is that Wine provides _CorExeMain, which is an entry point that does return, unlike normal compiled C programs which appear to call exit() after main() returns. A Windows process doesn't exit until ALL threads have exited, so a thread that never exits means a hung process.)
It doesn't seem like we have other GC-specific cleanup code, so I don't know if this is a good approach. Feedback on that question would be appreciated.