platform/upstream/dotnet/runtime.git
5 years agoAdd MONO_LLVM_INTERNAL to re-fix LLVM AOT with loadedllvm
Jo Shields [Wed, 3 Apr 2019 17:19:57 +0000 (13:19 -0400)]
Add MONO_LLVM_INTERNAL to re-fix LLVM AOT with loadedllvm

Commit migrated from https://github.com/mono/mono/commit/656208c0047eee2d21319ed249f306680b913da7

5 years ago[netcore] Simplify runtime and tests synchronization
Marek Safar [Wed, 3 Apr 2019 13:27:48 +0000 (15:27 +0200)]
[netcore] Simplify runtime and tests synchronization

Commit migrated from https://github.com/mono/mono/commit/9bdf6c2c6c72e139db5dab5dcb800d1c4a7a2bc2

5 years ago[netcore] Bump SDK version
Filip Navara [Tue, 2 Apr 2019 22:15:14 +0000 (00:15 +0200)]
[netcore] Bump SDK version

Commit migrated from https://github.com/mono/mono/commit/bd8ec579016b8512931f7f872e18e260013eb23e

5 years agoRename cabs/cimag/creal to mono_cabs/mono_cimag/mono_creal without macro to rename...
Jay Krell [Wed, 3 Apr 2019 07:26:28 +0000 (00:26 -0700)]
Rename cabs/cimag/creal to mono_cabs/mono_cimag/mono_creal without macro to rename. (mono/mono#13663)

Also make cimag/creal macros for guaranteed inlining -- instead of passing structs by value.
And add spaces before parens to follow coding convention (which is designed
to ease low tech searches for entire words).

This was agreed to when the code was first ported to C++ but got dropped.
The compromise though was to put the defines relatively late to limit their impact.

Commit migrated from https://github.com/mono/mono/commit/5ed727ed8ec595ad440c9f70a69d9bc970eccb86

5 years agoMerge pull request mono/mono#13797 from directhex/remove-csc-dim-some-more
Jo Shields [Tue, 2 Apr 2019 18:04:55 +0000 (14:04 -0400)]
Merge pull request mono/mono#13797 from directhex/remove-csc-dim-some-more

Remove csc-dim script, since csc-dim is gone

Commit migrated from https://github.com/mono/mono/commit/688ac23fb69edb61995369d162b90b1bfc73ebb3

5 years ago[netcore] Cleanup + test fixes (mono/mono#13795)
Filip Navara [Tue, 2 Apr 2019 15:49:20 +0000 (17:49 +0200)]
[netcore] Cleanup + test fixes (mono/mono#13795)

Avoid using `wget` since it's not installed on macOS by default.

Commit migrated from https://github.com/mono/mono/commit/02be9aeba324089a46a10a1cecddf40826e71f64

5 years ago[netcore] Fix few Array tests (mono/mono#13756)
Egor Bogatov [Tue, 2 Apr 2019 12:48:53 +0000 (15:48 +0300)]
[netcore] Fix few Array tests (mono/mono#13756)

* fix test

* fix tests

* Fix ArgumentNullException empty ParamName

* System.Text.Tests.StringBuilderTests are fine

* fix BlockCopy test

* enable more tests

* Enable more tests

* address feedback

Commit migrated from https://github.com/mono/mono/commit/3bb6fe8797d70edd53330fe391a042f7c74a1978

5 years ago[netcore] Fixes for System.Reflection tests. (mono/mono#13776)
Zoltan Varga [Tue, 2 Apr 2019 07:02:25 +0000 (03:02 -0400)]
[netcore] Fixes for System.Reflection tests. (mono/mono#13776)

* [netcore] Add error checking for assembly version parsing, pass the full 32 bit value to managed code.

* [netcore] Implement RuntimeType.StructLayoutAttribute.

* [runtime] Implement RuntimeFieldHandle.GetValueDirect (), convert SetValueDirect () to handles.

* [netcore] Implement Assembly.GetFiles ()/GetForwardedTypes ().

* [runtime] Handle 'ARM' as a valid architecture in assembly name parsing.

* [netcore] Implement ParameterInfo.MarshalAsAttribute, AssemblyName.EscapedCodeBase.

* [netcore] Add exclusions for System.Reflection.Tests.

* [netcore] Update test exclusions.

* [netcore] Fix CustomAttributeExtensions.

* [netcore] Add a list of passing test suites.

* [netcore] Add a missing argument check.

* Update Object.cs

Commit migrated from https://github.com/mono/mono/commit/df846bcbc9706e325f3b5dca4d09530b80e9db83

5 years ago[netcore] Add exception for System.Threading.ThreadPool tests
Filip Navara [Mon, 1 Apr 2019 21:44:00 +0000 (23:44 +0200)]
[netcore] Add exception for System.Threading.ThreadPool tests

Commit migrated from https://github.com/mono/mono/commit/a63a85b21d8bb9494aacec2ef796290daaf8a1dc

5 years ago[netcore] Add exception for System.IO tests
Filip Navara [Mon, 1 Apr 2019 21:39:21 +0000 (23:39 +0200)]
[netcore] Add exception for System.IO tests

Commit migrated from https://github.com/mono/mono/commit/ed01dc0e92fb147b9266d1515a0543d4e2d1656d

5 years ago[netcore] Add exception for System.Text.Json tests
Filip Navara [Mon, 1 Apr 2019 21:23:13 +0000 (23:23 +0200)]
[netcore] Add exception for System.Text.Json tests

Commit migrated from https://github.com/mono/mono/commit/8b2463b57cbd2d2cf1e2842e3b70660fc2187a02

5 years ago[netcore] Fix a number of SRE argument checking failures.
Zoltan Varga [Mon, 1 Apr 2019 04:46:03 +0000 (00:46 -0400)]
[netcore] Fix a number of SRE argument checking failures.

Commit migrated from https://github.com/mono/mono/commit/cee8934bcedbf9617d0f87a01d0634b2af3dc992

5 years ago[sre] Emit custom modifiers for return values.
Zoltan Varga [Mon, 1 Apr 2019 03:47:02 +0000 (23:47 -0400)]
[sre] Emit custom modifiers for return values.

Commit migrated from https://github.com/mono/mono/commit/476514ec988c05cc4f80b191692641ed9a6c6a4f

5 years agoFix tarball builds
Jo Shields [Mon, 1 Apr 2019 19:50:51 +0000 (15:50 -0400)]
Fix tarball builds

Commit migrated from https://github.com/mono/mono/commit/262a543a17bad3fb43ff42501b7c3eea0bbf5f71

5 years agoAdd netcore/Makefile to .gitignore (mono/mono#13771)
Martin Baulig [Mon, 1 Apr 2019 18:14:22 +0000 (14:14 -0400)]
Add netcore/Makefile to .gitignore (mono/mono#13771)

Commit migrated from https://github.com/mono/mono/commit/f42f1026cd8a015c45c13aca77613e1c0370823d

5 years ago[interp] Add Internal.Runtime.CompilerServices.Unsafe intrinsics. (mono/mono#13732)
Zoltan Varga [Mon, 1 Apr 2019 17:15:52 +0000 (13:15 -0400)]
[interp] Add Internal.Runtime.CompilerServices.Unsafe intrinsics. (mono/mono#13732)

[interp] Add Internal.Runtime.CompilerServices.Unsafe intrinsics.

Commit migrated from https://github.com/mono/mono/commit/37a09e9eb0deee136fe875d36345e318cfd103ed

5 years agoFix a few deficiencies in mono_path_filename_in_basedir. Mainly strstr. (mono/mono...
Jay Krell [Mon, 1 Apr 2019 16:43:10 +0000 (09:43 -0700)]
Fix a few deficiencies in mono_path_filename_in_basedir. Mainly strstr. (mono/mono#13719)

* Fix a few deficiencies in mono_path_filename_in_basedir.
The main one is that strstr is too loose.
Add tests.
Make it case insensitive on Win32 and allow some denormal input.
 Note that case sensitivity is a function of file system, not
 operating system, but a lot of code gets it wrong, so here does too.

Add more data to asserts.

Account for test reality -- filename is not absolute.

The Win32 code paths can be tested on Unix and vice versa
w/o compromise. See https://github.com/mono/mono/pull/13707

* Reduce testing per PR feedback.

* Edit/add comments.
This is an attempt to clarify and hopefully doesn't backfire.

* Try to make tests clearer, and stop skipping some oops.

* PR: Restore case insensitivity testing on Windows. Tweak a little bit.

* Include the .c file instead of .h to fix some builds.

Commit migrated from https://github.com/mono/mono/commit/ff1d485b56bec3d62a83f9dbeb29548aa353b014

5 years agoMerge pull request mono/mono#13767 from directhex/master
Jo Shields [Mon, 1 Apr 2019 15:40:54 +0000 (11:40 -0400)]
Merge pull request mono/mono#13767 from directhex/master

Bump version to 6.3

Commit migrated from https://github.com/mono/mono/commit/c4eb7d679be48286122bcc03ba261d2bef9df389

5 years agoBump version to 6.3
Jo Shields [Mon, 1 Apr 2019 14:43:21 +0000 (10:43 -0400)]
Bump version to 6.3

Commit migrated from https://github.com/mono/mono/commit/b198ef5ad697005a86aaf73d3229d19bd9aef9f5

5 years agoFix WASM build (mono/mono#13763)
Filip Navara [Mon, 1 Apr 2019 10:15:50 +0000 (12:15 +0200)]
Fix WASM build (mono/mono#13763)

Broken by https://github.com/mono/mono/pull/13712.

Commit migrated from https://github.com/mono/mono/commit/acb8dd1183acb4ed4b9b967004a0499cf44de45c

5 years ago[sdks,mac] Remove dependency on MXE in favor of MinGW
Marek Habersack [Tue, 15 Jan 2019 16:29:05 +0000 (17:29 +0100)]
[sdks,mac] Remove dependency on MXE in favor of MinGW

It turns out that homebrew now has a package for the MinGW gcc-based windows
cross compiler which is awesome as it allows us to skip building MXE and use the
latest version of the GCC suite pre-packaged for Mac. This commit removes almost
all traces of MXE (except for `mxe.mk` itself, because I don't know if any bot
or external tool, whatever, use targets in it) and adds the following brew
packages to SDK bot provisioning as well as to the `provision-mxe` target of
Mono SDKs:

  * mingw-w64
  * xamarin/xamarin-android-windeps/mingw-zlib

The latter package builds a Windows version of zlib using MinGW and it comes
from Xamarin's own homebrew tap at https://github.com/xamarin/homebrew-xamarin-android-windeps/blob/mono/mono@f4cc90845ff1953800d8d71035566a12d9b7aa24/mingw-zlib.rb

Additionally, this commit adds a new `configure` flag: `--with-static-zlib=PATH`
which allows one to specify the static zlib archive to use when linking Mono.
The static archive supersedes the otherwise indicated or detected zlib. This is
the recommended mode of operation for MinGW builds as it avoids problems with
`zlib.dll` versions on the target machine.

Commit migrated from https://github.com/mono/mono/commit/acbeffd07339aea56f3157d2dd88d27e7f24d538

5 years ago[System.Private.CoreLib/mscorlib] Implement Interlocked.MemoryBarrierProcessWide...
Filip Navara [Sun, 31 Mar 2019 10:08:51 +0000 (12:08 +0200)]
[System.Private.CoreLib/mscorlib] Implement Interlocked.MemoryBarrierProcessWide (mono/mono#13712)

* Implement Interlocked.MemoryBarrierProcessWide

* Bump MONO_CORLIB_VERSION

* Bump API snapshot submodule

Commit migrated from https://github.com/mono/mono/commit/9ccfd778e34aa12cf718968381968a46451f6468

5 years agofix IsPinnable
Egor Bogatov [Sat, 30 Mar 2019 00:38:18 +0000 (02:38 +0200)]
fix IsPinnable

Commit migrated from https://github.com/mono/mono/commit/282a9635b39ea73b2c8ec8704d47b4046c19464a

5 years agoenable more tests
Marek Safar [Fri, 29 Mar 2019 16:07:40 +0000 (17:07 +0100)]
enable more tests

Commit migrated from https://github.com/mono/mono/commit/4d7931cd0f71005ab4797bbab3a49d91e464df98

5 years ago[netcore] Reorder test targets
Marek Safar [Fri, 29 Mar 2019 13:58:40 +0000 (14:58 +0100)]
[netcore] Reorder test targets

Commit migrated from https://github.com/mono/mono/commit/c302bfdc660142fb03805535fe36b7cbc068f1b2

5 years ago[arm] Don't use C++ keyword as a variable name (mono/mono#13744)
Aleksey Kliger (λgeek) [Fri, 29 Mar 2019 20:27:49 +0000 (16:27 -0400)]
[arm] Don't use C++ keyword as a variable name (mono/mono#13744)

Fixes the nightly C++ Jenkins jobs
https://jenkins.mono-project.com/job/test-mono-mainline-linux-cxx/

Commit migrated from https://github.com/mono/mono/commit/20b523ee9c57802981ec89d23289b7dd62dd8376

5 years agoMerge pull request mono/mono#13633 from rfht/master
Jo Shields [Fri, 29 Mar 2019 17:27:48 +0000 (13:27 -0400)]
Merge pull request mono/mono#13633 from rfht/master

Fix DNS Name Resolution Failure on OpenBSD (GitHub issue mono/mono#8168)

Commit migrated from https://github.com/mono/mono/commit/fbc7da2a3f80f8262f45ee2a924ef5dc9f2571c4

5 years ago[netcore] Guard for skipFrames overflow, update test exclusions (mono/mono#13745)
Filip Navara [Fri, 29 Mar 2019 16:53:52 +0000 (17:53 +0100)]
[netcore] Guard for skipFrames overflow, update test exclusions (mono/mono#13745)

* [netcore] Guard for skipFrames overflow

* [netcore] Remove Timer tests exclusion

* [netcore] Remove unnecessary null check

Commit migrated from https://github.com/mono/mono/commit/a7a225ceafc6344092a4703727930a71505873d4

5 years agoUpdate tests
Egor Bogatov [Fri, 29 Mar 2019 14:45:59 +0000 (16:45 +0200)]
Update tests

Commit migrated from https://github.com/mono/mono/commit/8cce577994863df13a2a2ead85b20726f28c3eb9

5 years ago[netcore] Ongoing work. (mono/mono#13731)
Zoltan Varga [Fri, 29 Mar 2019 11:47:16 +0000 (07:47 -0400)]
[netcore] Ongoing work. (mono/mono#13731)

Commit migrated from https://github.com/mono/mono/commit/77e99d080d9c4419c546f0ba1023bf5653ac2dbd

5 years ago[netcore] Improve xtest command (mono/mono#13703)
Egor Bogatov [Thu, 28 Mar 2019 17:00:34 +0000 (19:00 +0200)]
[netcore] Improve xtest command (mono/mono#13703)

The python script now also extracts downloaded zips and `make xtest-%` is now able to consume these artifacts.
E.g.
```
make xtest-System.Collections.Tests COREFX_ROOT=/prj/corefx-repo
```
We still need COREFX_ROOT because of two missing files:
`CoreFx.Private.TestUtilities.dll` and `xunit.console.deps.json`
maybe I should just add them to our repo?

Also this PR fixes `RemoteExecutorConsoleApp` problems for `make xtest-%`

Commit migrated from https://github.com/mono/mono/commit/2522547cd5ba592e21fdba2e94a9feeb20037daf

5 years agoMerge pull request mono/mono#13705 from kjpou1/wasm-issue-12871
Larry Ewing [Thu, 28 Mar 2019 16:44:43 +0000 (11:44 -0500)]
Merge pull request mono/mono#13705 from kjpou1/wasm-issue-12871

[wasm] Fix System.DllNotFoundException: libc

Commit migrated from https://github.com/mono/mono/commit/49ba9f32ecd06971357abf365a8c0379b1c3d1c9

5 years ago[Mono.Runtime.Tests] Remove duplicate file in .sources
Alexander Köplinger [Thu, 28 Mar 2019 15:38:09 +0000 (16:38 +0100)]
[Mono.Runtime.Tests] Remove duplicate file in .sources

Commit migrated from https://github.com/mono/mono/commit/f48b0a70c3ae4418775594200e29856dd2dd7668

5 years agoMerge pull request mono/mono#13700 from directhex/compress-with-xz
Jo Shields [Thu, 28 Mar 2019 15:22:09 +0000 (11:22 -0400)]
Merge pull request mono/mono#13700 from directhex/compress-with-xz

Switch `make dist` format from BZip2 to XZ.

Commit migrated from https://github.com/mono/mono/commit/7e99ce296081e50270147521106784319317e1ca

5 years ago[profiler] Add duration=NUM parameter to AOT profiler (mono/mono#13688)
Radek Doulik [Thu, 28 Mar 2019 14:54:36 +0000 (15:54 +0100)]
[profiler] Add duration=NUM parameter to AOT profiler (mono/mono#13688)

* [profiler] Add duration=NUM parameter to AOT profiler

It instructs the AOT profiler to write the data after NUM seconds
measured from runtime initialization.

* [profilers] Added aot:duration=NUM parameter description

Commit migrated from https://github.com/mono/mono/commit/4cf13bcd16b48b0e8b7eed99042e3746cdb1080a

5 years agoMerge pull request mono/mono#13699 from directhex/no-more-monograph
Jo Shields [Thu, 28 Mar 2019 14:18:53 +0000 (10:18 -0400)]
Merge pull request mono/mono#13699 from directhex/no-more-monograph

Delete monograph. Closes https://github.com/mono/mono/issues/7845

Commit migrated from https://github.com/mono/mono/commit/ac0f7ece3511837a6dd4c8465dbf3a07d783a155

5 years agoUpdate Makefile
Filip Navara [Wed, 27 Mar 2019 19:43:17 +0000 (20:43 +0100)]
Update Makefile

Commit migrated from https://github.com/mono/mono/commit/8f99674718a05b77fff917cfaa9c87a523b56088

5 years agoSeparate out common code from pinvoke_probe_for_module_relative_directories into...
Filip Navara [Tue, 26 Mar 2019 22:31:07 +0000 (23:31 +0100)]
Separate out common code from pinvoke_probe_for_module_relative_directories into pinvoke_probe_for_module_in_directory

Commit migrated from https://github.com/mono/mono/commit/141493c473a11c3e521faaf3086b7ed8df53b6c6

5 years ago[netcore] Move P/Invoke directory lookup from mono_dl_fallback to pinvoke_probe_for_m...
Filip Navara [Tue, 26 Mar 2019 21:23:28 +0000 (22:23 +0100)]
[netcore] Move P/Invoke directory lookup from mono_dl_fallback to pinvoke_probe_for_module_relative_directories

Commit migrated from https://github.com/mono/mono/commit/4648210f3b9bdf5ef43984998abbe4da038c9d46

5 years ago[netcore] Handle NATIVE_DLL_SEARCH_DIRECTORIES for p/invoke
Filip Navara [Tue, 26 Mar 2019 10:42:01 +0000 (11:42 +0100)]
[netcore] Handle NATIVE_DLL_SEARCH_DIRECTORIES for p/invoke

Co-authored-by: Aleksey Kliger <alklig@microsoft.com>
Commit migrated from https://github.com/mono/mono/commit/3e05b4ea77e0e7e4ca0a8ef76b773bc73efa9eb0

5 years ago[interp] Small changes (mono/mono#13691)
Vlad Brezae [Thu, 28 Mar 2019 12:12:17 +0000 (14:12 +0200)]
[interp] Small changes (mono/mono#13691)

* [interp] Extract the code pushing lmf in separate function

There is no reason to not optimize the code inside do_icall

* [interp] Remove dead code

Trace ips are filled in mono_handle_exception_internal

Commit migrated from https://github.com/mono/mono/commit/23aa609af78cde121fe2cdcc53a562bb7dd7b752

5 years ago[llvm] Fix the computation of size of gshared instances in another place.
Zoltan Varga [Thu, 28 Mar 2019 04:10:06 +0000 (00:10 -0400)]
[llvm] Fix the computation of size of gshared instances in another place.

Fixes https://github.com/mono/mono/issues/13610.

Commit migrated from https://github.com/mono/mono/commit/34f3b8947c9461c922ba93dc19243f24c7fd4a67

5 years agoRestore domain in error path. (mono/mono#13662)
Jay Krell [Thu, 28 Mar 2019 06:20:53 +0000 (23:20 -0700)]
Restore domain in error path. (mono/mono#13662)

* In mono_threadpool_enqueue_work_item, if mono_runtime_invoke_checked fails,
still restore domain.

In mono_threadpool_enqueue_work_item, acknowledge with a comment but do not change
that mono_domain_set failing leads to returning success.

In mono_threadpool_enqueue_work_item, refactor for sharing code without loss
of efficiency or hopefully clarity.

* Keep this line duplicated:
`mono_runtime_invoke_checked (unsafe_queue_custom_work_item_method, NULL, args, error);`

Commit migrated from https://github.com/mono/mono/commit/83acc1a3431c1eba1f911d9c82934ad9cbdffc36

5 years agoCleanup mono_marshal_get_icall_wrapper (mono/mono#13661)
Jay Krell [Thu, 28 Mar 2019 06:20:35 +0000 (23:20 -0700)]
Cleanup mono_marshal_get_icall_wrapper (mono/mono#13661)

Every caller was consistently forming the same name based on callinfo->name
and passing callinfo->func and callinfo->sig.
Pass callinfo instead and do the common work in mono_marshal_get_icall_wrapper.

This has the following side effects:
 Do not form and free name when there is a cache hit. This seems like a nice optimization.
 Allow name when there is a cache hit. This is unintended. We could assert if it is a problem.

Commit migrated from https://github.com/mono/mono/commit/3fae397cce86398d738026db8220ee6ddcbcd503

5 years ago[runtime] Revert mono/mono@daf92b9e62a847d521ae314c320d3502fefe217e. (mono/mono#13696)
Zoltan Varga [Wed, 27 Mar 2019 22:46:43 +0000 (18:46 -0400)]
[runtime] Revert mono/mono@daf92b9e62a847d521ae314c320d3502fefe217e. (mono/mono#13696)

Fixes https://github.com/mono/mono/issues/13607.

Commit migrated from https://github.com/mono/mono/commit/5433bd030ea2d6645c333845408fb5e1b1bd5d5b

5 years agoSwitch `make dist` format from BZip2 to XZ.
Jo Shields [Wed, 27 Mar 2019 19:50:25 +0000 (15:50 -0400)]
Switch `make dist` format from BZip2 to XZ.

Closes https://github.com/mono/mono/issues/9267

Commit migrated from https://github.com/mono/mono/commit/a9c340a0636da35460dd5b5d179d029ef10862c5

5 years agoDelete monograph. Closes https://github.com/mono/mono/issues/7845
Jo Shields [Wed, 27 Mar 2019 19:45:06 +0000 (15:45 -0400)]
Delete monograph. Closes https://github.com/mono/mono/issues/7845

Commit migrated from https://github.com/mono/mono/commit/38fdb39cacf4542243d77f1adb68402c5358c262

5 years agoMerge pull request mono/mono#13673 from directhex/runtime-nupkg
Jo Shields [Wed, 27 Mar 2019 18:39:17 +0000 (14:39 -0400)]
Merge pull request mono/mono#13673 from directhex/runtime-nupkg

Runtime nupkg generation

Commit migrated from https://github.com/mono/mono/commit/e40d76cb4a18168c8791f2c0e42674500d887015

5 years ago[mono] Don't try "open" handlers on iOS/Android in ves_icall_System_Diagnostics_Proce...
Alexander Köplinger [Wed, 27 Mar 2019 18:11:48 +0000 (19:11 +0100)]
[mono] Don't try "open" handlers on iOS/Android in ves_icall_System_Diagnostics_Process_ShellExecuteEx_internal (mono/mono#13693)

When you use `Process.Start()` with `UseShellExecute=true` (which is the default on Mono/.NET Framework, but false on .NET Core) then we'd still try to first start the file directly, before falling back to trying the "open" handlers like xdg-open to launch the file.

Presumably we do this so that on mobile you can still start a process without needing to explicitly set `UseShellExecute=false`.

However we don't need to try the fallback on iOS/Android since the "open" handlers won't work there anyway.

This recently showed up on the Xamarin.iOS Mono 2019-02 integration where we started running the `System.Diagnostics.ProcessTest` suite and the `Start1_FileName_NotFound()` would fail at `#C6` because the native error code wasn't 2 (file not found) but 13 (invalid data). This is because it tried
to use `/usr/bin/open` which doesn't work of course so it got to the `mono_w32error_set_last (ERROR_INVALID_DATA)` on L2088.

Commit migrated from https://github.com/mono/mono/commit/e8c660ce90efc7966ffc6fa9753ac237b2afadf2

5 years agoAdd some RID detection, and use it to allow runtime nupkg generation
Jo Shields [Tue, 26 Mar 2019 14:55:14 +0000 (10:55 -0400)]
Add some RID detection, and use it to allow runtime nupkg generation

We cannot presume more than just "linux" or "osx" in our RIDs, because
if we want to enable --host vs --build, we can't detect the OS from
the runtime environment.

This is an okay compromise for now.

Commit migrated from https://github.com/mono/mono/commit/a48e2c8e102a1384e8a3d07b141a419683825059

5 years agoAdd possibility of generating a runtime .nupkg for Mono (Mac-only right now)
Jo Shields [Fri, 22 Mar 2019 15:19:25 +0000 (11:19 -0400)]
Add possibility of generating a runtime .nupkg for Mono (Mac-only right now)

Commit migrated from https://github.com/mono/mono/commit/7f04ffa847ebee8930fe6a0632831c641fde95bf

5 years ago[netcore] Fix stack size for new threads
Filip Navara [Wed, 27 Mar 2019 09:09:01 +0000 (10:09 +0100)]
[netcore] Fix stack size for new threads

Commit migrated from https://github.com/mono/mono/commit/7a74f15949ea961859fe645bd7f35a7e906d6bf7

5 years ago[netcore] Fix thread debugging messages
Filip Navara [Tue, 26 Mar 2019 12:53:13 +0000 (13:53 +0100)]
[netcore] Fix thread debugging messages

Commit migrated from https://github.com/mono/mono/commit/c45f622d971a5b2fed8e98eb563bf842885aff4a

5 years ago[netcore] Download test assets from the dotnet-core blob feed.
Zoltan Varga [Wed, 27 Mar 2019 01:35:46 +0000 (21:35 -0400)]
[netcore] Download test assets from the dotnet-core blob feed.

Commit migrated from https://github.com/mono/mono/commit/c7d6919ceb522c3c400ce07e1c145769b6705fe3

5 years agoBump roslyn binaries to 3.1.0 and add VBCSCompiler.exe to the set of paths auto-detec...
Katelyn Gadd [Wed, 27 Mar 2019 08:17:24 +0000 (01:17 -0700)]
Bump roslyn binaries to 3.1.0 and add VBCSCompiler.exe to the set of paths auto-detected by configure.ac (mono/mono#13518)

* Reconfigure bump for PR test

* Actually bump submodule this time probably

* Bump submodule

* Revert "Bump submodule"

This reverts commit mono/mono@b47679be10d3c38d40673cf73e0dc48a300318bc.

* Bump submodule

* Modify csi-test.csx to manually reference netstandard 2.0, because this is required for some reason

* Checkpoint: Test modifying csi.rsp instead of csi-test

* Git

* Update submodule

* Update submodule compiler path

* Remove binaries-new submodule

* Update to latest roslyn-binaries revision and update path in configure.ac

Commit migrated from https://github.com/mono/mono/commit/e9d847d0f68bacff91afa9253b59f48d5dc61ba3

5 years ago[netcore] Fix some thread failures.
Zoltan Varga [Wed, 27 Mar 2019 00:57:42 +0000 (20:57 -0400)]
[netcore] Fix some thread failures.

Commit migrated from https://github.com/mono/mono/commit/4bb8637454e9f380bf3f49542df3930acdf4acd5

5 years ago[netcore] Fix ArgumentException argument order.
Zoltan Varga [Tue, 26 Mar 2019 23:27:04 +0000 (19:27 -0400)]
[netcore] Fix ArgumentException argument order.

Commit migrated from https://github.com/mono/mono/commit/de89d6dc77f18ff44b6fdcf3397b0e2110e0e23b

5 years ago[netcore] Disable boehm.
Zoltan Varga [Tue, 26 Mar 2019 23:26:46 +0000 (19:26 -0400)]
[netcore] Disable boehm.

Commit migrated from https://github.com/mono/mono/commit/593853ef061cdeba5d7d503f3cadae38cc5ac065

5 years agoSplit `AppDomain.DoTypeResolve(object)` into `DoTypeResolve()` and `DoTypeBuilderReso...
Martin Baulig [Wed, 27 Mar 2019 05:51:38 +0000 (01:51 -0400)]
Split `AppDomain.DoTypeResolve(object)` into `DoTypeResolve()` and `DoTypeBuilderResolve()`. (mono/mono#13142)

* Instead of having one `AppDomain.DoTypeResolve(object)` that checks at runtime whether
  the argument is a `string` or a `TypeBuilder`, use two strongly-typed methods
  `DoTypeResolve(string)` and `DoTypeBuilderResolve(TypeBuilder)`.

* Add both to the `corlib/LinkerDescriptor/mscorlib.xml`.

* Adjust the code in `appdomain.c` accordingly.

* Bump corlib version.

This is part of a larger on-going project to improve the linker logic.

The rationale behind this is that the new `AppDomain.DoTypeResolve(string)`
that is being called from `mono_domain_try_type_resolve_name()` should not
reference `TypeBuilder`, to allow the linker to remove some of the
`System.Reflection.Emit` types.

Commit migrated from https://github.com/mono/mono/commit/1af992a5ffa46e20dd61a64b6dcecef0edb5c459

5 years agoCleanup double semi-colons. (mono/mono#13660)
Jay Krell [Wed, 27 Mar 2019 03:45:42 +0000 (20:45 -0700)]
Cleanup double semi-colons. (mono/mono#13660)

Cleanup double semi-colons.

Commit migrated from https://github.com/mono/mono/commit/636160148f53d86d08be0b4aeaa556070773cbd6

5 years agoFix sample path
Filip Navara [Mon, 25 Mar 2019 18:59:30 +0000 (19:59 +0100)]
Fix sample path

Commit migrated from https://github.com/mono/mono/commit/fea837d6d3624bab5453cc7438abec77a4db9879

5 years ago[netcore] Implement Array.Sort (mono/mono#13674)
Egor Bogatov [Tue, 26 Mar 2019 17:10:23 +0000 (19:10 +0200)]
[netcore] Implement Array.Sort (mono/mono#13674)

* Update Array.cs

* implement Array.Sort

Commit migrated from https://github.com/mono/mono/commit/2f1c1d3b2ce20b5480285a6d38010cbc6d086283

5 years ago[intrinsics] sync implementation with IL code (mono/mono#13647)
Bernhard Urban [Tue, 26 Mar 2019 16:30:18 +0000 (17:30 +0100)]
[intrinsics] sync implementation with IL code (mono/mono#13647)

* [intrinsics] sync implementation with IL code

Before the intrinsic implemented
```
ldarg.0
ldarg.1
sizeof !!T
mul
conv.i
add
ret
```

now it implements
```
ldarg.0
ldarg.1
sizeof !!T
conv.i
mul
add
ret
```

`conv.i` and `mul` have been swapped. Also see https://github.com/mono/mono/pull/13609

* fix op_sext_i4 usage

Commit migrated from https://github.com/mono/mono/commit/5e70d5ee51213ee4b07699b7b6c04cf9e08d5c0c

5 years ago[llvm] Fix the computation of size of gshared instances in emit_args_to_vtype ()...
Zoltan Varga [Tue, 26 Mar 2019 15:28:59 +0000 (11:28 -0400)]
[llvm] Fix the computation of size of gshared instances in emit_args_to_vtype (). (mono/mono#13659)

Fixes https://github.com/mono/mono/issues/13610.

Commit migrated from https://github.com/mono/mono/commit/9d652a972a015187b870c35057e7be1fa9c6852f

5 years agoConvert from ucontext_t (or platform equivalent) to MonoContext early and propagate...
Filip Navara [Thu, 21 Mar 2019 21:22:48 +0000 (22:22 +0100)]
Convert from ucontext_t (or platform equivalent) to MonoContext early and propagate it through

Commit migrated from https://github.com/mono/mono/commit/e7011c780f676914f559f14f25e76c192bb2b0b2

5 years agoPreserve the native crash context instead of MonoContext to allow printing managed...
Filip Navara [Thu, 21 Mar 2019 17:53:02 +0000 (18:53 +0100)]
Preserve the native crash context instead of MonoContext to allow printing managed stack trace later

Commit migrated from https://github.com/mono/mono/commit/69abf8f5e427aaf3a1bfa13e7047349d90873313

5 years ago[netcore] Change loader behaviour to disable assembly remapping and allow loading...
Filip Navara [Mon, 25 Mar 2019 21:27:00 +0000 (22:27 +0100)]
[netcore] Change loader behaviour to disable assembly remapping and allow loading newer assembly versions

Commit migrated from https://github.com/mono/mono/commit/d8e53c515d512562538c9081300bb35691da8858

5 years ago[System.Private.CoreLib] Implement StackFrame initialization
Marek Safar [Mon, 25 Mar 2019 23:13:53 +0000 (00:13 +0100)]
[System.Private.CoreLib] Implement StackFrame initialization

Commit migrated from https://github.com/mono/mono/commit/86506fbdbd345b6b9f8e2371f243a79c116dc4e5

5 years agoMerge pull request mono/mono#13620 from kjpou1/wasm-misc-cleanup
Larry Ewing [Mon, 25 Mar 2019 18:55:51 +0000 (13:55 -0500)]
Merge pull request mono/mono#13620 from kjpou1/wasm-misc-cleanup

[wasm] Remove specific link to framework file when building test-suite

Commit migrated from https://github.com/mono/mono/commit/ed2d3504d6a59ed7c0abad97374fcaa184ba2581

5 years ago[amd64] use 32bit variant of lea_membase for 32bit operations (mono/mono#13642)
Bernhard Urban [Mon, 25 Mar 2019 18:25:43 +0000 (19:25 +0100)]
[amd64] use 32bit variant of lea_membase for 32bit operations (mono/mono#13642)

[amd64] use 32bit variant of lea_membase for 32bit operations

Consider
```
 xor %r15, %r15       // %r15 = 0x0
 dec %r15d            // %r15 = 0xffff_ffff
 lea 0x1(%r15), %rdx  // %rdx = 0x1_0000_0000 but should be 0x0
```

instead `lea 0x1(%r15), %edx` should be generated.

Fixes mono/mono#13452
Fixes mono/mono#13597

Commit migrated from https://github.com/mono/mono/commit/64e17113b221d8bf2bcf041977e8ddb582614b35

5 years agoMerge pull request mono/mono#13636 from kjpou1/wasm-add-bindings
Larry Ewing [Mon, 25 Mar 2019 17:13:01 +0000 (12:13 -0500)]
Merge pull request mono/mono#13636 from kjpou1/wasm-add-bindings

[wasm] [packager] Remove the unnecessary call to add_bindings()

Commit migrated from https://github.com/mono/mono/commit/05a40c67ea5d76aed212a981b1183abf6317d7f7

5 years ago[netcore] Improve xunit console runner (mono/mono#13648)
Egor Bogatov [Mon, 25 Mar 2019 15:40:42 +0000 (17:40 +0200)]
[netcore] Improve xunit console runner (mono/mono#13648)

* improve xunit runner

* improve xunit runner

Commit migrated from https://github.com/mono/mono/commit/e653d48b3aa37b378d2f13be6411e88be493a463

5 years agoMerge pull request mono/mono#13416 from kjpou1/wasm-websocket-tests
Larry Ewing [Mon, 25 Mar 2019 14:12:29 +0000 (09:12 -0500)]
Merge pull request mono/mono#13416 from kjpou1/wasm-websocket-tests

[wasm][tests] Add WebSocket tests

Commit migrated from https://github.com/mono/mono/commit/478656ff1d8d62c44508ff301f2539ef409635e2

5 years ago[netcore] Add System.Reflection.Emit support. (mono/mono#13613)
Zoltan Varga [Mon, 25 Mar 2019 14:04:36 +0000 (10:04 -0400)]
[netcore] Add System.Reflection.Emit support. (mono/mono#13613)

Commit migrated from https://github.com/mono/mono/commit/1fb3b3b87d1c3e37bfee7a63f592c28571681599

5 years agoRevert "Do not use MAP_JIT by default, instead make this something that is toggled...
Marek Safar [Mon, 25 Mar 2019 13:56:01 +0000 (14:56 +0100)]
Revert "Do not use MAP_JIT by default, instead make this something that is toggled by Xamarin.Mac which needs it"

This reverts commit mono/mono@a4c860676794af9ad95c090b03bf1cf617fba464.

Commit migrated from https://github.com/mono/mono/commit/48b8f5ce47aa9b2a2627fe962db5b32c9edaed39

5 years agoMerge pull request mono/mono#13571 from lateralusX/lateralusX/add-utc-timezone-on...
Johan Lorensson [Mon, 25 Mar 2019 13:30:47 +0000 (09:30 -0400)]
Merge pull request mono/mono#13571 from lateralusX/lateralusX/add-utc-timezone-on-fallback

Add UTC timezone in WinRT GetSystemTimeZones fallback implementation.

Commit migrated from https://github.com/mono/mono/commit/cae256c3b0294ce30b095888817544e1924a41fc

5 years agoRemove const on struct fields. (mono/mono#13624)
Jay Krell [Mon, 25 Mar 2019 12:36:38 +0000 (05:36 -0700)]
Remove const on struct fields. (mono/mono#13624)

It is unusual and not useful.

Commit migrated from https://github.com/mono/mono/commit/8feaad70f069f15de493220d27075eff98770aa3

5 years agoDo not use MAP_JIT by default, instead make this something that is toggled by Xamarin...
Miguel de Icaza [Wed, 13 Mar 2019 17:38:29 +0000 (13:38 -0400)]
Do not use MAP_JIT by default, instead make this something that is toggled by Xamarin.Mac which needs it

Commit migrated from https://github.com/mono/mono/commit/a4c860676794af9ad95c090b03bf1cf617fba464

5 years agoMerge pull request mono/mono#13572 from lateralusX/lateralusX/change-test-spincount
Johan Lorensson [Mon, 25 Mar 2019 10:48:41 +0000 (06:48 -0400)]
Merge pull request mono/mono#13572 from lateralusX/lateralusX/change-test-spincount

Increase spin-count on test to not end up in frequent sleeps on multicore machines.

Commit migrated from https://github.com/mono/mono/commit/1ff137d9501b78856891075c82ca501a5990a500

5 years ago[windows]Fix and cleanup configure.ac parsing for MONO_CORLIB_VERSION and ACINIT...
Jay Krell [Mon, 25 Mar 2019 09:55:15 +0000 (02:55 -0700)]
[windows]Fix and cleanup configure.ac parsing for MONO_CORLIB_VERSION and ACINIT. (mono/mono#13630)

Not just a guid or an uppercase guid.

Commit migrated from https://github.com/mono/mono/commit/004314e9ddf5dd93c7d9f2a3b696c5e10194fb71

5 years ago[interp] fix "This greater-than-or-equal-to-zero comparison of an unsigned value...
Bernhard Urban [Mon, 25 Mar 2019 09:45:59 +0000 (10:45 +0100)]
[interp] fix "This greater-than-or-equal-to-zero comparison of an unsigned value is always true" reported by Coverity (mono/mono#13625)

[interp] fix "This greater-than-or-equal-to-zero comparison of an unsigned value is always true" reported by Coverity

Commit migrated from https://github.com/mono/mono/commit/eb1cb188a6a3b4797a34ffb4510d7b36dab9a0ef

5 years agoRemove the parsing, hashing, locking, allocations associated with JIT icall signature...
Jay Krell [Mon, 25 Mar 2019 03:16:32 +0000 (20:16 -0700)]
Remove the parsing, hashing, locking, allocations associated with JIT icall signatures. (mono/mono#13579)

* Remove the parsing, hashing, locking, allocations associated with JIT icall signatures.
Make them statically allocated, single-instanced at compile time, and almost
statically initialized.

Fix C++ and x86.

More x86 fix.

Fix ARMv5.

Undo tedious work to be redone instead of merged from old.

Put all signatures back, prepare for automated conversion.

Replace all the register_icall strings with:

my @a = ("double double",
"long long long",
"long long int32",
"double double double",
"ulong float",
"ulong double",
"long float",
"double int32",
"float float float",
"long double",
"object ptr int int32",
"double ptr",
"int int int ptr ptr ptr",
"int obj ptr",
"int obj",
"int ptr int int ptr object",
"int32 double",
"int32 int32 int32",
"int32 int32 ptr",
"int32 obj",
"int32 object ptr ptr ptr",
"int32 object",
"int32 ptr ptr ptr ptr ptr int32",
"int32 ptr ptr",
"obj ptr int",
"obj ptr",
"object int object object",
"object int object",
"object int",
"object int32",
"object object ptr ptr",
"object object ptr",
"object object",
"object ptr int int int int",
"object ptr int int int",
"object ptr int int",
"object ptr int ptr",
"object ptr int",
"object ptr int32",
"object ptr ptr int32",
"object ptr ptr ptr ptr ptr",
"object ptr ptr",
"object ptr",
"object",
"ptr int",
"ptr obj",
"ptr object int ptr ptr",
"ptr object int32 int32",
"ptr object ptr ptr",
"ptr object ptr",
"ptr object",
"ptr ptr int ptr",
"ptr ptr int",
"ptr ptr int32",
"ptr ptr ptr ptr",
"ptr ptr ptr",
"ptr ptr",
"ptr",
"uint32 double",
"uint32 ptr int32",
"void double ptr",
"void int",
"void int32",
"void obj ptr",
"void object object ptr",
"void object object",
"void object ptr int32 int32",
"void object ptr int32",
"void object ptr",
"void object",
"void ptr int int object",
"void ptr int object",
"void ptr int ptr",
"void ptr int",
"void ptr int32",
"void ptr object int32",
"void ptr ptr int",
"void ptr ptr int32",
"void ptr ptr ptr",
"void ptr ptr",
"void ptr",
"void ptr object",
"void",
);

while (my $line = <>)
{
if ($line =~ /register|mono_create_icall_signature/ && $line =~ /"/)
{
for my $from (@a)
{
my $to = "mono_icall_sig_$from";
$to =~ s/ /_/g;
$to =~ s/"//g;
$to =~ s/"//g;
$to =~ s/"//g;
$line =~ s/\Q"$from"\E/$to/;
}
}
print($line);
}

Remove whitespace from end of line.

Convert the strings to smaller arrays, of chars now,
that are scaled offsets into MonoDefaults, or -1 for ptrref.

Use smaller encoding.

fix merge

cleanup

* Larger representation that handles alignment.

* Try to undo external changel.

* Fix AOT.

* Fix code search and comments

* Restore warning in this PR.

* More ARM signatures.

* Change representation from pointer to offset.
  Use sizeof for the special case ptrref.
Comments. Perhaps too much.
asserts. Perhaps too much.
A little bit more verbose/readable but essentially the same thing otherwise.
 Perhaps too verbose.

* The initializer all-but-must be pointer-sized.
Even if the values fit in much smaller.
Add comments.
On obscure systems size_t is smaller than a pointer so
gsize or uintptr_t is required. Use gsize.

* Spaces before parens.

* PR: Use enum instead of offsetof.
Use may_alias some.
mono builds with -fno-strict-aliasing, but we had recent
aliasing problem (the enum operators with older g++)
and this looks a little hazardous

We could also have a separate integer or array of byte or array of integer or perhaps string
to resolve the aliasing.

integer: 16 values, 8 max -- could just use an int instead of this array business,
but the representation would be full with no room for expansion.
We are not wasting any/much memory here -- maybe one word per the 200 signatures,
because of sloppyness around any_size_array.

Work a little on dealiasing.
Comment some aliases and make obj/object, int/ptr, bool/boolean share values.

* tweak: Compute all the values once and then directly index small local array.

* Adjust comments to new reality.
Add comments explaining aliasing.

* Add casts to attempt to abide by strict aliasing rules.

Commit migrated from https://github.com/mono/mono/commit/fd1baed2af3de1e4ac4274c100c70b92ebc20962

5 years agoFix handle leak in cominterop (mono/mono#13536)
リーフストーム [Sat, 23 Mar 2019 19:15:57 +0000 (20:15 +0100)]
Fix handle leak in cominterop (mono/mono#13536)

Commit migrated from https://github.com/mono/mono/commit/0b58483fa814707b8a98833a48153ac389d9d933

5 years ago[runtime] Add MONO_LLVM_INTERNAL to *get_aot_init_wrapper* marshal funcs (mono/mono...
Alexander Kyte [Sat, 23 Mar 2019 05:36:58 +0000 (01:36 -0400)]
[runtime] Add MONO_LLVM_INTERNAL to *get_aot_init_wrapper* marshal funcs (mono/mono#13611)

Commit migrated from https://github.com/mono/mono/commit/0eac33443d91b1b98fb02ebb9f2275747b9803f1

5 years ago[DIM] Method call of a class that implements a protected nested interface (mono/mono...
Thays Grazia [Fri, 22 Mar 2019 21:37:16 +0000 (18:37 -0300)]
[DIM] Method call of a class that implements a protected nested interface (mono/mono#13558)

* Unexpected System.MethodAccessException is thrown for a method call of a class that implements a protected interface inside another interface.

```
public interface I1
{
    protected interface T1
    {
        void M1();
    }

    protected class T2
    {}

    protected struct T3
    {}

    protected enum T4
    {
        B
    }
}

class Test1 : I1
{
    static void Main()
    {
        I1.T1 a = new Test2();
        a.M1();
        System.Console.WriteLine(new I1.T2());
        System.Console.WriteLine(new I1.T3());
        System.Console.WriteLine(I1.T4.B);
    }

    class Test2 : I1.T1
    {
        public void M1()
        {
            System.Console.WriteLine("M1");
        }
    }
}
``

Fixing this case Test1 implements I1<int> but can access methods from I1<object>
public interface I1<X>
{
    protected interface T1
    {
        void M1();
    }

    protected class T2
    {}

    protected struct T3
    {}

    protected enum T4
    {
        B
    }
}

class Test1 : I1<int>
{
    static void Main()
    {
        I1<object>.T1 a = new Test2();
        a.M1();
        System.Console.WriteLine(new I1<object>.T2());
        System.Console.WriteLine(new I1<object>.T3());
        System.Console.WriteLine(I1<object>.T4.B);
    }

    class Test2 : I1<object>.T1
    {
        public void M1()
        {
            System.Console.WriteLine("M1");
        }
    }
}

Commit migrated from https://github.com/mono/mono/commit/4abc661805c24716ce5347a17b6299cf45245fa2

5 years ago[aot] cleanup MonoError in add_extra_method_with_depth (mono/mono#13605)
Aleksey Kliger (λgeek) [Fri, 22 Mar 2019 20:24:56 +0000 (16:24 -0400)]
[aot] cleanup MonoError in add_extra_method_with_depth (mono/mono#13605)

I missed something in the code review for mono/mono#13581.  Need to cleanup MonoError if it's not ok.

Commit migrated from https://github.com/mono/mono/commit/d465a7ad65646119ad6bca703b3009cc8fc10ff6

5 years ago[netcore] Implement missing bits in Mutex (mono/mono#13591)
Egor Bogatov [Fri, 22 Mar 2019 17:54:20 +0000 (19:54 +0200)]
[netcore] Implement missing bits in Mutex (mono/mono#13591)

Needed for xunit console runner tool.

Commit migrated from https://github.com/mono/mono/commit/e72d6d9e1cbef5eefeb78171e4a550a8d28679b1

5 years ago[aot] Avoid an assert which can happen in normal usage. (mono/mono#13581)
Zoltan Varga [Fri, 22 Mar 2019 15:02:15 +0000 (11:02 -0400)]
[aot] Avoid an assert which can happen in normal usage. (mono/mono#13581)

Fixes https://github.com/mono/mono/issues/13455.

Commit migrated from https://github.com/mono/mono/commit/b4f4acc1331a681696e99f4a54231b38c42b4fc2

5 years agoBump linker to latest master (mono/mono#13594)
Alexander Köplinger [Fri, 22 Mar 2019 09:10:08 +0000 (10:10 +0100)]
Bump linker to latest master (mono/mono#13594)

* Bump linker to latest master

The linker source were reorganized a little bit, e.g. sources in src/

* [csproj] Update project files

Commit migrated from https://github.com/mono/mono/commit/a766d2e802c5a6a8dc6caa50156dffb0cba58d2e

5 years ago[interp] Make transform phase more flexible (mono/mono#13516)
Vlad Brezae [Fri, 22 Mar 2019 08:06:10 +0000 (10:06 +0200)]
[interp] Make transform phase more flexible (mono/mono#13516)

* [interp] Fix instruction length

* [interp] Don't generate directly into linear code stream

Allocate each instruction into the mempool and link them together. At the end of code generation and after all potential optimisation passes, we will compact this code into its final form.

* [interp] Add support for branch relocations

For each branch instruction, we store in its data field the il offset that we are branching to. During the final code generation, we resolve all backward branches and add relocs for forward branches. These relocs are then resolved after all instructions have been emitted in the final code stream.

* [interp] Extract vararg call code in separate instruction

It requires a different instruction size and is extremely rare code.

* [interp] Fix backwards branch with large offset

We were adding an unsigned instead of subtracting.

* [interp] Fix line numbers

For each il offset that generated interpreter instructions we store the native offset, during the compaction phase.

* [interp] Fix seq points

We have to defer SeqPoint data creation during the compact generation phase, because that's when we have native offset information. We add a flags field to the interpreter instruction to store any relevant information coming from the compilation phase.

* [interp] Make verbose logging a bit nicer

We no longer have the native offset during the first IL instruction interation. Maybe we should bring back logging for the IL -> IR mapping during the compaction phase.

* [interp] Remove some dead code

Commit migrated from https://github.com/mono/mono/commit/216e4aa40502434dcb8fa019908cc3c02ab2f2c4

5 years agoMake test runner able to deal with whitespace patterns other than newline (mono/mono...
Jo Shields [Thu, 21 Mar 2019 23:23:28 +0000 (19:23 -0400)]
Make test runner able to deal with whitespace patterns other than newline (mono/mono#13587)

Helix wasn't running our runtime tests as expected, because the test runner expected newline-separated tests to run, and we were generating space-separated.

Following "be liberal in what you accept" philosophy, and to prevent this issue in the future, just deal with "whitespace separated" rather than "this specific whitespace and no other"

Commit migrated from https://github.com/mono/mono/commit/21cfdbe81c1a38f8b4e11afce78c370e08cd5c56

5 years agoXamarin.Android integration fixes (mono/mono#13589)
Alexis Christoforides [Thu, 21 Mar 2019 23:15:08 +0000 (19:15 -0400)]
Xamarin.Android integration fixes (mono/mono#13589)

Backport of mono/mono#12940.

- Disable other failing tests (they are tests that are newly added, not regressions)
- Look for mono_pal_init() directly in the System.Native library
- [configure] Have libmono-native depend on libmono(-sgen) for the Android build
If this is not done, Android is not able to resolve mono symbols that are used in mono-native (e.g. mono_add_internal_call_with_flags), and will refuse to load the library with 'cannot locate symbol' errors

Commit migrated from https://github.com/mono/mono/commit/c803e6f75bef793aa7d3ac35523b416736e3ff9a

5 years ago[netcore] Xunit console runner (mono/mono#13592)
Egor Bogatov [Thu, 21 Mar 2019 22:43:48 +0000 (00:43 +0200)]
[netcore] Xunit console runner (mono/mono#13592)

* xunit console runner

* add more xunit args

* use rsp file

Commit migrated from https://github.com/mono/mono/commit/0fc15b168fc6e2cfe6df478c2824c6e9eb571f86

5 years ago[llvmonly] Add gsharedvt in wrappers to calls which could go to the interpreter....
Zoltan Varga [Thu, 21 Mar 2019 19:56:06 +0000 (15:56 -0400)]
[llvmonly] Add gsharedvt in wrappers to calls which could go to the interpreter. (mono/mono#13548)

[llvmonly] Add gsharedvt in wrappers to calls which could go to the interpreter.

Fixes https://github.com/mono/mono/issues/13463.

<!--
Thank you for your Pull Request!

If you are new to contributing to Mono, please try to do your best at conforming to our coding guidelines http://www.mono-project.com/community/contributing/coding-guidelines/ but don't worry if you get something wrong. One of the project members will help you to get things landed.

Does your pull request fix any of the existing issues? Please use the following format: Fixes #issue-number
-->

Commit migrated from https://github.com/mono/mono/commit/53bef4aec4c487b68d5e95f05d37e4ce4915a083

5 years ago[interp] Enable compile all debug option also on interp (mono/mono#13570)
Vlad Brezae [Thu, 21 Mar 2019 16:05:48 +0000 (18:05 +0200)]
[interp] Enable compile all debug option also on interp (mono/mono#13570)

[interp] Enable compile all debug option also on interp

Commit migrated from https://github.com/mono/mono/commit/8423f0e9a0f94aec5128da666d42e1c0b5f25a15

5 years agoCouple of fixes to LLVM AOT compiler on Windows x64. (mono/mono#13474)
Johan Lorensson [Thu, 21 Mar 2019 14:05:01 +0000 (10:05 -0400)]
Couple of fixes to LLVM AOT compiler on Windows x64. (mono/mono#13474)

* Enable MSVC objects on LLVM >= 6.00
* Always used PIC relocation-model on Windows x64 due to LLVM problem with
static triggering incorrect ADDR32 relocation entries in 64-bit objects.
* Add CodeView symbol format instead of DWARF for Windows x64.
* Fix LLVM outfile when doing static link to not end up in temp directory.
* Only add /DEFAULTLIB when using MSVC and not doing static compile. For
static compile the needed libraries must be added when objects get's linked
and since the needed libraries are c-runtime libraries, should be transparent
for most applications consuming the object files.

Commit migrated from https://github.com/mono/mono/commit/7e8d4303facc410712ba13bbc1f06489919e4379

5 years ago[arm] respect potential spilling for overflow flag check (mono/mono#13564)
Bernhard Urban [Thu, 21 Mar 2019 12:15:31 +0000 (13:15 +0100)]
[arm] respect potential spilling for overflow flag check (mono/mono#13564)

[arm] respect potential spilling for overflow flag check

```
  18 int_sbb R77 <- R54 R57
  19 store_membase_reg [arm_fp + 0x24] <- R77
  20 cond_exc_c OverflowException
```
this wasn't properly handled by the arch lowering pass.

Fixes https://github.com/mono/mono/issues/13284

Commit migrated from https://github.com/mono/mono/commit/5852d1cf74257b06b30fd7ad23b9427a37343fe3

5 years ago[jit] Add JitHelpers.EnumEquals ()/EnumCompareTo () intrinsics.
Zoltan Varga [Wed, 20 Mar 2019 22:38:57 +0000 (18:38 -0400)]
[jit] Add JitHelpers.EnumEquals ()/EnumCompareTo () intrinsics.

Commit migrated from https://github.com/mono/mono/commit/622bb8d5d5ff95a7e9db9405d6b5593254960e0c

5 years ago[netcore] Implement missing bits in ThreadPool (mono/mono#13566)
Egor Bogatov [Thu, 21 Mar 2019 10:29:43 +0000 (12:29 +0200)]
[netcore] Implement missing bits in ThreadPool (mono/mono#13566)

* implement missing bits in ThreadPool

* remove [SecurityCritical]

Commit migrated from https://github.com/mono/mono/commit/36a62bbf8a62b1325fbbcb2d97858dda89836609

5 years ago[merp] Fix anon allocation, use MAP_PRIVATE
Alexander Kyte [Tue, 19 Mar 2019 20:35:28 +0000 (16:35 -0400)]
[merp] Fix anon allocation, use MAP_PRIVATE

Commit migrated from https://github.com/mono/mono/commit/42c3b73ac1e35d15a55dffb31d2e4ade5101027c