Ludovic Henry [Thu, 30 Jun 2016 10:05:56 +0000 (12:05 +0200)]
[io-layer] Make _wapi_global_signal_handle definition private
Ludovic Henry [Mon, 27 Jun 2016 12:37:12 +0000 (14:37 +0200)]
[io-layer] Make _WapiHandleUnshared definition private
Ludovic Henry [Mon, 27 Jun 2016 10:37:52 +0000 (12:37 +0200)]
[io-layer] Factor Mutex and NamedMutex code
Ludovic Henry [Fri, 24 Jun 2016 22:18:33 +0000 (00:18 +0200)]
[io-layer] Factor Semaphore and NamedSemaphore code
Ludovic Henry [Fri, 24 Jun 2016 19:21:46 +0000 (21:21 +0200)]
[io-layer] Factor Event and NamedEvent code
Ludovic Henry [Fri, 24 Jun 2016 18:50:50 +0000 (20:50 +0200)]
[io-layer] Make named handle use their equivalent non-named handle
Alexander Köplinger [Tue, 12 Jul 2016 08:48:23 +0000 (10:48 +0200)]
Merge pull request #3267 from lateralusX/jlorenss/fix-win-build-missing-exports
Fix windows build issue due to missing export in def files.
lateralusX [Tue, 12 Jul 2016 07:24:38 +0000 (09:24 +0200)]
Fix windows build issue due to missing export in def files.
Zoltan Varga [Tue, 12 Jul 2016 03:46:01 +0000 (23:46 -0400)]
[runtime] Make mono_thread_resume_interruption () work during shutdown as well by checking for ThreadState_StopRequested as well. Hopefully fixes #41644.
Andi McClure [Mon, 11 Jul 2016 21:51:56 +0000 (17:51 -0400)]
Defer bridge processor init until after sgen init (bug 42469)
mono_gc_register_bridge_callbacks is a function which the android implementation calls before initializing the runtime. One of the things this function previously did was initialize the default bridge processor if none has been initialized yet. However, because the function gets called before initializing the runtime, a bridge processor was never initialized. This lead to two bad effects:
- If a bridge processor was ever manually specified, the bridge processor would get initialized twice
- Tarjan crashes if initialized before sgen, so when Tarjan became the default bridge processor Android always crashed on launch
The default bridge processor is now initialized at the end of sgen_gc_init.
Andi McClure [Mon, 11 Jul 2016 21:51:36 +0000 (17:51 -0400)]
More verbose error message when sgen_register_fixed_internal_mem_type fails
Aleksey Kliger [Mon, 11 Jul 2016 20:16:33 +0000 (16:16 -0400)]
Fix Windows build
Rodrigo Kumpera [Mon, 11 Jul 2016 17:23:06 +0000 (13:23 -0400)]
[runtime] Add mono_set_allocator_vtable which expose the eglib alloc vtable functionality.
Dolphin Hawkins [Tue, 5 Jul 2016 20:49:05 +0000 (13:49 -0700)]
Fixed up configure overridable allocators option. Moved g_vasprintf implementation to gstr which forwards to the system vasprintf when appropriate
Dolphin Hawkins [Wed, 22 Jun 2016 21:31:05 +0000 (14:31 -0700)]
Fixed eglib test build error
Dolphin Hawkins [Wed, 22 Jun 2016 21:21:46 +0000 (14:21 -0700)]
fixed formatting error
Dolphin Hawkins [Wed, 22 Jun 2016 16:49:12 +0000 (09:49 -0700)]
Enabled g_mem_set_vtable through the configure option --with-overridable-allocators and exposed through mono_set_allocator_vtable
Alexander Köplinger [Mon, 11 Jul 2016 10:10:00 +0000 (12:10 +0200)]
[eglib] Fix Windows build
Alexander Köplinger [Mon, 11 Jul 2016 09:31:29 +0000 (11:31 +0200)]
[eglib] Fix compilation on Windows after
3bebb7696e
eglib uses G_OS_WIN32 instead of HOST_WIN32 for the Windows-specific code.
Alexander Köplinger [Sun, 10 Jul 2016 23:00:33 +0000 (01:00 +0200)]
Fix tarball/package build that was broken by
0a8d5a08
The new header file wasn't included in the tarball.
Marcos Henrich [Fri, 8 Jul 2016 21:51:36 +0000 (22:51 +0100)]
Merge pull request #3192 from esdrubal/sym-spec
mono-symbolicate spec implementation
Andi McClure [Fri, 8 Jul 2016 21:51:02 +0000 (17:51 -0400)]
Merge pull request #3252 from xmcclure/tarjan-opt-basic
Cleanup on gc bridge to support future optimizations
Marcos Henrich [Fri, 8 Jul 2016 13:12:55 +0000 (14:12 +0100)]
[mono-symbolicate] Use Mono.Options.
Marcos Henrich [Fri, 8 Jul 2016 10:32:20 +0000 (11:32 +0100)]
[corlib] Lowercase and no '-' in metadata guids.
MVID and AOTID stacktrace metadata no longer displays guids with '-'.
Metadata is now also using lowercase instead of uppercase.
Changed mono-symbolicate and mono --aot to use the minimalistic GUIDs.
Marcos Henrich [Thu, 7 Jul 2016 16:57:04 +0000 (17:57 +0100)]
[corlib] StackTrace fixes.
Replaced static constructor with delayed initialization.
Fixed possible undeterministic order of dumped MVIDs.
Used AppendFormat when possible.
Added comment to StackTrace.AddMetadataHandler explaining that it can be
used with reflection by outside code, to avoid removing it or changing
its signature.
Added StringComparer.Ordinal to dictionary.
Andi McClure [Fri, 8 Jul 2016 21:40:58 +0000 (17:40 -0400)]
Cleanup on gc bridge to support future optimizations
Consists mostly of
- Comments
- Consolidate duplicate dynarray implementations in new-bridge and
tarjan-bridge into a single header full of statics
Marcos Henrich [Tue, 5 Jul 2016 17:10:06 +0000 (18:10 +0100)]
[corlib] Ignore metadata on stacktrace tests
StackTrace tests no longer fail with stacktrace metadata.
Marcos Henrich [Tue, 5 Jul 2016 16:53:37 +0000 (17:53 +0100)]
[corlib] Add Metadata to inner exceptions.
Marcos Henrich [Mon, 4 Jul 2016 10:02:16 +0000 (11:02 +0100)]
[corlib] Skip MVID of stackframes without method.
Fixes NRE caused by stackframes without any method assigned to them.
Marcos Henrich [Thu, 30 Jun 2016 11:17:37 +0000 (12:17 +0100)]
[corlib] GetAotId now returns null, if unavailable
Also fixes issue when mono_domain still doesn't have any executing
assembly set.
Marcos Henrich [Tue, 21 Jun 2016 10:31:29 +0000 (11:31 +0100)]
[mono-symbolicate] Improved Makefile
Makefile now stores managed assemblies into the msym dir.
Each test now uses a separate directory to store stacktraces outputs and
symbols.
Marcos Henrich [Tue, 21 Jun 2016 10:36:29 +0000 (11:36 +0100)]
[runtime] AOTID is now properly stored.
Marcos Henrich [Tue, 21 Jun 2016 10:32:16 +0000 (11:32 +0100)]
[mono-symbolicate] Fixes last stacktrace issue.
Extracted Symbolicate.Process stacktrace dump logic into DumpStackTrace
method. Which can also be used to dump the last stack trace after the
process loop.
Marcos Henrich [Tue, 21 Jun 2016 10:26:57 +0000 (11:26 +0100)]
[mono-symbolicate] Fixes symbolication of AOTed
Sequence points are only required if native offsets are on the
stacktrace.
fix -- seq point info aot
Marcos Henrich [Tue, 21 Jun 2016 10:20:26 +0000 (11:20 +0100)]
[mono-symbolicate] Adds store-symbols
mono-symbolicate can now be called:
symbolicate store-symbols <msym dir> [<dir>]+
This will store in <msym dir> all the managed symbols found in the
provided directories.
Marcos Henrich [Thu, 9 Jun 2016 14:10:18 +0000 (15:10 +0100)]
[mono-symbolicate] Implemented metadata parsing.
mono-symbolicate now parses stack traces with metadata at their end.
All the stack trace and metada are read, so that symbolicate can use
MVID and AOTID to retrieve the symbols from the msym directory..
Marcos Henrich [Tue, 31 May 2016 16:37:42 +0000 (17:37 +0100)]
[runtime] Added aot=msym-dir=<DIR>
Removed gen-seq-points-file.
.msym files are now stored into a a subfolder of the provided msym-dir.
The subfolder of each .msym are named as AOTID.
Marcos Henrich [Tue, 31 May 2016 16:34:45 +0000 (17:34 +0100)]
[runtime] aot-compiler.c now stores AOTID in image
AOTID is now also displayed during compilation.
Marcos Henrich [Tue, 31 May 2016 16:28:28 +0000 (17:28 +0100)]
Moved ensure_directory_exists to eglib.
Moved ensure_directory_exists in apdomain.c to g_ensure_directory_exists
in eglib/src/gpath.c so it can be reused.
Marcos Henrich [Fri, 20 May 2016 11:14:27 +0000 (12:14 +0100)]
[corlib] Added MVID metadata to StackTrace
The MVID metadata handler displays multiple MVID(s) followed by the
comma separated list of StackFrame lines whose method belongs to the
module with the displayed MVID.
Marcos Henrich [Fri, 20 May 2016 11:03:46 +0000 (12:03 +0100)]
[corlib] Added metadata handlers to StackTrace
Added a reflectable static method that can be used to customize data
displayed after a stack trace.
Added metadata handler that display the AOTID of the executing assembly.
Marcos Henrich [Fri, 20 May 2016 10:54:59 +0000 (11:54 +0100)]
[corlib] Added icall Assembly.GetAotId
Marcos Henrich [Mon, 16 May 2016 16:08:39 +0000 (17:08 +0100)]
[runtime] Adds AOTID
AOTID is a GUID generated by the AOT compiler and stored along with the
native code.
The AOTID uniquely identifies the generated native assembly.
The AOTID is required when we want to map native offsets to IL offsets
and the sequence points mapping those values need to be determined.
Rodrigo Kumpera [Fri, 8 Jul 2016 20:06:57 +0000 (16:06 -0400)]
Merge pull request #3258 from lindenlab/mono4-continuations_fix
Add some tests for Mono.Tasklets Continautions
Kelly Washington [Fri, 8 Jul 2016 16:20:07 +0000 (16:20 +0000)]
Merge branch 'master' into mono4-continuations_fix
Kelly Washington [Fri, 8 Jul 2016 16:06:44 +0000 (16:06 +0000)]
Add microthreading test to ContinuationsTest
Aleksey Kliger (λgeek) [Fri, 8 Jul 2016 14:36:04 +0000 (10:36 -0400)]
[coop] Change handles to be pointers (#3249)
Previously handles were pointer-sized structs. Unfortunately not all
calling conventions treat pointer-sized structs as pointers, so if we
wanted to interact with handles from wrappers, we would have to do
something complicated.
With the new design, `TYPED_HANDLE_DECL(MonoFoo)` will expand to:
```c
typedef struct {
MonoFoo *__obj;
} MonoFooHandlePayload;
typedef MonoFooHandlePayload *MonoFooHandle;
```
Marcos Henrich [Thu, 7 Jul 2016 15:39:21 +0000 (16:39 +0100)]
[System] EndRead now throws WebException on abort.
When a requast is aborted on .NET a WebException is thrown and not a
ObjectDisposedException as we were doing.
Fixes #41477
Marcos Henrich [Thu, 7 Jul 2016 13:00:59 +0000 (14:00 +0100)]
[System] Test ReadAsync Cancellation.
Covers #41477
Johan Lorensson [Fri, 8 Jul 2016 06:24:04 +0000 (08:24 +0200)]
Merge pull request #3247 from lateralusX/jlorenss/win-x64-lmf-exception
Fix crash in mono mini exceptions.exe regression test on win x64.
Zoltan Varga [Fri, 8 Jul 2016 03:42:26 +0000 (23:42 -0400)]
[llvmonly] Fix support for synchronized methods.
Zoltan Varga [Fri, 8 Jul 2016 02:26:51 +0000 (22:26 -0400)]
[runtime] Remove the 'The wrapper info for the wrapper is a WrapperInfo structure.' comments, this is now true for all wrappers.
Zoltan Varga [Fri, 8 Jul 2016 00:06:58 +0000 (20:06 -0400)]
[jit] Emit memory barriers for volatile STFLD opcodes. Fixes #42413.
Kelly Washington [Thu, 7 Jul 2016 23:13:11 +0000 (23:13 +0000)]
Merge branch 'continuations-test' into mono4-continuations_fix
Zoltan Varga [Thu, 7 Jul 2016 22:59:16 +0000 (18:59 -0400)]
[aot] Fix the llc flags when using hardfp on arm.
Zoltan Varga [Thu, 7 Jul 2016 22:57:55 +0000 (18:57 -0400)]
[aot] Allow the loading of llvm compiled code into a non-llvm runtime on arm and vice versa, the restriction is not needed any more.
Kelly Washington [Thu, 7 Jul 2016 22:22:03 +0000 (22:22 +0000)]
Add ContinuationsTest for Mono.Tasklets
Rodrigo Kumpera [Thu, 7 Jul 2016 21:09:30 +0000 (17:09 -0400)]
Merge pull request #3250 from jbevain/cli-flags
Fix definition and handling of the Preferred32bit CLI flag in the verifier
Jb Evain [Thu, 7 Jul 2016 20:07:58 +0000 (13:07 -0700)]
[runtime] Fix the CLI_FLAGS_PREFERRED32BIT value
Jb Evain [Thu, 7 Jul 2016 20:06:08 +0000 (13:06 -0700)]
[runtime] Fix the CLI Header flags check
Alexander Kyte [Thu, 7 Jul 2016 16:32:07 +0000 (12:32 -0400)]
[runtime] Free rgctx_lazy_fetch_trampoline info
Alexander Kyte [Thu, 7 Jul 2016 16:29:04 +0000 (12:29 -0400)]
[runtime] Free temporary aot buffer
Alexander Kyte [Thu, 7 Jul 2016 16:26:39 +0000 (12:26 -0400)]
[runtime] Free info_offsets used by emit_extra_methods
Alexander Kyte [Thu, 7 Jul 2016 16:25:20 +0000 (12:25 -0400)]
[runtime] Free last buf used by emit_extra_methods
Alexander Kyte [Thu, 7 Jul 2016 15:42:19 +0000 (11:42 -0400)]
[runtime] Free temporary table
Alexander Kyte [Wed, 6 Jul 2016 22:56:22 +0000 (18:56 -0400)]
[runtime] Free patches list
Alexander Kyte [Wed, 6 Jul 2016 22:55:16 +0000 (18:55 -0400)]
[runtime] Free temporary trampoline emitter buffer
Alexander Kyte [Wed, 6 Jul 2016 22:53:47 +0000 (18:53 -0400)]
[runtime] Free temporary class name table
Alexander Kyte [Wed, 6 Jul 2016 22:51:33 +0000 (18:51 -0400)]
[runtime] Free leaked buffer
Alexander Kyte [Wed, 6 Jul 2016 22:49:32 +0000 (18:49 -0400)]
[runtime] Free temporary pointer array
Alexander Kyte [Wed, 6 Jul 2016 22:46:29 +0000 (18:46 -0400)]
[runtime] Free temporary attr structure
Alexander Kyte [Wed, 6 Jul 2016 22:39:26 +0000 (18:39 -0400)]
[runtime] Don't leak a runtime invoke method builder
Alexander Kyte [Wed, 6 Jul 2016 22:25:19 +0000 (18:25 -0400)]
[runtime] Don't leak short-lived header
Alexander Kyte [Wed, 6 Jul 2016 22:19:17 +0000 (18:19 -0400)]
[runtime] Free leaked temporary parse
Alexander Kyte [Wed, 6 Jul 2016 22:09:28 +0000 (18:09 -0400)]
[runtime] Prevent leak by copying list with no other references
Alexander Kyte [Thu, 7 Jul 2016 19:17:31 +0000 (15:17 -0400)]
[runtime] Free vars in linear_scan2
Alexander Kyte [Wed, 6 Jul 2016 21:24:00 +0000 (17:24 -0400)]
[runtime] Free register info
Bennjamin Blast [Thu, 7 Jul 2016 18:47:33 +0000 (14:47 -0400)]
Modify the configuration loader so that (#2758)
- A single dll can be mapped to different targets based on function name.
- The dllentry target can be omitted if it is the same as the source.
This change is released under the MIT license.
alenl2 [Thu, 7 Jul 2016 18:19:22 +0000 (20:19 +0200)]
Fixed stack overflow issue in DuplexClientRuntimeChannel (#2172)
lateralusX [Thu, 7 Jul 2016 15:24:49 +0000 (17:24 +0200)]
Fix crash in mono mini exceptions.exe regression test on win x64.
Exceptions.exe regression test started to fail on win x64 release builds.
Turns out that the Visual Studio C compiler picked a different optimization
for release builds (due to a change of library type that uses a different default optimization level)
using RSI register in native code calling into JIT:ed code. If the JIT:ed code used reflection
and exceptions, that triggers InternalInvoke and lmf_filter, the code only
stored System V x64 non-volatile registers in the unwind information. On Windows,
RSI is also a non-volatile register (RDI as well) that needs to be preserved and
since the code didn’t include those in the unwind information, the correct RSI value
was not restored during the unwind. Once the control was handled back to the native
code it dereferenced RSI (that was set to 0) and crashed.
The fix is to make sure we store all non-volatile registers on x64 Windows
when we save an lmf so the unwind code can restore them when unwinding through
the lmf.
Marek Safar [Thu, 7 Jul 2016 12:25:59 +0000 (14:25 +0200)]
Merge pull request #3244 from henricm/fix-for-synchronization-attribute
Fix for lock release in SynchronizationAttribute
Zoltan Varga [Thu, 7 Jul 2016 08:41:54 +0000 (04:41 -0400)]
[llvm] Enable atomic load/store support when using llvm
Zoltan Varga [Thu, 7 Jul 2016 07:23:21 +0000 (03:23 -0400)]
[llvm] Use a custom memory managed for llvm master too, the default one allocates everything into a separate memory page.
Henric Müller [Wed, 6 Jul 2016 14:28:58 +0000 (16:28 +0200)]
Fix for lock release in SynchronizationAttribute
* Making sure ownerThread is not nulled unless lockCount is zero.
* Fixed so Locked property checks lockCount when determining if locked
instead of _locked field which was never set.
* Added test for setting Locked property.
* Added test capturing the original issue.
Zoltan Varga [Thu, 7 Jul 2016 04:55:33 +0000 (00:55 -0400)]
[llvm] Fix some problems when using llvm Check the base pointer for null instead of the derived one in load/store opcodes. Avoid trying to name parameters representing empty structs, they have no llvm parameter. Avoid trying to patch calls from llvm code, they are made indirectly.
Andi McClure [Wed, 6 Jul 2016 21:26:45 +0000 (17:26 -0400)]
Merge pull request #3239 from xmcclure/default-tarjan
Switch Android GC bridge default from new-bridge to tarjan-bridge
Alexander Kyte [Wed, 6 Jul 2016 21:21:44 +0000 (17:21 -0400)]
[runtime] Free patches array in aot compiler
Alexander Kyte [Thu, 23 Jun 2016 20:46:55 +0000 (16:46 -0400)]
[runtime] Move mempools up, don't free methodheaders pointing into it after, etc
Alexander Kyte [Thu, 23 Jun 2016 19:25:23 +0000 (15:25 -0400)]
[runtime] Don't leak method header (significant leak size) in aot compiler
Alexander Kyte [Thu, 23 Jun 2016 16:23:29 +0000 (12:23 -0400)]
[runtime] Defer destruction of MonoCompile until patches have been emitted
Alexander Kyte [Thu, 23 Jun 2016 19:07:18 +0000 (15:07 -0400)]
[runtime] Always free method header in method_to_ir
Alexander Kyte [Thu, 23 Jun 2016 19:05:39 +0000 (15:05 -0400)]
[runtime] Clean up method_to_callers table for llvm
Alexander Kyte [Thu, 23 Jun 2016 18:27:02 +0000 (14:27 -0400)]
[runtime] Don't leak temporary jump info struct
This represented 93k leaked allocations when aoting mscorlib
Alexander Kyte [Thu, 23 Jun 2016 18:25:08 +0000 (14:25 -0400)]
[runtime] Prevent leaking temporary
Alexander Kyte [Thu, 23 Jun 2016 18:17:39 +0000 (14:17 -0400)]
[runtime] Free LLVM failure message
Alexander Kyte [Thu, 23 Jun 2016 18:17:06 +0000 (14:17 -0400)]
[runtime] Fix minor leak
Alexander Kyte [Thu, 23 Jun 2016 21:19:30 +0000 (17:19 -0400)]
[runtime] Don't leak LLVM IR Builders
Marek Safar [Wed, 6 Jul 2016 19:35:02 +0000 (21:35 +0200)]
Merge pull request #3243 from mono/netstandard
[Facades] netstandard 1.6 updates
Alexander Köplinger [Wed, 6 Jul 2016 19:32:10 +0000 (21:32 +0200)]
[System] Bump timeout in TimerTest a bit
I saw this failing occasionally on iOS on Wrench:
```
[FAIL] TimerTest.AutoResetEventFalseStopsFiringElapsed : #2 wrong elapsedCount
Expected: 1
But was: 0
at MonoTests.System.Timers.TimerTest.AutoResetEventFalseStopsFiringElapsed () [0x00091] in /Users/builder/data/lanes/1411/
b07703ed/source/xamarin-macios/external/mono/mcs/class/System/Test/System.Timers/TimerTest.cs:327
at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&)
at System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00038] in /Users/builder/data/lanes/1411/
b07703ed/source/xamarin-macios/_ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/mcs/class/corlib/System.Reflection/MonoMethod.cs:309
```
Marek Safar [Tue, 5 Jul 2016 22:51:46 +0000 (00:51 +0200)]
[Facades] netstandard 1.6 updates