mono.git
6 years agoMerge pull request #4327 from vkargov/vk-abcremedy
vkargov [Fri, 12 May 2017 00:02:57 +0000 (17:02 -0700)]
Merge pull request #4327 from vkargov/vk-abcremedy

[runtime] Abcrem fixes.

6 years ago[Facades] Update with new typeforwarders/APIs (#4838)
Alexander Köplinger [Thu, 11 May 2017 23:36:05 +0000 (01:36 +0200)]
[Facades] Update with new typeforwarders/APIs (#4838)

6 years ago[mcs] Add platform specific files (#4837)
Ludovic Henry [Thu, 11 May 2017 23:19:09 +0000 (19:19 -0400)]
[mcs] Add platform specific files (#4837)

* [mcs] Rework %-recursive target to explicitely list subdirectories

* [mcs] Rename PLATFORM to BUILD_PLATFORM

* [mcs] Add platform specific files

This is to support adding corefx platform specific files. To do that, we now support `mcs/class/corlib/linux_net_4_x_corlib.dll.sources` for example, on top of `mcs/class/corlib/net_4_x_corlib.dll.sources` and `mcs/class/corlib/corlib.dll.sources`.

The 3 platforms that are supported are: `linux`, `darwin` and `win32`.

* [mcs] Build cross-platform bcl in separate folder

6 years ago[System]: HttpListener.CreateSslStream() should always use passed-in callback. (...
Martin Baulig [Thu, 11 May 2017 20:20:38 +0000 (16:20 -0400)]
[System]: HttpListener.CreateSslStream() should always use passed-in callback. (#4835)

6 years agoRevert "[MacSDK] Include 'opt' as a PATH-available binary"
Alexander Köplinger [Thu, 11 May 2017 19:49:58 +0000 (21:49 +0200)]
Revert "[MacSDK] Include 'opt' as a PATH-available binary"

This reverts commit 47365cd54b69a869c50e39223ff64dc8e4fb8889.

We didn't do this in the private bockbuild and putting
'opt' from Mono into the PATH could be problematic.

This makes us consistent with the private bockbuild whitelist.

6 years agoSpecify Encoding.UTF8 when marshaling native runtime string. If not, string construct...
Jonathan Chambers [Thu, 11 May 2017 13:30:23 +0000 (09:30 -0400)]
Specify Encoding.UTF8 when marshaling native runtime string. If not, string constructor accesses Encoding.Default which causes infinite recursion on Windows for codepages supported via I18N. While trying to load I18N assemblies, assembly names are marshaled in managed code now hitting this code path. Fixes Xamarin bug 43988.

6 years ago[jit] Keep unwind info in the domain's memory pool. (#4825)
vkargov [Thu, 11 May 2017 16:33:41 +0000 (09:33 -0700)]
[jit] Keep unwind info in the domain's memory pool. (#4825)

6 years agoMerge pull request #4796 from lambdageek/dev-handles-may04
Aleksey Kliger (λgeek) [Thu, 11 May 2017 14:33:02 +0000 (10:33 -0400)]
Merge pull request #4796 from lambdageek/dev-handles-may04

[runtime] Another batch of coop handles icalls

6 years ago[MacSDK] Port change to license.rtf from private bockbuild
Alexander Köplinger [Wed, 10 May 2017 23:07:17 +0000 (01:07 +0200)]
[MacSDK] Port change to license.rtf from private bockbuild

https://github.com/xamarin/bockbuild/commit/97d660778097b391151776a611494a545becd62c

6 years agoMerge pull request #4816 from BrzVlad/fix-remoting-exception
Vlad Brezae [Wed, 10 May 2017 22:38:33 +0000 (01:38 +0300)]
Merge pull request #4816 from BrzVlad/fix-remoting-exception

[remoting] Serialize exceptions between domains inside try/catch

6 years agoMerge pull request #4818 from kumpera/unaligned-cleanup-2
Rodrigo Kumpera [Wed, 10 May 2017 20:23:08 +0000 (13:23 -0700)]
Merge pull request #4818 from kumpera/unaligned-cleanup-2

Last bucket of cleanups before I land the actual code for unaligned.

6 years ago[System]: Add new 'common-networking.sources' and move stuff from 'common.sources...
Martin Baulig [Wed, 10 May 2017 19:43:57 +0000 (15:43 -0400)]
[System]: Add new 'common-networking.sources' and move stuff from 'common.sources'. (#4815)

* [System]: Add new 'common-networking.sources' and move stuff from 'common.sources'.

This moves all the networking-related sources which aren't supported on monotouch_watch
into a separate file, so we don't have to maintain a huge "Thing That Should Not Exist".

* Put back System.Net/NtlmClient.cs - we actually do need it.

* Add HttpListenerTimeoutManager.platformnotsupported.cs.

* Make it build.

6 years ago[process] Disable tests that do not work on mobile (#4598)
Ludovic Henry [Wed, 10 May 2017 18:53:03 +0000 (14:53 -0400)]
[process] Disable tests that do not work on mobile (#4598)

7 years ago[msvc] Update csproj files (#4822)
monojenkins [Wed, 10 May 2017 16:31:46 +0000 (18:31 +0200)]
[msvc] Update csproj files (#4822)

7 years ago[security] Use coop handles for ves_icall_System_Security_Principal_WindowsIdentity_G...
Aleksey Kliger [Thu, 4 May 2017 14:16:20 +0000 (10:16 -0400)]
[security] Use coop handles for ves_icall_System_Security_Principal_WindowsIdentity_GetUserToken

7 years ago[security] Use coop handles for ves_icall_System_Security_Principal_WindowsIdentity_G...
Aleksey Kliger [Wed, 3 May 2017 19:35:38 +0000 (15:35 -0400)]
[security] Use coop handles for ves_icall_System_Security_Principal_WindowsIdentity_GetTokenName

7 years ago[security] Use coop handles for ves_icall_System_Security_Principal_WindowsIdentity_G...
Aleksey Kliger [Wed, 3 May 2017 19:17:35 +0000 (15:17 -0400)]
[security] Use coop handles for ves_icall_System_Security_Principal_WindowsIdentity_GetCurrentToken

Refactor it into mono_security_principal_windows_identity_get_current_token ()
and then call that from ves_icall_System_Security_Principal_WindowsIdentity_GetCurrentToken ()

7 years ago[runtime] Use coop handles for System.RuntimeMethodHandle.GetFunctionPointer
Aleksey Kliger [Wed, 3 May 2017 18:53:15 +0000 (14:53 -0400)]
[runtime] Use coop handles for System.RuntimeMethodHandle.GetFunctionPointer

7 years ago[sre] Use coop handles for ModuleBuilder.set_wrappers_type
Aleksey Kliger [Wed, 3 May 2017 18:21:33 +0000 (14:21 -0400)]
[sre] Use coop handles for ModuleBuilder.set_wrappers_type

7 years ago[sre] Use coop handles for ModuleBuilder.GetRegisteredToken
Aleksey Kliger [Wed, 3 May 2017 16:04:42 +0000 (12:04 -0400)]
[sre] Use coop handles for ModuleBuilder.GetRegisteredToken

- Fix typo in REFLECTION_EMIT_INIT/REFLECTION_EMIT_SAVE in
  mono_dynamic_image_register_token
- Add mono_dynamic_image_get_registered_token ()
- N.B. locking change - ves_icall_ModuleBuilder_GetRegisteredToken used to take
  the loader lock.  Now it calls mono_dynamic_image_get_registered_token which
  just takes the image lock.

7 years ago[runtime] Use coop handles for System.Environment.internalBroadcastSettingChange
Aleksey Kliger [Wed, 3 May 2017 15:17:35 +0000 (11:17 -0400)]
[runtime] Use coop handles for System.Environment.internalBroadcastSettingChange

7 years ago[locales] Use coop handles for System.Text.Normalization.load_normalization_resource
Aleksey Kliger [Fri, 28 Apr 2017 19:14:35 +0000 (15:14 -0400)]
[locales] Use coop handles for System.Text.Normalization.load_normalization_resource

7 years ago[sre] Use coop handles for System.Reflection.Emit.EnumBuilder.setup_enum_type
Aleksey Kliger [Fri, 28 Apr 2017 18:51:50 +0000 (14:51 -0400)]
[sre] Use coop handles for System.Reflection.Emit.EnumBuilder.setup_enum_type

7 years ago[sre] Use coop handles for System.Reflection.Emit.SignatureHelper.get_signature_local
Aleksey Kliger [Tue, 25 Apr 2017 22:43:32 +0000 (18:43 -0400)]
[sre] Use coop handles for System.Reflection.Emit.SignatureHelper.get_signature_local

7 years ago[sre] Use coop handles for System.Reflection.Emit.SignatureHelper.get_signature_field
Aleksey Kliger [Tue, 25 Apr 2017 21:26:44 +0000 (17:26 -0400)]
[sre] Use coop handles for System.Reflection.Emit.SignatureHelper.get_signature_field

7 years ago[loader] resolve symlinks when looking for an image in the loaded_images cache
Aleksey Kliger [Tue, 9 May 2017 21:56:03 +0000 (17:56 -0400)]
[loader] resolve symlinks when looking for an image in the loaded_images cache

Consider the old code (which just used mono_path_canonicalize)

Suppose foo.dll is a symlink to bar.dll

Suppose we've try to load foo.dll the first time:
do_mono_image_open is passed "foo.dll" it then sets image->name to "bar.dll"
which is then used by register_image to do a lookup and then inserts the
mapping from "bar.dll" to the new image (call it Image1).

Suppose we try to load foo.dll a second time:
we check for "foo.dll" in the loaded_images cache and get NULL.
So we call do_mono_image_open ("foo.dll", ...) again, and again image->name is
set to "bar.dll".  (Call this Image2)
We call register_image again which looks up bar.dll and gets Image1.  So it
increments the refcount for Image1 and unloads Image2 and so
mono_image_open_a_lot returns Image1.

With the new code:

The first time we try to load foo.dll everything is the same.  The second time
we try to load foo.dll, we resolve the symlink from "foo.dll" to "bar.dll" in
mono_image_open_a_lot and return Image1 directly from loaded_images.

7 years ago[System] Use 'ObjCRuntimeInternal' as the namespace instead of 'ObjCRuntime'. (#4820)
Rolf Bjarne Kvinge [Wed, 10 May 2017 14:52:01 +0000 (16:52 +0200)]
[System] Use 'ObjCRuntimeInternal' as the namespace instead of 'ObjCRuntime'. (#4820)

Use 'ObjCRuntimeInternal' as the namespace instead of 'ObjCRuntime' to avoid
these compiler-warnings when building xamarin-macios assemblies (which defines
the same types in the ObjCRuntime namespace, and to whom System.dll has an
InternalsVisibleTo attribute):

> xamarin-macios/src/build/watch/watch/Foundation/NSExtensionRequestHandling.g.cs(28,49): warning CS0436: The type `ObjCRuntime.INativeObject' conflicts with the imported type of same name'. Ignoring the imported type definition
> xamarin-macios/src/ObjCRuntime/INativeObject.cs(6,19): (Location of the symbol related to previous warning)
> xamarin-macios/_ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/lib/mono/Xamarin.WatchOS/repl/System.dll (Location of the symbol related to previous warning)

7 years ago[mini] Cleanup usage of mini_emit_memcpy and bad values for alignment - align to...
Rodrigo Kumpera [Tue, 9 May 2017 23:47:38 +0000 (16:47 -0700)]
[mini] Cleanup usage of mini_emit_memcpy and bad values for alignment - align to 4 on 64bits is *bad*.

7 years ago[jit] CPBLK and INITBLK now use the funtions in memory-access.c
Rodrigo Kumpera [Tue, 9 May 2017 23:01:47 +0000 (16:01 -0700)]
[jit] CPBLK and INITBLK now use the funtions in memory-access.c

7 years ago[jit] Add mini_emit_memory_copy_bytes and mini_emit_memory_init_bytes to be used...
Rodrigo Kumpera [Tue, 9 May 2017 20:50:30 +0000 (13:50 -0700)]
[jit] Add mini_emit_memory_copy_bytes and mini_emit_memory_init_bytes to be used by cpblk and iniblk.

7 years agoMerge pull request #4781 from kumpera/unaligned-cleanup-1
Rodrigo Kumpera [Tue, 9 May 2017 23:01:57 +0000 (19:01 -0400)]
Merge pull request #4781 from kumpera/unaligned-cleanup-1

First pass of cleanups to introduce a clear layer that deals with emiting load/stores.

7 years ago[remoting] Serialize exceptions between domains inside try/catch
Vlad Brezae [Tue, 9 May 2017 21:54:47 +0000 (00:54 +0300)]
[remoting] Serialize exceptions between domains inside try/catch

If a remote invoke in another domain throws an exception, the xdomain-dispatch wrapper will serialize the exception and pass it over to the calling domain so that it can be rethrown there. Serializing the exception object can itself throw an exception which we didn't properly catch, leading to unwinding to the caller domain without changing the domain state back and wreaking havoc.

If the serialization of the original exception throws a new exception, this new exception takes its place, being passed instead to the caller domain.

7 years agoBump corefx
Marek Safar [Tue, 9 May 2017 15:52:43 +0000 (17:52 +0200)]
Bump corefx

7 years ago[runtime] Update msvc build scripts.
Rodrigo Kumpera [Tue, 9 May 2017 20:51:11 +0000 (13:51 -0700)]
[runtime] Update msvc build scripts.

7 years ago[jit] Allow inlining of methods with the AggressiveInlining flag even if they make...
Zoltan Varga [Tue, 9 May 2017 19:36:22 +0000 (15:36 -0400)]
[jit] Allow inlining of methods with the AggressiveInlining flag even if they make calls. (#4811)

7 years ago[jit] Mark bblocks making calls to the corlib ThrowHelper class as out of line. ...
Zoltan Varga [Tue, 9 May 2017 18:33:26 +0000 (14:33 -0400)]
[jit] Mark bblocks making calls to the corlib ThrowHelper class as out of line. (#4812)

7 years ago[System.Data] Update cas test category
Marek Safar [Tue, 9 May 2017 17:14:51 +0000 (19:14 +0200)]
[System.Data] Update cas test category

7 years ago[mcs] Conditional check on attribute type needs to check its base types too
Marek Safar [Tue, 9 May 2017 17:02:48 +0000 (19:02 +0200)]
[mcs] Conditional check on attribute type needs to check its base types too

7 years ago[msvc] Update csproj files (#4813)
monojenkins [Tue, 9 May 2017 16:58:10 +0000 (18:58 +0200)]
[msvc] Update csproj files (#4813)

7 years ago[System]: Remove 'SECURITY_DEP' conditional from HttpListener and related classes...
Martin Baulig [Tue, 9 May 2017 15:22:19 +0000 (11:22 -0400)]
[System]: Remove 'SECURITY_DEP' conditional from HttpListener and related classes. (#4810)

7 years ago[tools] Add resx2sr to "build" profile (#4807)
Alexander Köplinger [Tue, 9 May 2017 12:28:10 +0000 (14:28 +0200)]
[tools] Add resx2sr to "build" profile (#4807)

Similar to 9635b9cea0515432fead4c370b0533db91861bfe we
can now break the dependency on WinForms from resx2sr.

This allows us to add it to the "build" profile
and clean up the Makefile.

7 years ago[jit] Add mini_emit_memory_store and use it for STOBJ.
Rodrigo Kumpera [Mon, 1 May 2017 23:36:33 +0000 (16:36 -0700)]
[jit] Add mini_emit_memory_store and use it for STOBJ.

7 years ago[jit] Fix identation.
Rodrigo Kumpera [Mon, 8 May 2017 23:11:58 +0000 (16:11 -0700)]
[jit] Fix identation.

7 years ago[jit] Use mini_emit_memory_load for ldind, ldobj and ldfld
Rodrigo Kumpera [Mon, 8 May 2017 23:11:45 +0000 (16:11 -0700)]
[jit] Use mini_emit_memory_load for ldind, ldobj and ldfld

7 years ago[jit] Add mini_emit_memory_load that is to be used to lower CIL memory loads.
Rodrigo Kumpera [Mon, 8 May 2017 23:09:28 +0000 (16:09 -0700)]
[jit] Add mini_emit_memory_load that is to be used to lower CIL memory loads.

7 years ago[System]: Add private '_internalLock' field to HttpListener. (#4809)
Martin Baulig [Mon, 8 May 2017 22:33:08 +0000 (18:33 -0400)]
[System]: Add private '_internalLock' field to HttpListener. (#4809)

After switching to the CoreFx version, HttpListener.Mono.cs will remain,
so it needs to use the proper locking object.

7 years ago[bcl] Add API diff for monotouch/monodroid profiles (#4805)
Alexander Köplinger [Mon, 8 May 2017 22:08:05 +0000 (00:08 +0200)]
[bcl] Add API diff for monotouch/monodroid profiles (#4805)

This runs the API diff against the monotouch and monodroid
profiles in addition to net_4_x to help us catch mistakes that
only affect the mobile profiles.

To make updating the API snapshot in case of an intentional change
easier without needing to build those profiles locally I added
a way to download the diff as a .patch file. You can just download
the file from the API diff Jenkins generates and apply it locally.

7 years ago[bcl] Cleanup outdated csproj/sln files (#4806)
Alexander Köplinger [Mon, 8 May 2017 22:07:45 +0000 (00:07 +0200)]
[bcl] Cleanup outdated csproj/sln files (#4806)

They were either replaced by the autogenerated csproj files
or just completely broken for years.

7 years ago[sdb] Avoid printing out the ThreadAbortException used to abort the protocol receiver...
Zoltan Varga [Mon, 8 May 2017 21:34:06 +0000 (17:34 -0400)]
[sdb] Avoid printing out the ThreadAbortException used to abort the protocol receiver thread. (#4804)

7 years ago[System]: Make HttpListener partial and move Mono-specific bits into HttpListener...
Martin Baulig [Mon, 8 May 2017 20:27:04 +0000 (16:27 -0400)]
[System]: Make HttpListener partial and move Mono-specific bits into HttpListener.Mono.cs. (#4808)

* [System]: Make HttpListener partial and move Mono-specific bits into HttpListener.Mono.cs.

* Remove ancient EMBEDDED_IN_1_0 conditional.

* Remove unused using statements.

* HttpListener.CreateSslStream() now uses RemoteCertificateValidationCallback.

7 years ago[System]: Rename the internal class 'ChunkStream' into 'MonoChunkStream'. (#4803)
Martin Baulig [Mon, 8 May 2017 16:13:50 +0000 (12:13 -0400)]
[System]: Rename the internal class 'ChunkStream' into 'MonoChunkStream'. (#4803)

* [System]: Fully stub-out SslStream on platforms where it's not supported.

* Remove 'SECURITY_DEP' conditional from LocalCertificateSelectionCallback.

* Add the internal delegates and remove 'SECURITY_DEP' from SslStream.platformnotsupported.cs.

* In SslStream.cs, we now provide the full API when '!SECURITY_DEP' using the
PlatformNotSupportedException()-based implementation from SslStream.platformnotsupported.cs

* [System]: Rename the internal class 'ChunkStream' into 'MonoChunkStream'.

Our 'ChunkStream' is used by 'WebConnection', so it will stay after using
HttpListener from corefx.

7 years ago[System]: Fully stub-out SslStream on platforms where it's not supported (#4802)
Martin Baulig [Mon, 8 May 2017 16:12:08 +0000 (12:12 -0400)]
[System]: Fully stub-out SslStream on platforms where it's not supported (#4802)

* [System]: Fully stub-out SslStream on platforms where it's not supported.

* Remove 'SECURITY_DEP' conditional from LocalCertificateSelectionCallback.

* Add the internal delegates and remove 'SECURITY_DEP' from SslStream.platformnotsupported.cs.

* In SslStream.cs, we now provide the full API when '!SECURITY_DEP' using the
PlatformNotSupportedException()-based implementation from SslStream.platformnotsupported.cs

* Fix typo.

7 years agoMerge pull request #4799 from xmcclure/mingw-has-secure-api
Rodrigo Kumpera [Mon, 8 May 2017 16:07:46 +0000 (12:07 -0400)]
Merge pull request #4799 from xmcclure/mingw-has-secure-api

Fix mingw/mxe build

7 years ago[mono-error] Always call TLE(string,string) constructor
Aleksey Kliger [Tue, 2 May 2017 20:44:33 +0000 (16:44 -0400)]
[mono-error] Always call TLE(string,string) constructor

if assembly name is NULL, mono_exception_from_name_two_strings_checked looks
for a TLE(string) constructor - which takes a message - which we immediately
overwrite.

So pass the empty string instead, which goes to the (Mono-specific)
TLE(string,string) constructor which intializes ClassName and AssemblyName
members of a TLE.

7 years ago[runtime] Fail classes that have a field with a bad underlying type
Aleksey Kliger [Mon, 1 May 2017 14:55:41 +0000 (10:55 -0400)]
[runtime] Fail classes that have a field with a bad underlying type

If a class T has a field e of enum type E, and E is either
incomplete (EnumBuilder that hasn't had CreateType called) or a broken class,
then mark T as failed.

7 years ago[test] Don't crash if incomplete enum type is a static field in a class
Aleksey Kliger [Tue, 2 May 2017 20:42:58 +0000 (16:42 -0400)]
[test] Don't crash if incomplete enum type is a static field in a class

7 years agoFix mingw/mxe build
Andi McClure [Fri, 5 May 2017 17:29:18 +0000 (13:29 -0400)]
Fix mingw/mxe build

wcscat_s is not available on mingw unless a special symbol is defined. Add this symbol to exceptions-amd64.c

7 years ago[jit] Fix 4c0df6de333fe18abb97fbc7ea8f6e77d92f5451, use __GNUC__ instead of GNUC.
Zoltan Varga [Fri, 5 May 2017 12:28:36 +0000 (08:28 -0400)]
[jit] Fix 4c0df6de333fe18abb97fbc7ea8f6e77d92f5451, use __GNUC__ instead of GNUC.

7 years ago[interp] do widening for more arith ops
Bernhard Urban [Wed, 3 May 2017 08:45:40 +0000 (10:45 +0200)]
[interp] do widening for more arith ops

7 years ago[configure.ac] Fix inadvertently invoking X server (#4792)
Alexander Köplinger [Thu, 4 May 2017 22:04:43 +0000 (00:04 +0200)]
[configure.ac] Fix inadvertently invoking X server (#4792)

I noticed this when I cleaned my Mono repo and reran autogen.sh.
I suddenly got a popup from XQuartz about "Unrecognized option: =".

Turns out this was introduced in 9e967f00b3073671b340c1a4e3da7253d5213668,
the second half of the if is missing `test`, so it actually runs
`x = xyes` which starts XQuartz :D

Also cleaned up the USE_NLS checking since that ran immediately
before this and just printed "no" before which confused me.

7 years agoMerge pull request #4782 from lambdageek/dev-mono_string_new-excise
Aleksey Kliger (λgeek) [Thu, 4 May 2017 21:31:01 +0000 (17:31 -0400)]
Merge pull request #4782 from lambdageek/dev-mono_string_new-excise

[runtime] Mark mono_string_new external only

7 years agoMerge pull request #4788 from xmcclure/if-winrt
Andi McClure [Thu, 4 May 2017 20:56:12 +0000 (16:56 -0400)]
Merge pull request #4788 from xmcclure/if-winrt

Fix hybrid AOT build

7 years ago[System]: Fix TLS Provider registration and use BTLS instead of Legacy. (#4793)
Martin Baulig [Thu, 4 May 2017 20:51:16 +0000 (16:51 -0400)]
[System]: Fix TLS Provider registration and use BTLS instead of Legacy. (#4793)

7 years agoRequire #if WIN_PLATFORM more strictly around some WinRT timezone functions
Andi McClure [Wed, 3 May 2017 21:34:07 +0000 (17:34 -0400)]
Require #if WIN_PLATFORM more strictly around some WinRT timezone functions

This was breaking the hybrid AOT build.

7 years ago[runtime] Mark mono_string_new external only
Aleksey Kliger [Tue, 2 May 2017 17:38:10 +0000 (13:38 -0400)]
[runtime] Mark mono_string_new external only

Runtime should use mono_string_new_checked

7 years ago[interp] Use mono_string_new_checked instead of mono_string_new
Aleksey Kliger [Tue, 2 May 2017 17:37:46 +0000 (13:37 -0400)]
[interp] Use mono_string_new_checked instead of mono_string_new

7 years ago[mini] Use mono_string_new_checked instead of mono_string_new
Aleksey Kliger [Tue, 2 May 2017 16:00:33 +0000 (12:00 -0400)]
[mini] Use mono_string_new_checked instead of mono_string_new

(mono-security-windows.c) (aot-compiler.c) (debugger-agent.c) (driver.c) (mini-exceptions.c)

7 years ago[runtime] Use coop handles for some simple icalls
Aleksey Kliger [Mon, 1 May 2017 19:43:02 +0000 (15:43 -0400)]
[runtime] Use coop handles for some simple icalls

- System.Text.EncodingHelper.InternalCodePage
- System.Runtime.InteropServices.Marshal.PtrToStringAnsi(intptr)
- Use coop handles for ves_icall_System_Configuration_DefaultConfig_get_machine_config_path
- Use coop handles for ves_icall_System_Configuration_InternalConfigurationHost_get_bundled_app_config
- Use coop handles for System.Web.Util.ICalls.GetMachineInstallDirectory

7 years ago[locales] Use coop handles for System.Globalization.CultureInfo.get_current_locale_name
Aleksey Kliger [Mon, 1 May 2017 20:33:18 +0000 (16:33 -0400)]
[locales] Use coop handles for System.Globalization.CultureInfo.get_current_locale_name

7 years ago[runtime] Use coop handles for System.Environment icalls
Aleksey Kliger [Mon, 1 May 2017 18:47:24 +0000 (14:47 -0400)]
[runtime] Use coop handles for System.Environment icalls

- get_UserName
- get_NewLine
- get_MachineName
- GetWindowsFolderPath
- GetOSVersionString

MonoError-ize mono_icall_get_environment_variable_names

7 years ago[appdomain] Make mono_domain_set_config external only
Aleksey Kliger [Fri, 28 Apr 2017 19:38:05 +0000 (15:38 -0400)]
[appdomain] Make mono_domain_set_config external only

Runtime should use mono_domain_config_checked ()

7 years ago[locales] Use mono_string_new_checked instead of mono_string_new
Aleksey Kliger [Mon, 1 May 2017 22:15:17 +0000 (18:15 -0400)]
[locales] Use mono_string_new_checked instead of mono_string_new

7 years ago[runtime] Use mono_string_new_checked instead of mono_string_new
Aleksey Kliger [Fri, 28 Apr 2017 19:37:22 +0000 (15:37 -0400)]
[runtime] Use mono_string_new_checked instead of mono_string_new

(w32file.c) (filewatcher.c) (appdomain.c) (attach.c) (appdomain.c)
(gc.c) (marshal.c) (mono-perfcounters.c) (mono-security.c) (object.c)
(sre.c) (threadpool.c) (threads.c) (w32process.c) (w32socket.c)

7 years ago[jit] Compile unwinder_unwind_frame without optimization on arm64 as old gcc versions...
Zoltan Varga [Thu, 4 May 2017 15:58:59 +0000 (11:58 -0400)]
[jit] Compile unwinder_unwind_frame without optimization on arm64 as old gcc versions seems to miscompile it.

7 years ago[mono-route] Use _checked functions
Aleksey Kliger [Tue, 2 May 2017 15:56:38 +0000 (11:56 -0400)]
[mono-route] Use _checked functions

And include config.h

7 years ago[mono-error] Use mono_string_new_checked instead of mono_string_new
Aleksey Kliger [Mon, 1 May 2017 14:43:16 +0000 (10:43 -0400)]
[mono-error] Use mono_string_new_checked instead of mono_string_new

7 years ago[runtime] Use mono_string_new_checked in exception.c
Aleksey Kliger [Mon, 1 May 2017 18:18:22 +0000 (14:18 -0400)]
[runtime] Use mono_string_new_checked in exception.c

7 years ago[pedump] Fix running with cooperative GC
Aleksey Kliger [Wed, 3 May 2017 21:34:50 +0000 (17:34 -0400)]
[pedump] Fix running with cooperative GC

This is the pedump analog of 9f5115a343213e7ce27b197c96274cc611a05284
which fixed monodis under coop.

7 years ago[bcl] Add .NET 4.7 reference assemblies (#4791)
Alexander Köplinger [Thu, 4 May 2017 10:56:27 +0000 (12:56 +0200)]
[bcl] Add .NET 4.7 reference assemblies (#4791)

7 years ago[System.Net.Http] Fix XI build
Alexander Köplinger [Thu, 4 May 2017 04:11:24 +0000 (06:11 +0200)]
[System.Net.Http] Fix XI build

7 years ago[jit] Fix memory leak in trampoline info registration. (#4775)
vkargov [Wed, 3 May 2017 20:28:58 +0000 (13:28 -0700)]
[jit] Fix memory leak in trampoline info registration. (#4775)

7 years ago[MacSDK] Build msbuild for Release config
Alexis Christoforides [Wed, 3 May 2017 19:56:47 +0000 (15:56 -0400)]
[MacSDK] Build msbuild for Release config

7 years agoMerge pull request #4787 from BrzVlad/fix-degraded-mode
Vlad Brezae [Wed, 3 May 2017 19:47:01 +0000 (22:47 +0300)]
Merge pull request #4787 from BrzVlad/fix-degraded-mode

[sgen] Fix accidental triggering of degraded mode

7 years agoBump bockbuild
Alexis Christoforides [Wed, 3 May 2017 18:50:27 +0000 (14:50 -0400)]
Bump bockbuild

7 years agoMerge pull request #4780 from xmcclure/assembly-loader-default
Andi McClure [Wed, 3 May 2017 17:45:44 +0000 (13:45 -0400)]
Merge pull request #4780 from xmcclure/assembly-loader-default

Document --assembly-loader and change default to 'legacy'

7 years agoDocument --assembly-loader, change default to 'legacy' and fix comment
Andi McClure [Mon, 1 May 2017 20:11:43 +0000 (16:11 -0400)]
Document --assembly-loader, change default to 'legacy' and fix comment

Also set testing_gac tests to use --assembly-loader=strict, since it is no longer the default

7 years ago[sgen] Fix accidental triggering of degraded mode
Vlad Brezae [Wed, 3 May 2017 14:11:00 +0000 (17:11 +0300)]
[sgen] Fix accidental triggering of degraded mode

We trigger degraded mode when we are unable to properly build the nursery fragments due to excessive nursery pinning. This is done by initializing degraded_mode at the end of a minor. alloc_degraded is used to do allocation to major heap either as part of mature allocation or as part of degraded mode (when we bump the degraded_mode so we can detect when the next minor should be triggered).

When failing to allocate from the nursery after doing a minor (because the other threads might have already consumed the nursery) we need to do a mature allocation (as a fallback) instead of a degraded mode allocation so we don't uselessly enable the mode.

7 years agoMixed mode exception handling (#4777)
Zoltan Varga [Wed, 3 May 2017 04:45:59 +0000 (00:45 -0400)]
Mixed mode exception handling (#4777)

* [mixed] Add beginnings of unwinding support for interp->jit transitions by pushing an LMF frame on the stack when exiting interpreted code.

* [runtime] Add a mono_debug_lookup_source_location_by_il () helper function to lookup a source location using an IL offset.

* [mixed] Add support for mixed mode managed stack walks.

* [interp] Generate line number info for interpreted code, using the same MonoDebugMethodJitInfo structure used by the JIT.

* [interp] Pass the clause index to the MINT_ENDFINALLY opcode. Not yet used.

* [interp] Create a MonoJitInfo structure for each interpreted method. Not yet used.

* [interp] Add a mono_interp_set_resume_state () function which can be used to set the frame/ip the interpreter will resume execution from when execution returns to it.

* [mixed] Add support for mixed mode exception handling by extending the normal JIT exception handling code in mini-exceptions.c to handle interpreted frames as well.

* [jit] Add an Unwinder type to reduce the amount of code duplication when unwinding though interpreter frames.

* [interp] Fix the !ENABLE_INTERPRETER build.

* [interp] Disable an assert which is hit even when running without --interpreter.

* Fix a comment.

* [interp] Fix an assertion. Fix/add comments.

7 years ago[loader] Add a few Framework Facades assemblies (#4784)
Aleksey Kliger (λgeek) [Tue, 2 May 2017 23:01:28 +0000 (19:01 -0400)]
[loader] Add a few Framework Facades assemblies (#4784)

that were previously missing, or mislabeled as ordinary framework assemblies.

7 years ago[MacSDK] Add 'csc' (Roslyn compiler) to whitelist
Alexis Christoforides [Tue, 2 May 2017 17:10:00 +0000 (13:10 -0400)]
[MacSDK] Add 'csc' (Roslyn compiler) to whitelist

7 years ago[jit] Move memcpy and memset emmiters to new file called memory-access.c
Rodrigo Kumpera [Mon, 1 May 2017 20:50:22 +0000 (13:50 -0700)]
[jit] Move memcpy and memset emmiters to new file called memory-access.c

7 years ago[mini] Rename & expose a few functions to mini.h.
Rodrigo Kumpera [Mon, 1 May 2017 20:14:37 +0000 (13:14 -0700)]
[mini] Rename & expose a few functions to mini.h.

This adds to mini.h & fixes naming of the following functions:
emit_get_gsharedvt_info_klass
mono_emit_calli
get_memcpy_method
get_memset_method
emit_memory_barrier
emit_runtime_constant
mini_class_check_context_used
mono_emit_wb_aware_memcpy
emit_write_barrier

Those functions will be used later by the memory access functions to be extracted out of method-to-ir.c

7 years ago[ci] Output nunit xml if "verify" test step fails
Alexander Köplinger [Sat, 29 Apr 2017 21:43:53 +0000 (23:43 +0200)]
[ci] Output nunit xml if "verify" test step fails

Allows us to better catch this on Jenkins.

7 years ago[ci] Don't fail when setting GitHub status doesn't work
Alexander Köplinger [Sat, 29 Apr 2017 21:17:27 +0000 (23:17 +0200)]
[ci] Don't fail when setting GitHub status doesn't work

7 years ago[msvc] Update csproj files (#4776)
monojenkins [Sat, 29 Apr 2017 16:35:42 +0000 (18:35 +0200)]
[msvc] Update csproj files (#4776)

7 years agoMerge pull request #4767 from lambdageek/bug-55681
Aleksey Kliger (λgeek) [Fri, 28 Apr 2017 21:44:27 +0000 (17:44 -0400)]
Merge pull request #4767 from lambdageek/bug-55681

[sre-save] Handle ConstructorBuilder custom attribute constructors

7 years agoMerge pull request #4759 from lambdageek/flags-strict-strong-names
Aleksey Kliger (λgeek) [Fri, 28 Apr 2017 21:43:50 +0000 (17:43 -0400)]
Merge pull request #4759 from lambdageek/flags-strict-strong-names

Put strict strong name checking behind a configure flag and runtime option

7 years ago[interp] implement MONO_JIT_{AT,DE}TACH, so native2managed wrappers can be handled...
Bernhard Urban [Wed, 26 Apr 2017 15:21:30 +0000 (17:21 +0200)]
[interp] implement MONO_JIT_{AT,DE}TACH, so native2managed wrappers can be handled by the interpreter

7 years ago[interp] implement CEE_MONO_{TLS,ATOMIC_STORE_I4}
Bernhard Urban [Wed, 26 Apr 2017 15:21:28 +0000 (17:21 +0200)]
[interp] implement CEE_MONO_{TLS,ATOMIC_STORE_I4}

so we can execute the alloc wrapper

7 years ago[interp] remove ves_exec_method_with_context_with_ip, othwerwise we end up having...
Bernhard Urban [Wed, 26 Apr 2017 15:21:24 +0000 (17:21 +0200)]
[interp] remove ves_exec_method_with_context_with_ip, othwerwise we end up having to native frames for each managed frame in the debugger

and that's annoying.