mono.git
6 years ago[mcs] Parsing of nested unbound types. Fixes #55400
Marek Safar [Wed, 24 May 2017 17:26:46 +0000 (19:26 +0200)]
[mcs] Parsing of nested unbound types. Fixes #55400

6 years ago[corlib] Remove unused field
Marek Safar [Wed, 24 May 2017 13:39:37 +0000 (15:39 +0200)]
[corlib] Remove unused field

6 years agoImprove error messages to help users diagnose problems when using custom mode (#4922)
Miguel de Icaza [Wed, 24 May 2017 17:19:58 +0000 (13:19 -0400)]
Improve error messages to help users diagnose problems when using custom mode (#4922)

* Improve error messages to help users diagnose problems when using the custom mode

* Update mkbundle.cs

6 years ago[runtime] Convert a g_warning to a type load failure. (#4920)
Zoltan Varga [Wed, 24 May 2017 13:35:18 +0000 (09:35 -0400)]
[runtime] Convert a g_warning to a type load failure. (#4920)

6 years agoFix make dist.
Zoltan Varga [Wed, 24 May 2017 02:51:09 +0000 (22:51 -0400)]
Fix make dist.

6 years ago[System]: Don't call OnCompleted(this) twice in SocketAsyncEventArgs.FinishWrapperCon...
Martin Baulig [Tue, 23 May 2017 19:42:05 +0000 (15:42 -0400)]
[System]: Don't call OnCompleted(this) twice in SocketAsyncEventArgs.FinishWrapperConnectSuccess(). (#4894)

6 years ago[bcl] Fix compiling xunit-based tests
Alexander Köplinger [Tue, 23 May 2017 17:54:35 +0000 (19:54 +0200)]
[bcl] Fix compiling xunit-based tests

We moved System.Runtime.InteropServices.RuntimeInformation to a facade.

6 years ago[runtime] Add specialized versions of mono_icall_handle_new () for internal/non-inter...
Zoltan Varga [Tue, 23 May 2017 15:46:59 +0000 (11:46 -0400)]
[runtime] Add specialized versions of mono_icall_handle_new () for internal/non-internal pointers. (#4918)

6 years agoFix full aot (#4919)
Zoltan Varga [Tue, 23 May 2017 15:36:43 +0000 (11:36 -0400)]
Fix full aot (#4919)

* [runtime] Fix the generation of invalid IL in the return marshalling of stringbuilders.

* [runtime] Disable some failing fullaot tests.

6 years agoRemove outdated info and unused files from mcs/ (#4916)
Alexander Köplinger [Tue, 23 May 2017 12:27:42 +0000 (14:27 +0200)]
Remove outdated info and unused files from mcs/ (#4916)

Most of the removed files weren't touched in the last decade
and are unused so it's better to remove them to avoid confusion
about what they do.

I also went over and removed the most outdated info from readme
files, we probably want to do a more thorough overhaul in the future.

6 years ago[mcs] When setting struct empty layout consider compiler generated fields. Fixes...
Marek Safar [Tue, 23 May 2017 06:35:58 +0000 (08:35 +0200)]
[mcs] When setting struct empty layout consider compiler generated fields. Fixes #55604

6 years agoBump bockbuild to fix build
Alexander Köplinger [Tue, 23 May 2017 00:32:20 +0000 (02:32 +0200)]
Bump bockbuild to fix build

6 years ago[runtime] Add a fastpath to mono_object_isinst_icall (). (#4917)
Zoltan Varga [Tue, 23 May 2017 00:24:14 +0000 (20:24 -0400)]
[runtime] Add a fastpath to mono_object_isinst_icall (). (#4917)

6 years agoUse nuget 4.3.0-preview1 to fix build
Alexander Köplinger [Mon, 22 May 2017 22:16:22 +0000 (00:16 +0200)]
Use nuget 4.3.0-preview1 to fix build

4.5.0 is not yet available.

Also use lowercase nuget.exe to match the URL on https://dist.nuget.org/

6 years ago[mcs] Add expression bodied syntax for accessors. Fixes #54991
Marek Safar [Mon, 22 May 2017 21:29:54 +0000 (23:29 +0200)]
[mcs] Add expression bodied syntax for accessors. Fixes #54991

6 years ago[MacSDK] Update Nuget to 4.5, switch to binary release instead of building
Alexis Christoforides [Mon, 22 May 2017 20:04:30 +0000 (16:04 -0400)]
[MacSDK] Update Nuget to 4.5, switch to binary release instead of building

6 years ago[bcl] Make monolite platform specific (#4910)
Alexander Köplinger [Mon, 22 May 2017 16:09:44 +0000 (18:09 +0200)]
[bcl] Make monolite platform specific (#4910)

mscorlib.dll etc will be platform specific in the future. This also
means that we need to adapt monolite since it'll become platform
specific once we start the divergence.

monolite is essentially a repackaging of the "build" profile which
means we need to turn that profile into multi-platform profile
like net_4_x. We'll still have a symlink from build -> build-darwin
and the monolite which is downloaded or packaged in the tarball
is expanded into mcs/lib/monolite-<platform> depending on the platform
you're building on.

I had to move the get-monolite-latest target from the top-level
Makefile.am into mcs/class/Makefile so it has access to HOST_PLATFORM,
but it arguably should've been there anyway before.

6 years ago[bcl] Exclude Mono.CSharp.dll from api diff
Alexander Köplinger [Mon, 22 May 2017 16:02:12 +0000 (18:02 +0200)]
[bcl] Exclude Mono.CSharp.dll from api diff

We don't guarantee a stable API there and it changes often
when mcs internals change.

6 years ago[profiler] Fall back to CLOCK_MONOTONIC if CLOCK_PROCESS_CPUTIME_ID results in EINVAL...
Alex Rønne Petersen [Mon, 22 May 2017 15:02:22 +0000 (17:02 +0200)]
[profiler] Fall back to CLOCK_MONOTONIC if CLOCK_PROCESS_CPUTIME_ID results in EINVAL. (#4913)

This is the case on WSL.

6 years ago[mcs] Inflate referenced current types for imported type definitions. Fixes #56462
Marek Safar [Mon, 22 May 2017 14:58:26 +0000 (16:58 +0200)]
[mcs] Inflate referenced current types for imported type definitions. Fixes #56462

6 years ago[mcs] Removes TypeManager calls from MoreSpecific
Marek Safar [Mon, 22 May 2017 14:23:11 +0000 (16:23 +0200)]
[mcs] Removes TypeManager calls from MoreSpecific

6 years ago[ci] Add the collect-coverage tag for use on Jenkins. (#4912)
vkargov [Mon, 22 May 2017 12:43:28 +0000 (05:43 -0700)]
[ci] Add the collect-coverage tag for use on Jenkins. (#4912)

* [ci] Add the collect-coverage tag for use on Jenkins.

* Move collect-coverage up so we don't set different values for -O

6 years ago[mcs] extend API for loading types and consuming source file from a stream (#4905)
Bernhard Urban [Mon, 22 May 2017 10:40:19 +0000 (12:40 +0200)]
[mcs] extend API for loading types and consuming source file from a stream (#4905)

7 years agoBump api-snapshot
Alexander Köplinger [Fri, 19 May 2017 20:51:54 +0000 (22:51 +0200)]
Bump api-snapshot

7 years agoBump Roslyn to 2.3 preview
Marek Safar [Fri, 19 May 2017 15:33:32 +0000 (17:33 +0200)]
Bump Roslyn to 2.3 preview

7 years agoBump bockbuild
Alexis Christoforides [Fri, 19 May 2017 19:24:13 +0000 (15:24 -0400)]
Bump bockbuild

7 years agoBump the btls submodule
Alexander Köplinger [Fri, 19 May 2017 17:55:41 +0000 (19:55 +0200)]
Bump the btls submodule

Bring in the change that makes building the "tool" subdirectory
in BTLS off by default - we don't need it in Mono and it fails
to build on some platforms with older C++ compiler.

7 years ago[mcs] Report more unsafe code errors in iterators. Fixes #56616
Marek Safar [Fri, 19 May 2017 16:43:59 +0000 (18:43 +0200)]
[mcs] Report more unsafe code errors in iterators. Fixes #56616

7 years ago[build] Remove platforms from xbuild build
Marek Safar [Fri, 19 May 2017 13:11:29 +0000 (15:11 +0200)]
[build] Remove platforms from xbuild build

7 years ago[amd64] Fix the allocation of the caller area in filter clauses. Fixes #56567. (...
Zoltan Varga [Fri, 19 May 2017 15:37:38 +0000 (11:37 -0400)]
[amd64] Fix the allocation of the caller area in filter clauses. Fixes #56567. (#4903)

7 years ago[bcl] Dispose Cecil AssemblyDefinition after usage (#4900)
Alexander Köplinger [Fri, 19 May 2017 10:59:00 +0000 (12:59 +0200)]
[bcl] Dispose Cecil AssemblyDefinition after usage (#4900)

Follow-up to https://github.com/mono/mono/pull/4899. I audited
all the places in BCL where we made use of Cecil's AssemblyDefinition
and made sure we're properly disposing them and not keeping files
unnecessarily open.

I used InMemory=true in cases where tracking the lifetime would
be complicated. There are also some tests in mcs/tests which I
didn't bother to fix.

7 years agoWarn on failure to create default Reflection.Emit SymbolWriter instead of throwing...
Katelyn Gadd [Fri, 19 May 2017 07:24:49 +0000 (00:24 -0700)]
Warn on failure to create default Reflection.Emit SymbolWriter instead of throwing and failing (#4748)

* Bug #53038: Warn on failure to create default Reflection.Emit SymbolWriter (on platforms like Android that don't ship one) instead of throwing and failing

7 years ago[amd64] Remove the restriction on the locals stack size. Fixes #56452. (#4901)
Zoltan Varga [Fri, 19 May 2017 02:47:56 +0000 (22:47 -0400)]
[amd64] Remove the restriction on the locals stack size. Fixes #56452. (#4901)

7 years ago[interp] respect 64bit alignment on armv7
Bernhard Urban [Wed, 17 May 2017 19:52:18 +0000 (21:52 +0200)]
[interp] respect 64bit alignment on armv7

7 years ago[pdb2mdb] Dispose Cecil AssemblyDefinition on pdb2mdb (#4899)
Alexander Köplinger [Thu, 18 May 2017 19:41:08 +0000 (21:41 +0200)]
[pdb2mdb] Dispose Cecil AssemblyDefinition on pdb2mdb (#4899)

Context: https://bugzilla.xamarin.com/show_bug.cgi?id=56275

Recent Cecil 0.10 changed to not reading the assembly in memory but
instead reads directly from the underlying stream [0]. This however
means that the file handle is not freed until the AssemblyDefinition
is disposed.

Xamarin.Android is using the pdb2mdb source as part of
Xamarin.Android.Build.Tasks.dll and hit an issue where the file
would be locked inside of VS.

[0] http://cecil.pe/post/149243207656/mono-cecil-010-beta-1
(cherry picked from commit 5077205a44a7dc97edf6b67072bea53f043cf815)

7 years ago[configure] Add stdalign.h checks for BTLS to ARM platforms too
Alexander Köplinger [Thu, 18 May 2017 18:12:44 +0000 (20:12 +0200)]
[configure] Add stdalign.h checks for BTLS to ARM platforms too

We added it for x86/amd64 in 488b550ac0275c944e0a2c23be93173382084e5f
but missed adding that check when ARM was added recently.

7 years ago[aot] Fix a memory leak related to constraint allocation/deallocation. (#4880)
vkargov [Thu, 18 May 2017 18:08:58 +0000 (11:08 -0700)]
[aot] Fix a memory leak related to constraint allocation/deallocation. (#4880)

* [jit] Make a copy of the constraint in mini_get_shared_gparam().

* [aot] Free the temporary gshared constraint in decode_class_ref().

7 years agoFixes for bug#54388 "InternalsVisibleTo is case sensitive" * Fix the JIT so that...
Katelyn Gadd [Tue, 11 Apr 2017 09:34:43 +0000 (02:34 -0700)]
Fixes for bug#54388 "InternalsVisibleTo is case sensitive" * Fix the JIT so that access checks are performed on constructors * Use ASCII case insensitivity when performing cross-assembly access checks for internals * Update mcs to use case-insensitive comparisons when evaluating InternalsVisibleTo attributes for access checks (matching the new runtime behavior, and the behavior of roslyn)

This issue is actually a pair of bugs:
1. We don't perform any access checks for constructors (which can give a false impression of our behavior for this issue). This means that you can also invoke private constructors from other assemblies.
2. InternalsVisibleTo checks are done using strcmp instead of a case-insensitive comparison.

7 years ago[corlib] Bump DoubleWait test timeouts
Marek Safar [Thu, 18 May 2017 15:43:09 +0000 (17:43 +0200)]
[corlib] Bump DoubleWait test timeouts

7 years agoFix eglibc remapping and revive the test for its completeness. (#4896)
vkargov [Thu, 18 May 2017 15:04:58 +0000 (08:04 -0700)]
Fix eglibc remapping and revive the test for its completeness. (#4896)

* [eglib] Add the missing eglib remappings.

* [tests] Revive the eglib remapping completeness test.

7 years agoAdds System.Net.Http 4.3.2 to blacklist
Marek Safar [Thu, 18 May 2017 07:48:51 +0000 (09:48 +0200)]
Adds System.Net.Http 4.3.2 to blacklist

7 years ago[configure] Remove the --enable-dynamic-btls switch, it is the only option
Alexander Köplinger [Thu, 18 May 2017 10:58:57 +0000 (12:58 +0200)]
[configure] Remove the --enable-dynamic-btls switch, it is the only option

7 years ago[ci] Enable linker tests on PRs
Marek Safar [Tue, 16 May 2017 18:53:32 +0000 (20:53 +0200)]
[ci] Enable linker tests on PRs

7 years agoAdd linker tests
Marek Safar [Thu, 11 May 2017 19:08:25 +0000 (21:08 +0200)]
Add linker tests

7 years agoAdd LinkerDescriptor
Marek Safar [Tue, 9 May 2017 15:50:58 +0000 (17:50 +0200)]
Add LinkerDescriptor

7 years agoBump linker
Marek Safar [Wed, 10 May 2017 13:00:15 +0000 (15:00 +0200)]
Bump linker

7 years ago[runtime] Make RuntimeHelpers:SufficientExecutionStack () a no-op on android for...
Zoltan Varga [Wed, 17 May 2017 16:33:08 +0000 (12:33 -0400)]
[runtime] Make RuntimeHelpers:SufficientExecutionStack () a no-op on android for now. Fixes #56240. (#4889)

7 years ago[coop handles] Add mechanism to track handle leaks
Aleksey Kliger [Mon, 15 May 2017 22:47:14 +0000 (18:47 -0400)]
[coop handles] Add mechanism to track handle leaks

When MONO_HANDLE_TRACK_SP is defined, each handle records the native C stack pointer
at the time of its nearest enclosing HANDLE_FUNCTION_ENTER.  If a subsequent
handle is allocated with a lower stack pointer (in memory; ie higher in the
call tree) then a HANDLE_FUNCTION_RETURN is missing and we're leaking handles.

7 years ago[interp] assume EABI for passing arguments to arm trampoline
Bernhard Urban [Wed, 17 May 2017 12:40:31 +0000 (14:40 +0200)]
[interp] assume EABI for passing arguments to arm trampoline

7 years ago[interp] use helper function to check if generic inst is a value type
Bernhard Urban [Wed, 17 May 2017 11:40:58 +0000 (13:40 +0200)]
[interp] use helper function to check if generic inst is a value type

7 years ago[arm] respect thumb mode in mixed mode unwinding
Bernhard Urban [Wed, 17 May 2017 11:40:58 +0000 (13:40 +0200)]
[arm] respect thumb mode in mixed mode unwinding

7 years ago[interp] properly pass 64bit integers to native code on 32bit arches
Bernhard Urban [Wed, 17 May 2017 11:40:58 +0000 (13:40 +0200)]
[interp] properly pass 64bit integers to native code on 32bit arches

7 years ago[interp] disable some tests that fail on CI only
Bernhard Urban [Wed, 17 May 2017 11:40:58 +0000 (13:40 +0200)]
[interp] disable some tests that fail on CI only

can't reproduce the crash on my dev device, will investigate later.

7 years ago[interp] make mixed mode work on arm
Bernhard Urban [Wed, 17 May 2017 11:40:58 +0000 (13:40 +0200)]
[interp] make mixed mode work on arm

7 years ago[interp] generics/vt fix regarding elem size for ldelem.vt
Bernhard Urban [Wed, 17 May 2017 11:40:58 +0000 (13:40 +0200)]
[interp] generics/vt fix regarding elem size for ldelem.vt

7 years ago[interp] intrinsify System.Array.UnsafeLoad
Bernhard Urban [Wed, 17 May 2017 11:40:58 +0000 (13:40 +0200)]
[interp] intrinsify System.Array.UnsafeLoad

7 years ago[interp] add a conversion that is only required for 32bit
Bernhard Urban [Wed, 17 May 2017 11:40:58 +0000 (13:40 +0200)]
[interp] add a conversion that is only required for 32bit

7 years ago[interp] icall trampoline for arm
Bernhard Urban [Wed, 17 May 2017 11:40:58 +0000 (13:40 +0200)]
[interp] icall trampoline for arm

7 years ago[interp] make mixed mode work on arm64
Bernhard Urban [Wed, 17 May 2017 11:40:58 +0000 (13:40 +0200)]
[interp] make mixed mode work on arm64

7 years ago[interp] fix gcc warnings
Bernhard Urban [Wed, 17 May 2017 11:40:58 +0000 (13:40 +0200)]
[interp] fix gcc warnings

7 years ago[interp] fix conv.u4.r8 on arm64
Bernhard Urban [Wed, 17 May 2017 11:40:57 +0000 (13:40 +0200)]
[interp] fix conv.u4.r8 on arm64

7 years ago[interp/tramp] use MONO_STRUCT_OFFSET infrastructure and extract constants
Bernhard Urban [Wed, 17 May 2017 11:40:57 +0000 (13:40 +0200)]
[interp/tramp] use MONO_STRUCT_OFFSET infrastructure and extract constants

7 years ago[interp] implement icall_trampoline for arm64
Bernhard Urban [Wed, 17 May 2017 11:40:57 +0000 (13:40 +0200)]
[interp] implement icall_trampoline for arm64

7 years agoRename Microsoft.NuGet.Build.Tasks.dll.sources to exclude profile
Alexander Köplinger [Wed, 17 May 2017 12:14:04 +0000 (14:14 +0200)]
Rename Microsoft.NuGet.Build.Tasks.dll.sources to exclude profile

The earlier name sent gensources.sh into an infinite loop,
not sure why yet. The directory is only built for xbuild_14
anyway so this should be safe.

7 years agoFix tarball build
Alexander Köplinger [Wed, 17 May 2017 03:39:08 +0000 (05:39 +0200)]
Fix tarball build

The itanium backend was removed.

7 years agow32handle: double the available slots (#4856)
David Naylor [Wed, 17 May 2017 00:45:24 +0000 (02:45 +0200)]
w32handle: double the available slots (#4856)

Mono crashes if the system has more than ~128G of RAM.  Doubling the
number of slots fixes the SIGSEGV error on FreeBSD.

7 years ago[MacSDK] Remove some outdated info from ReadMe.rtf
Alexander Köplinger [Tue, 16 May 2017 22:27:43 +0000 (00:27 +0200)]
[MacSDK] Remove some outdated info from ReadMe.rtf

uninstallMono.sh is no longer installed.

The website has instructions for removing Mono:
http://www.mono-project.com/docs/about-mono/supported-platforms/osx/#uninstalling-mono-on-mac-os-x

7 years ago[btls] Add "desktop" ARM Linux configurations (for IoT, mostly) (#4875)
Jo Shields [Tue, 16 May 2017 20:24:29 +0000 (21:24 +0100)]
[btls] Add "desktop" ARM Linux configurations (for IoT, mostly) (#4875)

* [btls] Add "desktop" ARM Linux configurations (for IoT, mostly)

* [btls] Disable optimized asm on soft-float ARM

It depends on a NEON FPU, which we don't target on soft float

7 years ago[btls] Add MonoPInvokeCallback attribute on all full aot profiles (#4879)
Alexander Köplinger [Tue, 16 May 2017 19:29:49 +0000 (21:29 +0200)]
[btls] Add MonoPInvokeCallback attribute on all full aot profiles (#4879)

It was #ifdef'ed to only be available on monotouch before,
but the testing_aot_full profile in CI runs into this test failure:

```
MESSAGE:
System.ExecutionEngineException : Attempting to JIT compile method '(wrapper native-to-managed) Mono.Btls.MonoBtlsSslCtx:NativeVerifyCallback (intptr,int,intptr)' while running in aot-only mode. See https://developer.xamarin.com/guides/ios/advanced_topics/limitations/ for more information.

+++++++++++++++++++
STACK TRACE:
  at (wrapper managed-to-native) System.Object:__icall_wrapper_mono_thread_interruption_checkpoint ()
  at (wrapper managed-to-native) System.Runtime.InteropServices.Marshal:GetFunctionPointerForDelegateInternal (System.Delegate)
  at System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate[TDelegate] (TDelegate d) [0x00013] in <fa55a8c31ba0490383239e5850d81686>:0
  at Mono.Btls.MonoBtlsSslCtx..ctor (Mono.Btls.MonoBtlsSslCtx+BoringSslCtxHandle handle) [0x00059] in <18810f39bffc41dcb0263eb2043cc10e>:0
  at Mono.Btls.MonoBtlsSslCtx..ctor () [0x0000b] in <18810f39bffc41dcb0263eb2043cc10e>:0
  at Mono.Btls.MonoBtlsContext.InitializeConnection () [0x00000] in <18810f39bffc41dcb0263eb2043cc10e>:0
  at Mono.Btls.MonoBtlsContext.StartHandshake () [0x00000] in <18810f39bffc41dcb0263eb2043cc10e>:0
  at Mono.Net.Security.MobileAuthenticatedStream.ProcessHandshake (Mono.Net.Security.AsyncProtocolRequest asyncRequest, Mono.Net.Security.AsyncOperationStatus status) [0x00004] in <18810f39bffc41dcb0263eb2043cc10e>:0
  at Mono.Net.Security.AsyncProtocolRequest.ProcessOperation (Mono.Net.Security.AsyncOperationStatus status) [0x0006b] in <18810f39bffc41dcb0263eb2043cc10e>:0
  at Mono.Net.Security.AsyncProtocolRequest.ProcessOperation () [0x0000d] in <18810f39bffc41dcb0263eb2043cc10e>:0
  at Mono.Net.Security.AsyncProtocolRequest.StartOperation () [0x0003c] in <18810f39bffc41dcb0263eb2043cc10e>:0
  at Mono.Net.Security.AsyncProtocolRequest.StartOperation (Mono.Net.Security.AsyncOperation operation) [0x00024] in <18810f39bffc41dcb0263eb2043cc10e>:0
  at Mono.Net.Security.MobileAuthenticatedStream.ProcessAuthentication (System.Net.LazyAsyncResult lazyResult) [0x00057] in <18810f39bffc41dcb0263eb2043cc10e>:0
```

The attribute itself is already conditional on MONOTOUCH and
FULL_AOT_RUNTIME so simply removing the ifdef should fix the issue.

7 years agoMerge pull request #4877 from ntherning/fix-file-handle-leak-in-mono_mmap_open_file...
Niklas Therning [Tue, 16 May 2017 17:36:18 +0000 (19:36 +0200)]
Merge pull request #4877 from ntherning/fix-file-handle-leak-in-mono_mmap_open_file-on-windows

Fixes a file handle leak in mono_mmap_open_file() on Windows

7 years agoFixes a file handle leak in mono_mmap_open_file() on Windows. See
Niklas Therning [Tue, 16 May 2017 14:46:52 +0000 (16:46 +0200)]
Fixes a file handle leak in mono_mmap_open_file() on Windows. See
https://bugzilla.xamarin.com/show_bug.cgi?id=56493.

7 years ago[xbuild] Add web targets for 15.0 (#4868)
Mikayla Hutchinson [Tue, 16 May 2017 10:31:19 +0000 (06:31 -0400)]
[xbuild] Add web targets for 15.0 (#4868)

7 years ago[msvc] Remove order.xml (#4867)
Alexander Köplinger [Tue, 16 May 2017 10:10:34 +0000 (12:10 +0200)]
[msvc] Remove order.xml (#4867)

It's a build artifact anyway since we check in the generated csproj's
so you don't really need the order.xml.

After the new platform-specific BCL changes went in it also started
containing stuff like `-r:./../../class/lib/net_4_x-linux/mscorlib.dll`
which makes it even less useful to have checked in as it'd get
changed when you build on OSX for example.

7 years ago[threadpool] Fix alignment of ThreadPoolWorkerCounter (#4871)
Ludovic Henry [Tue, 16 May 2017 02:19:34 +0000 (22:19 -0400)]
[threadpool] Fix alignment of ThreadPoolWorkerCounter (#4871)

It is accessed with a 64bits atomic operation, so it needs to be 64bits aligned, even on a 32bits platform. A CPU exception EXC_ARM_DA_ALIGN triggers on armv7 32bits.

Fix https://bugzilla.xamarin.com/show_bug.cgi?id=56202

7 years agoMerge pull request #4752 from BrzVlad/feature-dynamic-nrs
Vlad Brezae [Tue, 16 May 2017 00:22:50 +0000 (03:22 +0300)]
Merge pull request #4752 from BrzVlad/feature-dynamic-nrs

[sgen] Dynamic nursery sizing

7 years agoInterp fixes (#4864)
Zoltan Varga [Mon, 15 May 2017 22:53:10 +0000 (18:53 -0400)]
Interp fixes (#4864)

* [interp] Add support for mkrefany,refanytype and refanyval.

* [interp] Avoid inlining empty methods marked with NoInlining.

* [interp] Fix the popping of arguments when inlining empty methods.

7 years agoSystem.Drawing: Various netstandard1.6 compat fixes (#4863)
Frederik Carlier [Mon, 15 May 2017 19:10:01 +0000 (21:10 +0200)]
System.Drawing: Various netstandard1.6 compat fixes (#4863)

Minor fixes which make System.Drawing compatible with netstandard1.6:
- Use MemoryStream.ToArray instead of .GetBuffer
- Use RuntimeInformation.IsOSPlatform to determine the operating system
- Use Stream.Dispose instead of Stream.Close
- Disable serialization support for exceptions
- Don't use AppDomain

7 years ago[amd64] Make more inline functions in header static (#4869)
Jonathan Pryor [Mon, 15 May 2017 17:36:48 +0000 (13:36 -0400)]
[amd64] Make more inline functions in header static (#4869)

Related: commit 00c6a94a

When [Xamarin.Android attempts to build with mono/2017-04][0], the
build breaks when cross-linking Windows code via MXE due to the
presence of an undefined `inline`d function:

./.libs/libmini.a(libmini_la-tramp-amd64.o):…/xamarin-android/external/mono/mono/mini/tramp-amd64.c:746:
undefined reference to `mono_arch_unwindinfo_get_size'

Turn `mono_arch_unwindinfo_find_pc_rt_func_in_table()` and
`mono_arch_unwindinfo_get_size()` into `static inline` functions so
that they don't cause "undefined reference" linker errors.

Additionally, audit the rest of `mono` to ensure there aren't any
other `inline` functions that aren't `static`:

$ git grep '\<inline\>' mono | grep -v static | grep -E '(\.c|\.h):'
# ~50 matches, all of which are in comments or otherwise not relevant.

[0]: https://jenkins.mono-project.com/view/Xamarin.Android/job/xamarin-android/388/

7 years ago[runtime] Remove ia64 backend, the Itanium architecture is dead. (#4859)
Zoltan Varga [Mon, 15 May 2017 17:04:32 +0000 (13:04 -0400)]
[runtime] Remove ia64 backend, the Itanium architecture is dead. (#4859)

7 years agoMerge pull request #4851 from kumpera/handle_eloop_errno
Rodrigo Kumpera [Mon, 15 May 2017 14:58:33 +0000 (07:58 -0700)]
Merge pull request #4851 from kumpera/handle_eloop_errno

[metadata] Handle ELOOP in mono_w32error_unix_to_win32.

7 years ago[System]: Update corefx/SR.cs in preparation of the upcoming HttpListener merge....
Martin Baulig [Mon, 15 May 2017 14:39:19 +0000 (10:39 -0400)]
[System]: Update corefx/SR.cs in preparation of the upcoming HttpListener merge. (#4849)

7 years ago[sre] Don't leak coop handles in mono_dynimage_encode_typedef_or_ref_full
Aleksey Kliger [Sat, 13 May 2017 01:24:49 +0000 (21:24 -0400)]
[sre] Don't leak coop handles in mono_dynimage_encode_typedef_or_ref_full

This function calls mono_class_get_ref_info which allocates a coop handle.
However it is called from an icall that wasn't converted to use coop handles
yet, so nothing was saving/restoring the handle stack mark, and consequently
the handles leak.

7 years agoUse handle macros to avoid leaking result of mono_type_get_object_handle
Jonathan Chambers [Fri, 12 May 2017 22:59:25 +0000 (18:59 -0400)]
Use handle macros to avoid leaking result of mono_type_get_object_handle

7 years ago[interp] update ignore list for CI
Bernhard Urban [Mon, 15 May 2017 12:11:30 +0000 (14:11 +0200)]
[interp] update ignore list for CI

7 years ago[msvc] Update csproj files (#4846)
monojenkins [Mon, 15 May 2017 12:23:05 +0000 (14:23 +0200)]
[msvc] Update csproj files (#4846)

7 years ago[image] follow up fix for 62bc1b229ee0501b706f3ea39524180c0ae7fc26
Bernhard Urban [Mon, 15 May 2017 07:48:45 +0000 (09:48 +0200)]
[image] follow up fix for 62bc1b229ee0501b706f3ea39524180c0ae7fc26

otherwise we try to access `ignored_assemblies_names` out of bounds

7 years ago[tests] Remove unreferenced bridge test targets
Vlad Brezae [Wed, 26 Apr 2017 00:44:11 +0000 (03:44 +0300)]
[tests] Remove unreferenced bridge test targets

These were changed and renamed in a previous commit.

7 years ago[sgen] Track down promoted size also with parallel minors
Vlad Brezae [Tue, 18 Apr 2017 16:45:26 +0000 (19:45 +0300)]
[sgen] Track down promoted size also with parallel minors

7 years ago[sgen] Use the idle object ops for worker jobs
Vlad Brezae [Wed, 12 Apr 2017 22:20:07 +0000 (01:20 +0300)]
[sgen] Use the idle object ops for worker jobs

We had the object ops set in the job when allocating the job (typically by the main gc thread). When enqueueing jobs, we leave their ops NULL, and when the worker actually executes the job, it will use the idle object ops, which can get dynamically optimized over the work cycle.

7 years ago[sgen] Don't execute jobs before actually starting the workers
Vlad Brezae [Wed, 12 Apr 2017 22:14:41 +0000 (01:14 +0300)]
[sgen] Don't execute jobs before actually starting the workers

It's counter intuitive and it might lead to races at some point.

7 years ago[sgen] Resize nursery according also to pause times
Vlad Brezae [Fri, 7 Apr 2017 23:21:48 +0000 (02:21 +0300)]
[sgen] Resize nursery according also to pause times

7 years ago[sgen] Dynamic nursery sizing
Vlad Brezae [Wed, 5 Apr 2017 10:11:01 +0000 (13:11 +0300)]
[sgen] Dynamic nursery sizing

We attempt to have a nursery that is as large as possible, while keeping a relative limit to the heap size.

7 years ago[sgen] Remove unused function
Vlad Brezae [Thu, 6 Apr 2017 23:25:02 +0000 (02:25 +0300)]
[sgen] Remove unused function

7 years ago[sgen] Remove some redundancy with nursery section
Vlad Brezae [Wed, 5 Apr 2017 22:18:27 +0000 (01:18 +0300)]
[sgen] Remove some redundancy with nursery section

7 years ago[sgen] Kill USER_CONFIG
Vlad Brezae [Mon, 3 Apr 2017 11:52:57 +0000 (14:52 +0300)]
[sgen] Kill USER_CONFIG

It is useless and confusing. We always support setting the nursery-size through MONO_GC_PARAMS.

7 years agoSystem.Drawing: netstandard1.6 compatibility: String fixes (#4862)
Frederik Carlier [Mon, 15 May 2017 00:39:24 +0000 (02:39 +0200)]
System.Drawing: netstandard1.6 compatibility: String fixes (#4862)

- ImageFormatConverter uses string.Compare to compare extensions for known file types. It uses CultureInfo.InvariantCulture,
  which is not available on netstandard1.6. Because all the extensions use ASCII-characters, StringCOmparsion.OrdinalIgnoreCase
  can be used, which is equivalent.
- Replace ToLower (CultureInfo.InvariantCulture) with .ToLowerInvariant ()

7 years ago[System.Drawing] NS1.6 compatibility: Use GetTypeInfo () where required (#4861)
Frederik Carlier [Mon, 15 May 2017 00:23:43 +0000 (02:23 +0200)]
[System.Drawing] NS1.6 compatibility: Use GetTypeInfo () where required (#4861)

* netstandard1.6 compatibility: Use GetTypeInfo () where required

A lot of methods have moved from Type to TypeInfo in netstandard1.6, add calls to GetTypeInfo ()
where required to support compiling System.Drawing on netstandard1.6

* Add missing using statement

7 years ago[csproj] Update generator to handle platform-specific assemblies (#4847)
Alexander Köplinger [Sat, 13 May 2017 15:26:35 +0000 (17:26 +0200)]
[csproj] Update generator to handle platform-specific assemblies (#4847)

After https://github.com/mono/mono/pull/4837 was merged the
csproj update bot started sending PRs which hardcoded net_4_x-linux
as the OutputPath.

Updated the csproj generator to detect this and use a variable
in the OutputPath instead. It'll autodetect based on the current OS
and can be overriden by passing /p:HostPlatform=foobar to msbuild.

Ideally we'd have configurations for each platform in the csproj since
in the future the file lists will be different but this is a first step.

7 years ago[runtime] Remove System.ValueTuple from denied assemblies. It's not needed
Marek Safar [Sat, 13 May 2017 07:31:59 +0000 (09:31 +0200)]
[runtime] Remove System.ValueTuple from denied assemblies. It's not needed
anymore because we have reference assemblies and it didn't work for mobile tools (e.g. linker)

7 years ago[MacSDK] Whitelist mono32
Alexander Köplinger [Sat, 13 May 2017 11:08:07 +0000 (13:08 +0200)]
[MacSDK] Whitelist mono32