Marek Safar [Fri, 2 Dec 2016 11:06:53 +0000 (12:06 +0100)]
Merge pull request #4063 from ntherning/fix-culture-info-problem-in-RepeatInfoTest
Ensure the System.Web.UI.WebControls.RepeatInfo_Autogen test runs under en-US
Marek Safar [Fri, 2 Dec 2016 09:25:30 +0000 (10:25 +0100)]
[build] Put back mcs to monolite to support boostrap with mcs only
Zoltan Varga [Fri, 2 Dec 2016 02:09:47 +0000 (21:09 -0500)]
Revert "[build] Put back mcs to monolite to support boostrap with mcs only"
This reverts commit
430e9d64f731e4d2d19672e00531d173e0282e98.
Revert this as it seems to break the build:
https://wrench.internalx.com/Wrench/ViewLane.aspx?lane_id=2457&host_id=148&revision_id=834314
Zoltan Varga [Fri, 2 Dec 2016 00:07:45 +0000 (19:07 -0500)]
[runtime] Avoid rethrowing ThreadAbortException's from cctors down the stack from where the TAE was first caught. Fixes thread6.cs. (#4073)
Zoltan Varga [Fri, 2 Dec 2016 00:04:18 +0000 (19:04 -0500)]
[runtime] Change the vtable->initialized bitfield into a byte so its easier to load it from JITted code, the previous version was not using offsets infrastructure so it might not work when cross compiling. (#4068)
Zoltan Varga [Fri, 2 Dec 2016 00:02:33 +0000 (19:02 -0500)]
[runtime] Implement support for fixed char arrays. Fixes #48429. (#4072)
Marek Safar [Thu, 1 Dec 2016 22:53:29 +0000 (23:53 +0100)]
[build] Put back mcs to monolite to support boostrap with mcs only
Andi McClure [Thu, 1 Dec 2016 22:01:55 +0000 (17:01 -0500)]
Merge pull request #4053 from xmcclure/babysitter_cygwin
Fix babysitter script to work on Windows (Cygwin) builders
monojenkins [Thu, 1 Dec 2016 21:04:12 +0000 (22:04 +0100)]
[msvc] Update csproj files (#4074)
Zoltan Varga [Thu, 1 Dec 2016 20:53:20 +0000 (15:53 -0500)]
[msvc] Update project files.
Zoltan Varga [Thu, 1 Dec 2016 20:45:57 +0000 (15:45 -0500)]
[jit] Fix the DISABLE_REMOTING build.
Zoltan Varga [Thu, 1 Dec 2016 20:26:30 +0000 (15:26 -0500)]
[sdb] Execute the 'assembly_load' test earlier to avoid races when the finalizer thread would load another assembly.
Zoltan Varga [Thu, 1 Dec 2016 20:18:25 +0000 (15:18 -0500)]
[x86] Increase some instruction lengths.
Alexander Köplinger [Thu, 1 Dec 2016 19:57:24 +0000 (20:57 +0100)]
[genproj] Recognize /deterministic and /runtimemetadataversion
Mike Voorhees [Thu, 1 Dec 2016 19:53:44 +0000 (14:53 -0500)]
Add embedding API to expose empty string instance (#4067)
* Reuse a single empty string instance
* Undo string empty change to mono_string_new_size_checked and add new embedding api for string empty instead
* Add & use mono_string_empty_checked to fix build error on Linux
* Revert "Add & use mono_string_empty_checked to fix build error on Linux"
This reverts commit
47cafae6573115333fa04776c21e5ddc49fe4b40.
* Remove MONO_RT_EXTERNAL_ONLY to fix build error on linux
Rodrigo Kumpera [Thu, 1 Dec 2016 19:16:10 +0000 (11:16 -0800)]
Merge pull request #4048 from kumpera/iface_casting_cleanup
[mini] Reorg casting code + optimize casting of magic array interfaces.
Andi McClure [Thu, 1 Dec 2016 19:08:25 +0000 (14:08 -0500)]
Modify Jenkins scripts to enable babysitter script on Cygwin
Andi McClure [Thu, 1 Dec 2016 19:07:48 +0000 (14:07 -0500)]
Fix babysitter script to work on Windows (Cygwin) builders
The babysitter script used for CI results was previously able to run
either on Windows or standard UNIX. However, the builders run Cygwin,
which turns out to need special support. To make Cygwin work two
changes were made:
1. Paths which are exported to Mono get filtered through `cygpath`.
Paths received back from Mono are filtered in reverse. The script now
tracks two sets of path strings.
2. Under certain circumstances in Cygwin, pgkill() attempts to close a
process group and finds it does not exist. My assumption is that this
is because it has already been closed. I dealt with this by simply
catching the failure and printing a warning.
Ludovic Henry [Mon, 28 Nov 2016 20:50:28 +0000 (15:50 -0500)]
[w32handle] Rename `statuscode` parameter to `abandoned`
This parameter is only used to check if a mutex has been abandonned.
Alexander Köplinger [Thu, 1 Dec 2016 16:48:26 +0000 (17:48 +0100)]
[corlib] Use Directory.GetFiles/GetDirectories implementation from referencesource (#4042)
We already had implementations of the Windows APIs like FindFirstFile/FindNextFile
in native code but we wrapped it with some convenience functions for our implementation.
The referencesource code works directly against those APIs so I added new icall functions
that are just used for passing data to/from native code.
Note that we have the same problem in the DirectoryInfo.GetFiles() implementation.
Right now that one still uses the old Mono implementation, switching it over to
the referencesource implementation will be done in a separate commit.
Fixes https://bugzilla.xamarin.com/show_bug.cgi?id=42715
Alexander Köplinger [Thu, 1 Dec 2016 15:53:37 +0000 (16:53 +0100)]
Merge pull request #4065 from akoeplinger/add-mcs-lane
[ci] Add job configuration for testing Mono with mcs as compiler
Ludovic Henry [Tue, 29 Nov 2016 16:51:00 +0000 (11:51 -0500)]
[io-layer] Remove DuplicateHandle
Alexander Köplinger [Thu, 1 Dec 2016 15:41:27 +0000 (16:41 +0100)]
Fix typo in readme.md
Also format the options without braces like in the other examples.
Aleksey Kliger (λgeek) [Thu, 1 Dec 2016 15:33:25 +0000 (10:33 -0500)]
Merge pull request #4045 from lambdageek/bug-47867
[sre] Ensure generic_context is created before instantiating a TypeBuilder
Niklas Therning [Thu, 1 Dec 2016 12:55:29 +0000 (13:55 +0100)]
Ensure the System.Web.UI.WebControls.RepeatInfo_Autogen test runs under en-US
Niklas Therning [Thu, 1 Dec 2016 14:40:40 +0000 (15:40 +0100)]
Merge pull request #4051 from Unity-Technologies/registry-bug-fixes
Fix a bug in registry API implementation where had wrong assumptions about possible registry size.
Tautvydas Žilys [Thu, 1 Dec 2016 14:02:12 +0000 (16:02 +0200)]
Fix code convention on changed code.
Alexander Köplinger [Thu, 1 Dec 2016 13:49:52 +0000 (14:49 +0100)]
[ci] Add job configuration for testing Mono with mcs as compiler
To ensure it doesn't break now that we're using Roslyn by default.
lateralusX [Thu, 1 Dec 2016 11:34:58 +0000 (12:34 +0100)]
Enabled possibility to exclude SafeArray implementation on Windows.
SafeArray implementation is not available under all Windows API families. This commit
extracts SafeArray methods making it possible to exclude them under Windows API families
not supporting SafeArrays.
Alexander Köplinger [Thu, 1 Dec 2016 11:15:21 +0000 (12:15 +0100)]
[acceptance-tests] Use portable pdb for csc
Niklas Therning [Thu, 1 Dec 2016 09:42:25 +0000 (10:42 +0100)]
Merge pull request #4033 from ntherning/no-stdcall-for-icalls-on-windows-32-bit
Use __cdecl rather than __stdcall for icalls on Windows 32-bit
Zoltan Varga [Thu, 1 Dec 2016 07:10:07 +0000 (02:10 -0500)]
[jit] Enable inlining inside gshared methods. (#4059)
Zoltan Varga [Thu, 1 Dec 2016 03:28:41 +0000 (22:28 -0500)]
Revert "Only allocate 1 empty string instance per AppDomain " (#4062)
Marek Safar [Wed, 30 Nov 2016 21:58:46 +0000 (22:58 +0100)]
[build] Don't use runtime flags on basic boostrap (they are too new)
Mike Voorhees [Wed, 30 Nov 2016 21:40:19 +0000 (16:40 -0500)]
Only allocate 1 empty string instance per AppDomain (#4047)
* Reuse a single empty string instance
* Undo string empty change to mono_string_new_size_checked and add new embedding api for string empty instead
Alexander Köplinger [Wed, 30 Nov 2016 21:10:44 +0000 (22:10 +0100)]
[ci] Bump timeout in ms-test-suite
Compiling the test exe's is taking longer now with roslyn.
Miguel de Icaza [Wed, 30 Nov 2016 19:53:43 +0000 (14:53 -0500)]
[configure] Detect endianess and use mcs for big-endian systems.
Renames the flag to be more explicit on the intended purpose. Also,
document the new configuration flag.
The default will probe the right compiler to use.
Alexis Christoforides [Wed, 30 Nov 2016 19:23:04 +0000 (14:23 -0500)]
Bump bockbuild
monojenkins [Wed, 30 Nov 2016 17:09:51 +0000 (17:09 +0000)]
[msvc] Update csproj files
Aleksey Kliger (λgeek) [Wed, 30 Nov 2016 18:54:21 +0000 (13:54 -0500)]
[tests] Use CSC to compile gc-descriptors test (#4052)
Alexander Köplinger [Wed, 30 Nov 2016 18:47:47 +0000 (19:47 +0100)]
Merge pull request #4050 from akoeplinger/profile-speedup
[ci] Only build the additional profiles on one arch instead of everywhere
Ludovic Henry [Mon, 28 Nov 2016 20:47:33 +0000 (15:47 -0500)]
[io-layer] Remove wait.h
Ludovic Henry [Mon, 28 Nov 2016 20:11:11 +0000 (15:11 -0500)]
[io-layer] Remove INFINITE
Ludovic Henry [Mon, 28 Nov 2016 19:55:09 +0000 (14:55 -0500)]
[io-layer] Extract WaitForSingleObjectEx, WaitForMultipleObjectsEx and SignalObjectAndWait
Aleksey Kliger (λgeek) [Wed, 30 Nov 2016 17:20:30 +0000 (12:20 -0500)]
[reflection] Use mono_module_get_object_handle everywhere (#4010)
* [reflection] Refactor managed object caching
Split up all the mono_XXX_get_object_checked functions into a generic
cache check and a specific construction function that's called if
there's a cache miss.
* [reflection] Add mono_assembly_get_object_handle
* [reflection] Add mono_module_get_object_handle
* [reflection] Use mono_module_get_object_handle everywhere
instead of mono_module_get_object_checked.
Also implement mono_module_file_get_object_handle instead of mono_module_file_get_object_checked
Alexis Christoforides [Wed, 30 Nov 2016 16:47:09 +0000 (11:47 -0500)]
Bump bockbuild
Alexander Köplinger [Wed, 30 Nov 2016 16:21:00 +0000 (17:21 +0100)]
Bump corert submodule
Marek Safar [Wed, 30 Nov 2016 10:08:59 +0000 (11:08 +0100)]
[build] Add --with-mcs-compiler config option
Marek Safar [Wed, 30 Nov 2016 10:05:28 +0000 (11:05 +0100)]
[mcs] Fixes runtimemetadataversion option check
Tautvydas Žilys [Wed, 30 Nov 2016 14:40:21 +0000 (16:40 +0200)]
Fix a bug in registry API implementation where had wrong assumptions about possible registry size.
Marek Safar [Wed, 30 Nov 2016 14:29:30 +0000 (15:29 +0100)]
[build] Prepare roslyn 2.0 bootstrap dependencies
Marek Safar [Wed, 30 Nov 2016 14:21:13 +0000 (15:21 +0100)]
[build] Set monolite path also for Facades
Alexander Köplinger [Wed, 30 Nov 2016 13:56:51 +0000 (14:56 +0100)]
Merge pull request #3748 from akoeplinger/fix-rng-monotouch
[corlib] Simplify RNGCryptoServiceProvider file name on MT and enable tests
Marek Safar [Wed, 30 Nov 2016 13:35:54 +0000 (14:35 +0100)]
[xbuild] Add workaround for pre-2.0 csc and convert full to portable debug mode
Alexander Köplinger [Wed, 30 Nov 2016 13:31:12 +0000 (14:31 +0100)]
[ci] Only build the additional profiles on one arch instead of everywhere
The additional profiles like monotouch, monodroid etc. are normal
managed code anyway and are the same no matter where they're built
so we can save a lot of CI time by not building them e.g. on slower
ARM bots.
Marek Safar [Tue, 29 Nov 2016 18:51:14 +0000 (19:51 +0100)]
[build] Use custom nursery size and clean up csc runtime arguments
Alexander Köplinger [Wed, 30 Nov 2016 01:20:55 +0000 (02:20 +0100)]
[referencesource] Fix a regression from
47a6f56439c9deab287be770c902d41e91480799
ResourceSets needs to be initialized on Mono.
Rodrigo Kumpera [Wed, 30 Nov 2016 00:34:33 +0000 (16:34 -0800)]
[mini] Use the array fast path with array magic interfaces. Do the expensive check in the slow path.
Rodrigo Kumpera [Tue, 29 Nov 2016 22:02:42 +0000 (14:02 -0800)]
[mini] Cleanup type casting a bit. Unify cast with with cache setup code.
Zoltan Varga [Tue, 29 Nov 2016 21:46:19 +0000 (16:46 -0500)]
[jit] Add counters for number of JITted method discarded as duplicates and the time spent JITting them. Remove opt set from -v output, it just adds noise.
Marek Safar [Tue, 29 Nov 2016 20:07:54 +0000 (21:07 +0100)]
Merge pull request #4041 from CyberShadow/pull-
20161129-100901
ilasm: Add stub parsing for .data cil attribute
Marek Safar [Tue, 29 Nov 2016 18:20:11 +0000 (19:20 +0100)]
Add CoreRT submodule
Marek Safar [Tue, 29 Nov 2016 18:16:02 +0000 (19:16 +0100)]
[bcl] Clean up some warnings
Aleksey Kliger [Tue, 29 Nov 2016 15:34:39 +0000 (10:34 -0500)]
[sre] Do we ever try to instantiate a generic instance? Assert that we don't.
Aleksey Kliger [Tue, 29 Nov 2016 15:31:08 +0000 (10:31 -0500)]
[sre] Throw a TLE if a generic inst is used before the gtd is created.
This can happen if TypeBuilders are used to construct something like
class S<T> {
...
}
class R {
public S<int> SI;
}
And then CreateType() is called for R and GetField("SI") is called on
the result before CreateType() is called on the builder for S.
Aleksey Kliger [Mon, 28 Nov 2016 23:21:39 +0000 (18:21 -0500)]
[sre] Make sure a generic definition TypeBuilder has its generic_container setup before we try to instantiate it.
Fixes https://bugzilla.xamarin.com/show_bug.cgi?id=47867
Aleksey Kliger [Tue, 29 Nov 2016 00:40:10 +0000 (19:40 -0500)]
[test] Generic typebuilder field in another typebuilder should work.
Even if the generic typebuilder hasn't had CreateType() called on it
yet.
Regression tests for https://bugzilla.xamarin.com/show_bug.cgi?id=47867
Marek Safar [Tue, 29 Nov 2016 15:29:08 +0000 (16:29 +0100)]
Revert "[build] Enable aot for Microsoft.CodeAnalysis.dll/Microsoft.CodeAnalysis.CSharp.dll, as the aot compiler generates smaller images now."
This reverts commit
e186dcff2c2b6c6f32c72858425ba8b9d8b33efb.
Ludovic Henry [Mon, 28 Nov 2016 18:24:22 +0000 (13:24 -0500)]
[configure.ac] Rename `hybrid` runtime preset to `aot_preferred`
Niklas Therning [Tue, 29 Nov 2016 14:40:27 +0000 (15:40 +0100)]
Merge pull request #4040 from ntherning/disable-symbolicate-tests-on-windows
Disable symbolicate tests on Windows
Marek Safar [Tue, 29 Nov 2016 11:01:19 +0000 (12:01 +0100)]
[System] Report test failure using Assert
Marek Safar [Tue, 29 Nov 2016 10:44:37 +0000 (11:44 +0100)]
[System] Update ClientWebSocket test to use Setup
Vladimir Panteleev [Tue, 29 Nov 2016 10:28:21 +0000 (10:28 +0000)]
ilasm: Add stub parsing for .data cil attribute
The "cil" attribute seems to indicate that the data should be placed
in the .text section, along with the code.
Like the tls attribute, the cil attribute is only implemented insofar
as to recognize it as a valid keyword that can occur in a .data
declaration.
Niklas Therning [Tue, 29 Nov 2016 09:56:08 +0000 (10:56 +0100)]
Disable symbolicate tests on Windows
We will ignore the failing test-with-aot-msym test for now.
Zoltan Varga [Tue, 29 Nov 2016 08:06:55 +0000 (03:06 -0500)]
[bcl] Fix a regression introduced by
91c68de23f5067d000207194466813239cda7866. If a thread was added to (#4038)
blocking_threads twice, then removed once, the corresponding entry in threads_stacktraces was removed,
causing an exception in ReleaseHandle () later.
Zoltan Varga [Tue, 29 Nov 2016 08:01:35 +0000 (03:01 -0500)]
[runtime] Add error handling to mono_get_dbnull_object () it can fail due to a TAE. (#4039)
Johan Lorensson [Tue, 29 Nov 2016 07:47:12 +0000 (08:47 +0100)]
Merge pull request #4023 from lateralusX/jlorenss/test-driver-reporter
Adding support to get test results back from TestDriver.
Zoltan Varga [Tue, 29 Nov 2016 05:29:18 +0000 (00:29 -0500)]
[build] Enable aot for Microsoft.CodeAnalysis.dll/Microsoft.CodeAnalysis.CSharp.dll, as the aot compiler generates smaller images now.
Zoltan Varga [Tue, 29 Nov 2016 05:22:42 +0000 (00:22 -0500)]
[aot] Only emit instances when using full aot.
Zoltan Varga [Tue, 29 Nov 2016 02:13:39 +0000 (21:13 -0500)]
[runtime] Fix
e659982b7b8f11ecf80919646353ad3c16240697, two callbacks were mixed up.
Alexander Kyte [Tue, 29 Nov 2016 02:01:09 +0000 (21:01 -0500)]
Prevent ThreadAbort from prematurely ending function calls in catch block (#1837)
* [runtime] Fix naming scheme for check if stack grows upward
It was very counter-intutitive to have a file-local preprocessor variable
with a name that sounds like it should have the same truthiness as a given global
preprocessor variable but was defined as the negation of the global variable.
* [runtime] Prevent ThreadAbort from terminating function calls in catch body
ThreadAbortExceptions are special in that if the thread has not
had it's abortion reset, when it reaches the end of a catch block it
must throw.
Consider the situation where a thread has been aborted and the
ThreadAbortException has been caught. If this catch block calls
a method that has a try/catch combination, the current implementation
will throw the ThreadAbortException at the end of the catch in that
function.
Usually you only care that Thread abortions are prompt, but this bug
could result in dramatic program behavior changes when this is combined
with lazy class initialization.
```
Example:
Console.WriteLine inside a thread abort with an uninitialized Console.
```
This fix records the stack pointer when a catch clause is entered, and
only rethrows the abortion if we're exiting a catch clause above or at the
level of the catch clause previously entered.
Zoltan Varga [Tue, 29 Nov 2016 01:58:45 +0000 (20:58 -0500)]
Zoltan Varga [Tue, 29 Nov 2016 01:57:52 +0000 (20:57 -0500)]
[jit] Call mono_jit_thread_attach () through a GOT slot instead of directly, so the call doesn't go through the trampoline code which wouldn't work if the thread was not attached. (#4037)
Zoltan Varga [Tue, 29 Nov 2016 01:14:11 +0000 (20:14 -0500)]
Rodrigo Kumpera [Tue, 29 Nov 2016 00:05:20 +0000 (16:05 -0800)]
add type-checking.c to the build.
Rodrigo Kumpera [Sun, 27 Nov 2016 09:54:57 +0000 (01:54 -0800)]
[runtime] CEE_MONO_CISINST is dead. Removed the type-cast half.
Rodrigo Kumpera [Sun, 27 Nov 2016 09:53:17 +0000 (01:53 -0800)]
[mini] Remove the need for isinst wrapper for MBRO.
Rodrigo Kumpera [Sun, 27 Nov 2016 06:21:38 +0000 (22:21 -0800)]
[mini] Remove the need of the ininst wrapper for interfaces.
Rodrigo Kumpera [Sun, 27 Nov 2016 02:04:21 +0000 (18:04 -0800)]
[mini] Remove CEE_MONO_CCASTCLASS. Could not remove from opcodes.def at it weirdly breaks mono/mini/arrays.cs.
Rodrigo Kumpera [Sat, 26 Nov 2016 06:17:47 +0000 (22:17 -0800)]
[mini] CEE_MONO_CCASTCLASS is dead. Removed the type-cast half.
Rodrigo Kumpera [Sat, 26 Nov 2016 06:12:00 +0000 (22:12 -0800)]
[mini] Avoid the cast wrapper for MBRO.
Rodrigo Kumpera [Sat, 26 Nov 2016 05:34:07 +0000 (21:34 -0800)]
Remove dead code.
Rodrigo Kumpera [Fri, 25 Nov 2016 05:48:37 +0000 (21:48 -0800)]
[mini] Avoid the cast wrapper for ifaces
Rodrigo Kumpera [Fri, 25 Nov 2016 03:35:38 +0000 (19:35 -0800)]
[mini] Simplify casting of variant generic interfaces.
Rodrigo Kumpera [Thu, 24 Nov 2016 23:15:12 +0000 (15:15 -0800)]
[mini] Extract type checking code into type-checking.c
Rodrigo Kumpera [Mon, 28 Nov 2016 23:54:03 +0000 (18:54 -0500)]
Merge pull request #4009 from kumpera/lazy-array-ifaces
[runtime] Implement lazy interface implementation for arrays.
Rodrigo Kumpera [Mon, 28 Nov 2016 22:54:38 +0000 (14:54 -0800)]
[runtime] Remove the eager array interfaces code. Good ridance.
Rodrigo Kumpera [Mon, 28 Nov 2016 22:54:18 +0000 (14:54 -0800)]
[runtime] Clean mono_init_internal hacks. Moved to mono_class_setup_mono_type / mono_class_create_from_typedef.
Rodrigo Kumpera [Tue, 22 Nov 2016 23:30:41 +0000 (15:30 -0800)]
[runtime] Fix bad packing in MonoClass.
Rodrigo Kumpera [Mon, 21 Nov 2016 23:22:08 +0000 (15:22 -0800)]
[runtime] Implement lazy interface implementation for arrays.
We have the following set of problems:
Arrays implement interfaces that are invariant but behave like covariant.
Those are IList`1, ICollection`1, IEnumerable`1
Arrays of primitive types are type equivalent based on their underlying type.
This means int[], uint[] and IntEnum[] are all interchangeable. And so is casting among their interfaces.
Meaning this is valid: `(IList<IntEnum>)(object)new int[1]`.
Finally, the way we implement IEnumerator`1 for arrays forces it to behave just like the other 3 interfaces.
Implementation:
Introduce MonoClass::is_array_special_interface, set for all the above interfaces. This allow fast checking of the interfaces in question.
mono_class_is_assignable_from now includes the array casting rules.
Change mono_class_interface_offset_with_variance to take arrays into account when looking for a candidate iface.
The JIT implements casting of those interfaces using the cast with cache wrapper.
Finally, to handle the weird primitive rules, set the cast_class of sbyte, ushort, uint and ulong to their same-size buddies.
This makes it easier for the casting code to resolve this problem.
Problems:
Casting performance is terrible, anywhere from 60% to 1000% slower on a micro-benchmark.
Can be improved by extending our casting wrapper to handle those interfaces (probably would have to give up inlining as they would be huge)
The code in domain.c is icky, but not sure where to put it otherwise.
IEnumerator could be solved in Array.cs by not forcing it to be magic as well. Meaning the folowing
```
object array = new int[1];
var a = array as IList<int>;
var b = array as IList<uint>;
a.GetEnumerator().GetType () != b.GetEnumerator().GetType ();
```
The last line is false today but it's harmless to change it to avoid the casting penalty for such central type.