platform/upstream/dotnet/runtime.git
4 years agoMerge pull request #33602 from vitek-karas/AppHostVersionAlways
Vitek Karas [Tue, 17 Mar 2020 12:41:55 +0000 (05:41 -0700)]
Merge pull request #33602 from vitek-karas/AppHostVersionAlways

Include apphost_version parameter in download URLs for both GUI and CLI apps

4 years agoAnnotate System.Net.WebSockets.Client for nullable reference types (#33625)
Stephen Toub [Tue, 17 Mar 2020 10:33:10 +0000 (06:33 -0400)]
Annotate System.Net.WebSockets.Client for nullable reference types (#33625)

4 years agoRevert "Disable System.Reflection.Emit.Tests in mono (#32201)" (#33641)
Alexis Christoforides [Tue, 17 Mar 2020 10:26:52 +0000 (06:26 -0400)]
Revert "Disable System.Reflection.Emit.Tests in mono (#32201)" (#33641)

This reverts commit 11dcd00c1a77c8da0fe06404609a9c4af9e5da4f.

4 years agoEnable crossgen2smoke test for ARM64 (#33530)
Anton Lapounov [Tue, 17 Mar 2020 09:28:24 +0000 (02:28 -0700)]
Enable crossgen2smoke test for ARM64 (#33530)

* Enable crossgen2smoke test for ARM64.
* Re-enable NullableWithExplicitLayoutTest sub-test.
* Restore setting the image base removed by #31663.

4 years agoGC coverage can now occur in scenarios where a thread doesn't exist. (#33615)
Aaron Robinson [Tue, 17 Mar 2020 05:35:14 +0000 (22:35 -0700)]
GC coverage can now occur in scenarios where a thread doesn't exist. (#33615)

* GC coverage can now occur in scenarios where a thread doesn't exist.
Properly handle this case and assert some invariant.

* Update gccover.cpp

Misspelled function referenced in comment.

* Remove MethodDesc from GC coverage.

* Code review and fix some asserts when running the Debug version of tests.

* Limit JIT flag manipulation to FEATURE_TIERED_COMPILATION

4 years agoUse compilerName and compilerArg in pipeline configs (#33605)
Santiago Fernandez Madero [Tue, 17 Mar 2020 05:34:50 +0000 (22:34 -0700)]
Use compilerName and compilerArg in pipeline configs (#33605)

4 years agoFix Win64 exception propagation in NativeCallable methods (#33653)
Jan Vorlicek [Tue, 17 Mar 2020 05:34:35 +0000 (06:34 +0100)]
Fix Win64 exception propagation in NativeCallable methods (#33653)

A recent change has removed the UMThunkStub usage for native callable
methods. That has broken handling of exceptions propagated from the
managed native callable method into the native caller in case there were
explicit frames below the native frame, like during the GC stress 3.

This change fixes it by unwinding the explicit frames upto the native
frame during the 2nd pass of exception handling when exception unwinding
passes through the frame of a native callable method and isn't handled
there.

4 years agoSimplify Convert (#33659)
Pent Ploompuu [Tue, 17 Mar 2020 05:13:07 +0000 (07:13 +0200)]
Simplify Convert (#33659)

* Simplify Convert

* Optimize Number.UInt32ToDecStr

4 years agoFix usage of JIT_FLAG_CODE_EXEC_ONLY flag. (#33623)
monojenkins [Tue, 17 Mar 2020 04:51:25 +0000 (00:51 -0400)]
Fix usage of JIT_FLAG_CODE_EXEC_ONLY flag. (#33623)

#19219 didn't convert the JIT flags into options on cfg meaning that code currently checked JIT_FLAG_CODE_EXEC_ONLY never executed. Fix handles the new JIT flag in same way as other JIT flags, converted into bit field on cfg.

With this fix, the following C# method:

```
static double Test()
{
    return 1.0f;
}
```

will now generate the following assembly on amd64, when using MONO_ARCH_CODE_EXEC_ONLY:

```
sub rsp,8
mov r11,qword ptr [180003318h]
movsd xmm0,mmword ptr [r11]
add rsp,8
ret
```

Co-authored-by: lateralusX <lateralusX@users.noreply.github.com>
4 years agoDelete IExecutionEngine (#33640)
Jan Kotas [Tue, 17 Mar 2020 04:30:03 +0000 (21:30 -0700)]
Delete IExecutionEngine (#33640)

* Delete IExecutionEngine

* Delete InitUtilcode

* Delete cvtres invocation

* Delete cached m_pClrDebugState and fix contract violations

4 years agoDelete unused and redundant msbuild properties in coreclr build (#33645)
Jan Kotas [Tue, 17 Mar 2020 04:01:45 +0000 (21:01 -0700)]
Delete unused and redundant msbuild properties in coreclr build (#33645)

4 years agoLimit JIT flag manipulation to FEATURE_TIERED_COMPILATION
Aaron Robinson [Tue, 17 Mar 2020 03:22:17 +0000 (20:22 -0700)]
Limit JIT flag manipulation to FEATURE_TIERED_COMPILATION

4 years ago[merp] Add breadcrumb for StackHash (#33635)
monojenkins [Tue, 17 Mar 2020 02:23:38 +0000 (22:23 -0400)]
[merp] Add breadcrumb for StackHash (#33635)

Contributes to https://github.com/mono/mono/issues/18715

<!--
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
-->

Co-authored-by: alexischr <alexischr@users.noreply.github.com>
4 years agoAnnotate System.Net.Http for nullable (#33268)
buyaa-n [Tue, 17 Mar 2020 01:06:01 +0000 (18:06 -0700)]
Annotate System.Net.Http for nullable (#33268)

* Annotate System.Net.Http for nullable

4 years ago[jit] Transition the SIMD code to use the MONO_CPU_... set of flags instead of the...
monojenkins [Tue, 17 Mar 2020 01:02:22 +0000 (21:02 -0400)]
[jit] Transition the SIMD code to use the MONO_CPU_... set of flags instead of the SIMD_VERSION_... flags. (#33267)

Co-authored-by: vargaz <vargaz@users.noreply.github.com>
4 years agoUpdate area owners: Setup, Infra-installer (#33650)
Davis Goodin [Tue, 17 Mar 2020 00:33:31 +0000 (18:33 -0600)]
Update area owners: Setup, Infra-installer (#33650)

4 years agoImplement simple version of On Stack Replacement (OSR) (#32969)
Andy Ayers [Tue, 17 Mar 2020 00:29:55 +0000 (17:29 -0700)]
Implement simple version of On Stack Replacement (OSR) (#32969)

Add support to runtime and jit to allow switching from unoptimized to
optimized code for a method while the method has active stack frames.

Details in the included document.

4 years agoFix COM + dynamic tests (#33642)
Elinor Fung [Tue, 17 Mar 2020 00:02:38 +0000 (17:02 -0700)]
Fix COM + dynamic tests (#33642)

4 years agoRevert "Add example profiler that does stack sampling with ICorProfilerInfo10::Suspen...
David Mason [Tue, 17 Mar 2020 00:01:08 +0000 (17:01 -0700)]
Revert "Add example profiler that does stack sampling with ICorProfilerInfo10::SuspendRuntime (#32988)" (#33656)

This reverts commit 7a362a03f6e829828b5276ab2bf3f1d3073cc166.

4 years agoCode review and fix some asserts when running the Debug version of tests.
Aaron Robinson [Mon, 16 Mar 2020 23:34:28 +0000 (16:34 -0700)]
Code review and fix some asserts when running the Debug version of tests.

4 years agoFix timespan wrap-around when multiplying back by inverse scale
Thomas Gassmann [Mon, 16 Mar 2020 22:18:55 +0000 (23:18 +0100)]
Fix timespan wrap-around when multiplying back by inverse scale

When creating a `TimeSpan` by either dividing, multiplying or using one of
the `From...` methods, the ticks are multiplied by an inverse scale.
When converting the double-precision value back to a long, this
currently causes incorrect values.

This change makes MaxValue work and to allow it to roundtrip.

4 years agoImplement Vector.Ceiling / Vector.Floor (#31993)
Ganbarukamo41 [Mon, 16 Mar 2020 22:10:27 +0000 (07:10 +0900)]
Implement Vector.Ceiling / Vector.Floor (#31993)

* Add Ceil/Floor to S.P.CoreLib and expose publicly

* Make Ceil/Floor JIT intrinsic

* Add missing identifier for closing endif

* Add JIT test for Ceil/Floor

* Add test for Ceil/Floor in S.Numerics.Vectors
* Also fix the old path for the new structure

* Apply jit-format

* Do not attempt to treat Ceil/Floor if SSE4.1 isn't available

* Mark Vector<T>.Ceiling/Floor as Intrinsic

* Add missing underscore

* Revert "Add missing idenfitier for closing endif"
* Oops

* Add missing breaks
* Oops, again

* Simplify switch case

* Per review suggestion

Co-Authored-By: Egor Chesakov <egor.chesakov@microsoft.com>
Co-authored-by: Egor Chesakov <egor.chesakov@microsoft.com>
4 years ago[CBOR] Implement Map support for CborReader and CborWriter (#33500)
Eirik Tsarpalis [Mon, 16 Mar 2020 22:00:12 +0000 (22:00 +0000)]
[CBOR] Implement Map support for CborReader and CborWriter (#33500)

* Implement map support for CborReader and CborWriter

* fix test naming

* move helper functions to nested type

* check for arithmetic overflow in CborReader.ReadStartMap

* throw FormatExceptions on data items whose definite length exceeds remaining buffer size

4 years agoChanged RuntimeName to the existing RuntimeFlavor property. (#33559)
Nathan Ricci [Mon, 16 Mar 2020 21:07:31 +0000 (17:07 -0400)]
Changed RuntimeName to the existing RuntimeFlavor property. (#33559)

Change RuntimeName to the exiting RuntimeFlavor property.

4 years agoDelete redundant LangVersion properties (#33637)
Jan Kotas [Mon, 16 Mar 2020 20:13:09 +0000 (13:13 -0700)]
Delete redundant LangVersion properties (#33637)

4 years agoUpdate the docs with the change
vitek-karas [Mon, 16 Mar 2020 19:44:45 +0000 (12:44 -0700)]
Update the docs with the change

4 years agoDelete unnecessary ReferenceSystemPrivateCoreLib from CoreCLR tests (#33629)
Jan Kotas [Mon, 16 Mar 2020 18:36:36 +0000 (11:36 -0700)]
Delete unnecessary ReferenceSystemPrivateCoreLib from CoreCLR tests (#33629)

4 years agoReplace manually managed TLS slots with regular thread_local statics (#33597)
Jan Kotas [Mon, 16 Mar 2020 17:54:49 +0000 (10:54 -0700)]
Replace manually managed TLS slots with regular thread_local statics (#33597)

* Delete TlsIdx_XXX

* Delete EnableTerminationOnHeapCorruption

* Delete redundant cant stop tracking

* Workaround compiler bug

4 years ago[Loader] Change mono_trace level from info to debug (#33104)
monojenkins [Mon, 16 Mar 2020 15:51:56 +0000 (11:51 -0400)]
[Loader] Change mono_trace level from info to debug (#33104)

Fixes mono/mono#18795

**Testing:**
Created HelloWorld script
Set environment variable `export MONO_LOG_LEVEL=info`
Compiled and executed script before and after these changes were applied
```
mdhwang:~/Desktop$ ls -al csc_*txt mono_*txt
-rw-r--r--@ 1 mdhwang  staff   4270 Mar  3 10:12 csc_after.txt
-rw-r--r--@ 1 mdhwang  staff  56698 Mar  3 10:14 csc_before.txt
-rw-r--r--@ 1 mdhwang  staff    176 Mar  3 10:12 mono_after.txt
-rw-r--r--@ 1 mdhwang  staff   3617 Mar  3 10:14 mono_before.txt
```
There is a noticeable difference in log output sizes, and the logs created after the changes were applied mainly contain `Loading reference 0 of _ asmctx _` as desired in the issue.

Co-authored-by: mdh1418 <mdh1418@users.noreply.github.com>
4 years ago[master] Update dependencies from 3 repositories (#33588)
dotnet-maestro[bot] [Mon, 16 Mar 2020 15:37:59 +0000 (16:37 +0100)]
[master] Update dependencies from 3 repositories (#33588)

* Update dependencies from https://github.com/mono/linker build 20200313.2

- ILLink.Tasks - 0.1.6-prerelease.20163.2

* Update dependencies from https://github.com/microsoft/vstest build 20200313-06

- Microsoft.NET.Test.Sdk - 16.6.0-preview-20200313-06

* Update dependencies from https://github.com/mono/linker build 20200316.1

- ILLink.Tasks - 0.1.6-prerelease.20166.1

* Update dependencies from https://github.com/microsoft/vstest build 20200316-01

- Microsoft.NET.Test.Sdk - 16.6.0-preview-20200316-01

* Update dependencies from https://github.com/dotnet/llvm-project build 20200316.1

- runtime.win-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools - 6.0.1-alpha.1.20166.1
- runtime.win-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk - 6.0.1-alpha.1.20166.1
- runtime.linux-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools - 6.0.1-alpha.1.20166.1
- runtime.linux-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk - 6.0.1-alpha.1.20166.1

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
4 years agoRemove calls to empty RuntimeHelpers.PrepareConstrainedRegions() (#33191)
Roman Marusyk [Mon, 16 Mar 2020 14:39:37 +0000 (16:39 +0200)]
Remove calls to empty RuntimeHelpers.PrepareConstrainedRegions() (#33191)

Fixes #33179

4 years agoRemove unused variable for System.Net.Requests, as part of #30457 (#33619)
handlespeed [Mon, 16 Mar 2020 11:27:25 +0000 (19:27 +0800)]
Remove unused variable for System.Net.Requests, as part of #30457 (#33619)

src/libraries/System.Net.Requests/src/System/Net/FtpControlStream.cs, remove unused variable 'request' in L414.

Partially Fix #30457

4 years agoAdd example profiler that does stack sampling with ICorProfilerInfo10::SuspendRuntime...
David Mason [Mon, 16 Mar 2020 08:17:58 +0000 (01:17 -0700)]
Add example profiler that does stack sampling with ICorProfilerInfo10::SuspendRuntime (#32988)

4 years agoRemove MethodDesc from GC coverage.
Aaron Robinson [Mon, 16 Mar 2020 04:57:16 +0000 (21:57 -0700)]
Remove MethodDesc from GC coverage.

4 years agoDon't delete private keys detected from SerializedCert imports
Jeremy Barton [Mon, 16 Mar 2020 04:52:33 +0000 (21:52 -0700)]
Don't delete private keys detected from SerializedCert imports

4 years agoUpdate gccover.cpp
Aaron Robinson [Mon, 16 Mar 2020 04:23:49 +0000 (21:23 -0700)]
Update gccover.cpp

Misspelled function referenced in comment.

4 years agoGC coverage can now occur in scenarios where a thread doesn't exist.
Aaron Robinson [Mon, 16 Mar 2020 03:46:49 +0000 (20:46 -0700)]
GC coverage can now occur in scenarios where a thread doesn't exist.
Properly handle this case and assert some invariant.

4 years agoAdditional code coverage in System.Text.Json - no public constructors (#33137)
Alan Isaac [Mon, 16 Mar 2020 03:02:23 +0000 (23:02 -0400)]
Additional code coverage in System.Text.Json - no public constructors (#33137)

* added tests for concurrent collection private constructors

* added tests for non generic collection private constructors

* added tests for generic collection private constructors

* added additional test for read only dictionary private constructor

* fixed location of compile directive

* added assertion for exception messages

* added additional assertions for exception messages

* using [Theory] tests to reduce LoC

* using [Theory] for additional tests

* reordered files in test project

* added internal ctor tests

4 years agoFixing the sourcelink failure for embeded files (#33521)
Anirudh Agnihotry [Sun, 15 Mar 2020 20:19:09 +0000 (13:19 -0700)]
Fixing the sourcelink failure for embeded files (#33521)

* fixing sourcelink

* enable sourcelink on official build

* addressing feedback

* removing extra space

* reverting eng common change

* adding comment

* moving comment to correct place

* not embedding files for test assemblies

4 years agoPrint Ibc messages only when --verbose is specified (#33595)
David Wrighton [Sun, 15 Mar 2020 20:02:00 +0000 (13:02 -0700)]
Print Ibc messages only when --verbose is specified (#33595)

4 years agoUpdate links to the design repo (#33606)
Jan Kotas [Sun, 15 Mar 2020 15:55:32 +0000 (08:55 -0700)]
Update links to the design repo (#33606)

4 years agoUse compilerName and compilerArg in pipeline configs
Adeel [Sun, 15 Mar 2020 09:44:51 +0000 (11:44 +0200)]
Use compilerName and compilerArg in pipeline configs

4 years agoUpdate .NET 5 Unicode data to version 13.0.0 (#33538)
Levi Broderick [Sun, 15 Mar 2020 06:53:43 +0000 (23:53 -0700)]
Update .NET 5 Unicode data to version 13.0.0 (#33538)

4 years ago[mono] Implement all Ssse3 and Sse42 intrinsics (#33591)
Egor Bogatov [Sun, 15 Mar 2020 03:20:36 +0000 (06:20 +0300)]
[mono] Implement all Ssse3 and Sse42 intrinsics (#33591)

* implement Ssse3

* Implement Sse42

* remove unrelated change

* Fix C compilation error

4 years agoAdd missing early-exit for LastIndexOfOrdinal (#33601)
Levi Broderick [Sun, 15 Mar 2020 01:22:22 +0000 (18:22 -0700)]
Add missing early-exit for LastIndexOfOrdinal (#33601)

4 years agoInclude apphost_version parameter in download URLs for both GUI and CLI apps
vitek-karas [Sun, 15 Mar 2020 00:01:19 +0000 (17:01 -0700)]
Include apphost_version parameter in download URLs for both GUI and CLI apps

So far the code only included the `&apphost_version=<version>` URL parameter in the URL used by the error dialog in GUI apps. The error written to stderr/trace would not have that parameter in its URL.

This change include this parameter in all cases. This also means that comhost/ijwhost and so on will also include the `apphost_version` parameter in their error codes and it will be the version of the comhost/ijwhost and so on. This is not 100% correct, but for the purposed of the website this should be enough (for now we don't see a reason to differentiate between the various hosting scenarios).

Adds a new test to cover this case.

4 years ago[wasm] Add a sample for collecting coverage data. (#33584)
monojenkins [Sat, 14 Mar 2020 22:23:10 +0000 (18:23 -0400)]
[wasm] Add a sample for collecting coverage data. (#33584)

Co-authored-by: vargaz <vargaz@users.noreply.github.com>
4 years agoMerge pull request #33578 from vitek-karas/HostDownloadUrls
Vitek Karas [Sat, 14 Mar 2020 21:55:53 +0000 (14:55 -0700)]
Merge pull request #33578 from vitek-karas/HostDownloadUrls

Add a document describing usage of URLs in the hosting layer

4 years agoApply suggestions from code review
Vitek Karas [Sat, 14 Mar 2020 21:55:29 +0000 (14:55 -0700)]
Apply suggestions from code review

Co-Authored-By: Elinor Fung <47805090+elinor-fung@users.noreply.github.com>
4 years agoAllow Utf8String package to work on netstandard 2.0 (#33357)
Eric Erhardt [Sat, 14 Mar 2020 15:43:44 +0000 (10:43 -0500)]
Allow Utf8String package to work on netstandard 2.0 (#33357)

* Update ref assembly for building netstandard2.0.

Includes System.Text.Rune for netstandard2.0, since that is currently only netcoreapp3.0.

* Get Rune working on netstandard2.0

* Get Utf8Span compiling on netstandard2.0.

* Get Utf8String building on netstandard2.0

* Compile Utf8String/Span.Conversion.cs for netstandard.

* Build Utf8String Comparison and Enumeration for netstandard.

* Enable Index and Range on netstandard2.0

* Moving code around so it lines up with the ref assemblies.
Getting the full build working again.

* Build for netcoreapp3.0.
Get the package building.

* Get tests building on netfx

* Get Utf8String constructors working on netstandard.

* Get all tests running on netfx.

* Fix build for netcoreapp3.0, which doesn't have SerializeToStreamAsync with cancellation.

* Add netstandard2.1 support to Utf8String.Experimental.

* Make Intrinsics IsSupported be const fields.

* Address PR feedback

* Ensure nint and nuint are set correctly when building Utf8String outside of CoreLib.

* Fix bug in construction from long UTF16 string.

4 years agoFix indentations of nameof (#33586)
Next Turn [Sat, 14 Mar 2020 11:34:34 +0000 (19:34 +0800)]
Fix indentations of nameof (#33586)

4 years agoUpdate artifactName prefix for GCC publish log task (#33573)
Adeel Mujahid [Sat, 14 Mar 2020 03:49:11 +0000 (05:49 +0200)]
Update artifactName prefix for GCC publish log task (#33573)

4 years ago[master] Update dependencies from dotnet/arcade dotnet/runtime-assets (#33562)
dotnet-maestro[bot] [Sat, 14 Mar 2020 03:46:19 +0000 (20:46 -0700)]
[master] Update dependencies from dotnet/arcade dotnet/runtime-assets (#33562)

* Update dependencies from https://github.com/dotnet/arcade build 20200312.3

- Microsoft.DotNet.XUnitExtensions - 5.0.0-beta.20162.3
- Microsoft.DotNet.VersionTools.Tasks - 5.0.0-beta.20162.3
- Microsoft.DotNet.ApiCompat - 5.0.0-beta.20162.3
- Microsoft.DotNet.Arcade.Sdk - 5.0.0-beta.20162.3
- Microsoft.DotNet.Build.Tasks.Feed - 5.0.0-beta.20162.3
- Microsoft.DotNet.Build.Tasks.Packaging - 5.0.0-beta.20162.3
- Microsoft.DotNet.Build.Tasks.SharedFramework.Sdk - 5.0.0-beta.20162.3
- Microsoft.DotNet.Build.Tasks.TargetFramework.Sdk - 5.0.0-beta.20162.3
- Microsoft.DotNet.CodeAnalysis - 5.0.0-beta.20162.3
- Microsoft.DotNet.GenAPI - 5.0.0-beta.20162.3
- Microsoft.DotNet.GenFacades - 5.0.0-beta.20162.3
- Microsoft.DotNet.Helix.Sdk - 5.0.0-beta.20162.3
- Microsoft.DotNet.RemoteExecutor - 5.0.0-beta.20162.3
- Microsoft.DotNet.XUnitConsoleRunner - 2.5.1-beta.20162.3

* Update dependencies from https://github.com/dotnet/runtime-assets build 20200312.1

- System.Windows.Extensions.TestData - 5.0.0-beta.20162.1
- System.Security.Cryptography.X509Certificates.TestData - 5.0.0-beta.20162.1
- System.Private.Runtime.UnicodeData - 5.0.0-beta.20162.1
- System.Net.TestData - 5.0.0-beta.20162.1
- System.IO.Packaging.TestData - 5.0.0-beta.20162.1
- System.IO.Compression.TestData - 5.0.0-beta.20162.1
- System.Drawing.Common.TestData - 5.0.0-beta.20162.1
- System.ComponentModel.TypeConverter.TestData - 5.0.0-beta.20162.1

* Remove APICompat downgrade

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Co-authored-by: Santiago Fernandez Madero <safern@microsoft.com>
4 years ago[mono] Implement missing SSE2 intrinsics (#33574)
Egor Bogatov [Sat, 14 Mar 2020 03:35:53 +0000 (06:35 +0300)]
[mono] Implement missing SSE2 intrinsics (#33574)

* Implement missing SSE2 intrinsics

* remove SN_ConvertScalarToVector128Single case

* Remove unrelated change

* Shuffle < Sqrt (binary search)

4 years agoRead the image earlier (#33576)
Andrew Au [Sat, 14 Mar 2020 03:23:53 +0000 (20:23 -0700)]
Read the image earlier (#33576)

4 years agoDisable publishing CoreCLR product binaries on GCC leg (#33580)
Santiago Fernandez Madero [Sat, 14 Mar 2020 02:45:40 +0000 (19:45 -0700)]
Disable publishing CoreCLR product binaries on GCC leg (#33580)

4 years agoPrep CompareInfo for spanification (#32385)
Levi Broderick [Sat, 14 Mar 2020 02:43:13 +0000 (19:43 -0700)]
Prep CompareInfo for spanification (#32385)

4 years agoFix dump of common methods diff (#33570)
Jan Vorlicek [Sat, 14 Mar 2020 02:22:09 +0000 (03:22 +0100)]
Fix dump of common methods diff (#33570)

The DiffMethodsForModule was accidentally trying to get leftSection from
the right dumper.

4 years ago[Arm64] Vector Load/Store structure instructions (#33461)
Egor Chesakov [Sat, 14 Mar 2020 00:11:30 +0000 (17:11 -0700)]
[Arm64] Vector Load/Store structure instructions (#33461)

This adds support in the JIT emitter for Vector Load/Store structure instructions (C3.2.10 - Arm
Architecture Reference Manual):

- LD1 (1-4 registers)
- LD2
- LD3
- LD4
- LD1R
- LD2R
- LD3R
- LD4R
- ST1 (1-4 registers)
- ST2
- ST3
- ST4

in the following addressing modes:

- Base register only
- Post-indexed by a 64-bit register
- Post-indexed by an immediate, equal to the number of bytes transferred

Also adds support in JitDump for printing of

* A SIMD vector register list.
  For example, ld1     {v5.16b, v6.16b, v7.16b, v8.16b}, [x9]

* A SIMD vector element list.
  For example, st1     {v0.b}[3], [x1],#1

4 years agoMake NativeCallableAttribute public. (#33005)
Aaron Robinson [Fri, 13 Mar 2020 23:50:58 +0000 (16:50 -0700)]
Make NativeCallableAttribute public. (#33005)

* Avoid creating a COM Delegate when calling NativeCallableAttribute.

* Create reverse P/Invoke frame.
Create Preempt and Coop PreStubWorker().

* Limit the exclusion for NativeCallableAttribute to Win-x86.

* Add Reverse P/Invoke JIT helpers to CrossGen2.

* Add test for generic class with NativeCallableAttribute method.

* Implement Unix EH change for NativeCallableAttribute method.

Co-authored-by: Jan Vorlicek <janvorli@microsoft.com>
Co-authored-by: Jan Kotas <jkotas@microsoft.com>
4 years agoRemove TS_UserSuspendPending enum (#33539)
Erhan Atesoglu [Fri, 13 Mar 2020 22:56:27 +0000 (15:56 -0700)]
Remove TS_UserSuspendPending enum (#33539)

This PR removes the unused TS_UserSuspendPending enum as well as flag usage.

4 years agoAdd a document describing usage of URLs in the hosting layer
vitek-karas [Fri, 13 Mar 2020 22:28:57 +0000 (15:28 -0700)]
Add a document describing usage of URLs in the hosting layer

4 years ago[jit] Add support for emitting r4/r8 constants outside of the text segment. (#33552)
monojenkins [Fri, 13 Mar 2020 22:26:44 +0000 (18:26 -0400)]
[jit] Add support for emitting r4/r8 constants outside of the text segment. (#33552)

Co-authored-by: vargaz <vargaz@users.noreply.github.com>
4 years agoHostModel: Remove depricated API (#33545)
Swaroop Sridhar [Fri, 13 Mar 2020 22:23:30 +0000 (15:23 -0700)]
HostModel: Remove depricated API (#33545)

Some depricated APIs were maintained in #33413 so that SDK build is green.
Now that the SDK is updated https://github.com/dotnet/sdk/pull/10849, remove the unused APIs.

Also move out a test-only methods from the product to the test helpers.

4 years agoDisable not working test containing RemoteExecutor (#33560)
Jan Jahoda [Fri, 13 Mar 2020 22:17:30 +0000 (22:17 +0000)]
Disable not working test containing RemoteExecutor (#33560)

4 years agoAdd polymorphic tests for all root APIs (#33391)
Steve Harter [Fri, 13 Mar 2020 22:12:09 +0000 (17:12 -0500)]
Add polymorphic tests for all root APIs (#33391)

4 years ago[runtime] Coverage profiler improvements. (#33540)
monojenkins [Fri, 13 Mar 2020 22:01:14 +0000 (18:01 -0400)]
[runtime] Coverage profiler improvements. (#33540)

Co-authored-by: vargaz <vargaz@users.noreply.github.com>
4 years agoMerge pull request #33512 from kouvel/NoQuickJitFix
Koundinya Veluri [Fri, 13 Mar 2020 20:14:02 +0000 (16:14 -0400)]
Merge pull request #33512 from kouvel/NoQuickJitFix

When QuickJit is disabled, fix assertion failures regarding R2R code

4 years agoRename "PolicyProperty" to "PropertyInfoForClassInfo" and update nullability (#33432)
Steve Harter [Fri, 13 Mar 2020 19:38:46 +0000 (14:38 -0500)]
Rename "PolicyProperty" to "PropertyInfoForClassInfo" and update nullability (#33432)

4 years agoUpdate doc for exceptions thrown during serialization (#33400)
Steve Harter [Fri, 13 Mar 2020 18:57:43 +0000 (13:57 -0500)]
Update doc for exceptions thrown during serialization (#33400)

4 years agoFix content of baseline files (#33514)
Gustavo Varo [Fri, 13 Mar 2020 16:36:03 +0000 (12:36 -0400)]
Fix content of baseline files (#33514)

4 years ago[mono] Track .dotnet runtime version (#33180)
Egor Bogatov [Fri, 13 Mar 2020 16:18:10 +0000 (19:18 +0300)]
[mono] Track .dotnet runtime version (#33180)

* Track .dotnet runtime version correctly

* Use BundledNETCoreAppPackageVersion

* Rollback to an error

* Update src/mono/mono.proj

Co-Authored-By: Alexander Köplinger <alex.koeplinger@outlook.com>
Co-authored-by: Alexander Köplinger <alex.koeplinger@outlook.com>
4 years agoReplace ushort usage with int (#32694)
Miha Zupan [Fri, 13 Mar 2020 15:30:00 +0000 (16:30 +0100)]
Replace ushort usage with int (#32694)

* Replace pointless ushort usage with int

* Revert extracting name[i] to a local

* Use int instead of byte in IPv4 ParseCanonical

4 years agoClean up unused locals in System.Drawing.Common (#32212)
Next Turn [Fri, 13 Mar 2020 14:49:09 +0000 (22:49 +0800)]
Clean up unused locals in System.Drawing.Common (#32212)

* Clean up unused locals in System.Drawing.Common

* Remove BufferedStream, use MemoryStream.ToArray()

4 years ago[threads] If shutting_down, don't create new thread, kill current thread (#32968)
Aleksey Kliger (λgeek) [Fri, 13 Mar 2020 14:45:03 +0000 (10:45 -0400)]
[threads] If shutting_down, don't create new thread, kill current thread (#32968)

If the runtime is shutting down, instead of creating a new thread, or throwing
an exception on the current thread, just shut down the current thread.

This takes advantage of `mono_threads_set_shutting_down`'s behavior that if you
call it after shutdown is already started, it will suspend, detach and exit
from the current thread.

Fixes https://github.com/dotnet/runtime/issues/31842

4 years agoFix line endings under src/mono (#33547)
Jan Kotas [Fri, 13 Mar 2020 13:43:12 +0000 (06:43 -0700)]
Fix line endings under src/mono (#33547)

Fixes #2222

4 years agoClean `fgMorphPotentialTailCall` for the future changes. (#33457)
Sergey Andreenko [Fri, 13 Mar 2020 06:25:24 +0000 (23:25 -0700)]
Clean `fgMorphPotentialTailCall` for the future changes. (#33457)

* Clean `fgMorphPotentialTailCall` for the future changes.

* Use the original type, because the call was retyped to void.

* another fix for arm64.

4 years ago[debugger] [coop] assertion when `socket_transport_send` called from the crash report...
monojenkins [Fri, 13 Mar 2020 03:46:09 +0000 (23:46 -0400)]
[debugger] [coop] assertion when `socket_transport_send` called from the crash reporter (#33489)

If there is a crash and the debugger is attached, we call mini_get_dbg_callbacks ()->send_crash().

That call ends up in mono_debugger_agent_send_crash which does all kinds of questionable stuff like trying to take the loader lock. Eventually it ends up calling socket_transport_send which tries to do a transition to GC Safe mode.
I inserted a MONO_ENTER_GC_UNSAFE in mono_debugger_agent_send_crash function and this fixes the assert.

Fixes mono/mono#18794

Co-authored-by: thaystg <thaystg@users.noreply.github.com>
4 years ago[wasm][debugger] Continue SS after leaving managed code (#33272)
monojenkins [Fri, 13 Mar 2020 03:44:52 +0000 (23:44 -0400)]
[wasm][debugger] Continue SS after leaving managed code (#33272)

Continue stepping over/into/out of managed code to native code, without this fix the behavior was resume when a SS leaves the managed code.

Co-authored-by: thaystg <thaystg@users.noreply.github.com>
4 years agoExtensions: Adding FileProviders and FileSystemGlobbing (#33212)
Maryam Ariyan [Fri, 13 Mar 2020 02:55:25 +0000 (19:55 -0700)]
Extensions: Adding FileProviders and FileSystemGlobbing (#33212)

* - [x] Bulk update all ref csproj except for FileProviders/FileSystemGlobbing
* - Bulk move Descriptions to json file, all except for FileProviders and FileSystemGlobbing
* - Bulk correct test project targetframeworks, all except for FileProviders and FileSystemGlobbing
* - Bulk rename ref cs file and delete the extra duplicates
* - Bulk move/rename Resources file
from: Resources.resx to Resources\Strings.resx

* Enables ref/src/test/pkg/sln on FileProviders projects and FileSystemGlobbing
- [x] Enable on Directory.Build.props
- [x] build ref/src projects and used GenerateReferenceSource
- [x] cleanup src csproj properties
- [x] set proper targetframeworks

4 years ago[jit] Add more SSE2 opcodes. Enable SSE2. (#33465)
Zoltan Varga [Fri, 13 Mar 2020 01:48:03 +0000 (21:48 -0400)]
[jit] Add more SSE2 opcodes. Enable SSE2. (#33465)

* [jit] Fix the Sse2 supported check.

* Add more SSE2 opcodes. Enable SSE2.

* Use the non-immediate version of the shift opcodes.

* Fix ShiftRightArithmetic.

* Remove a debug printf.

* Implement all SSE3 intrinsics.

* Define all intrinsics using the SimdIntrinsic struct.

* Disable SSE2 support as some intrinsics are still missing.

4 years agoRemove asserts that were firing during rejit tests (#33492)
David Mason [Fri, 13 Mar 2020 01:17:18 +0000 (18:17 -0700)]
Remove asserts that were firing during rejit tests (#33492)

The rejit path no longer suspends the runtime so that assert is inaccurate

4 years agoReduce fixed overhead of some Utf8Parser.TryParse methods (#33507)
Levi Broderick [Fri, 13 Mar 2020 00:57:23 +0000 (17:57 -0700)]
Reduce fixed overhead of some Utf8Parser.TryParse methods (#33507)

4 years agoFix handling thread abort in HelperMethodFrame (#33448)
Jan Vorlicek [Fri, 13 Mar 2020 00:55:44 +0000 (01:55 +0100)]
Fix handling thread abort in HelperMethodFrame (#33448)

* Fix handling thread abort in HelperMethodFrame

The thread abort during func eval from a managed debugger on Linux and macOS
was sometimes causing the debuggee to exit with unhandled c++ PAL_SEHException.
The reason is that the thread abort detection that is done in the
HELPER_METHOD_FRAME_BEGIN and ...END macros was done outside of the
INSTALL_MANAGED_EXCEPTION_DISPATCHER / UNINSTALL_MANAGED_EXCEPTION_DISPATCHER
region and so the exception thrown when thread abort request is detected
there was not being caught and translated into a call to DispatchManagedException.
Since the caller frame was a managed function frame, the C++ exception handling
didn't know how to unwind it and so it declared the exception being unhandled.

This fix moves the frame pushing and popping inside of the
INSTALL_MANAGED_EXCEPTION_DISPATCHER / UNINSTALL_MANAGED_EXCEPTION_DISPATCHER
region. That way, the thread abort exception is properly handled.

4 years ago[test][mono] Capture the ExceptionDispatchInfo when rethrowing from TaskContinuation...
monojenkins [Fri, 13 Mar 2020 00:08:51 +0000 (20:08 -0400)]
[test][mono] Capture the ExceptionDispatchInfo when rethrowing from TaskContinuation (#33491)

Regression test for https://github.com/mono/mono/issues/19166

Co-authored-by: lambdageek <lambdageek@users.noreply.github.com>
4 years agoJIT: fix overly aggressive tail recursive call loop marking (#33517)
Andy Ayers [Thu, 12 Mar 2020 22:49:40 +0000 (15:49 -0700)]
JIT: fix overly aggressive tail recursive call loop marking (#33517)

If there is a tail recursive call site, the jit will mark all blocks
from method entry to the block with the call as "in a loop," anticipating
a tail recursive call to loop optimization.

Because of some confusing naming we were doing this even for recursive calls
that were not tail calls. Upshot is that blocks were marked as being in loops
when they weren't, and (among other things) this made the inliner more
aggressive for calls in those blocks.

4 years agoMoved warning disables from warningcontrol.h to configurecompiler.cmake (#33439)
Ivan Diaz Sanchez [Thu, 12 Mar 2020 22:00:33 +0000 (15:00 -0700)]
Moved warning disables from warningcontrol.h to configurecompiler.cmake (#33439)

* Moved warning disables from warningcontrol.h to configurecompiler.cmake

* Completely moved the contents of inc/warningcontrol.hto configurecompiler.cmake.

4 years agoAdd CoreCLR build pipeline for GCC (#33446)
Adeel Mujahid [Thu, 12 Mar 2020 20:37:55 +0000 (22:37 +0200)]
Add CoreCLR build pipeline for GCC (#33446)

* Add CoreCLR build pipeline for GCC

* Fix GCC build issues

* Use empty clangArg in case of GCC

* Revert ilasm's cmake file

* Use GCC to also build native test components

4 years agoFixed memory leak of OverlappedData when doing read from server WebSocket stream...
Marie Píchová [Thu, 12 Mar 2020 20:07:03 +0000 (21:07 +0100)]
Fixed memory leak of OverlappedData when doing read from server WebSocket stream. (#33480)

4 years agoMerge pull request #33497 from dotnet/vivpatch
Vivek Mishra [Thu, 12 Mar 2020 19:22:50 +0000 (12:22 -0700)]
Merge pull request #33497 from dotnet/vivpatch

Adding separate 2.1 SDK yaml

4 years agoCleanup stale ApiCompatBaseline files (#33519)
Eric StJohn [Thu, 12 Mar 2020 19:04:56 +0000 (12:04 -0700)]
Cleanup stale ApiCompatBaseline files (#33519)

4 years ago[metadata] Disable three icalls on netcore monodroid (#33513)
monojenkins [Thu, 12 Mar 2020 18:18:04 +0000 (14:18 -0400)]
[metadata] Disable three icalls on netcore monodroid (#33513)

They aren't used there.

Co-authored-by: akoeplinger <akoeplinger@users.noreply.github.com>
4 years agoRemove the copy of core_root by using core_root as the corelation dir (#33498)
Jarret Shook [Thu, 12 Mar 2020 17:56:24 +0000 (10:56 -0700)]
Remove the copy of core_root by using core_root as the corelation dir (#33498)

* Remove the copy of core_root by using core_root as the corelation dir

* Change to remove core_root, it is the workitem_payload

* Fix core_root location

4 years agoMerge pull request #33494 from maryamariyan/fromoldmaster-bringmissingfiles-1
Maryam Ariyan [Thu, 12 Mar 2020 15:28:23 +0000 (08:28 -0700)]
Merge pull request #33494 from maryamariyan/fromoldmaster-bringmissingfiles-1

Bring commit history for more files from Extensions repo

4 years agoFix type layout whan Cross OS compiling (#33487)
Steve MacLean [Thu, 12 Mar 2020 15:22:14 +0000 (11:22 -0400)]
Fix type layout whan Cross OS compiling (#33487)

* Fix cache line size to be a TARGET property

* Fix CCompRC cross OS DAC layout

* Fix cross OS InlineSArray packing

* Add DAC_ALIGNAS()

Align first member of various classes which have shown
inconsistent layout during cross compilation.

* Fix RegMeta cross os layout

* Fix typo

* Remove dead code

* Remove FunctionSigBuilder et. al from DAC

Remove FunctionSigBuilder and classes which depend on its
definition from the DAC.

Remove the FunctionSigBuilder layout correction to make it
cross platform stable.

* Remove more stubgen classes from DAC

* Improve comment

4 years ago[merp] Remove unnecessary call to msync in mono_state_free_mem (#33395)
monojenkins [Thu, 12 Mar 2020 15:13:18 +0000 (11:13 -0400)]
[merp] Remove unnecessary call to msync in mono_state_free_mem (#33395)

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

Co-authored-by: alexischr <alexischr@users.noreply.github.com>
4 years agoRun APICompat against the previous release of NETCoreApp (#33300)
Eric StJohn [Thu, 12 Mar 2020 14:47:09 +0000 (07:47 -0700)]
Run APICompat against the previous release of NETCoreApp (#33300)

* Run APICompat against the previous release of NETCoreApp

* Remove redundant source build condition

* Add APICompat specific attribute exclusion list.

* Update to latest ApiCompat

4 years agoWhen QuickJit is disabled, fix assertion failures
Koundinya Veluri [Wed, 11 Mar 2020 18:41:16 +0000 (11:41 -0700)]
When QuickJit is disabled, fix assertion failures

- When QuickJit is disabled, the initial tier is Optimized instead of the correct Tier0. This causes assertion failures as tiering tries to count calls and promote the method to Tier1.
  - Does not appear to be an issue in release builds, as the methods are still call-counted and promoted despite the incorrect tier
- Add some basic tiering tests for config modes that are exposed and supported through <app>.runtimeconfig.json, QuickJit and QuickJitForLoops, when on and off
- Removed an invalid and redundant assertion that was causing a profiler rejit test to fail, see https://github.com/dotnet/runtime/pull/33492#discussion_r391257466. What the assertion was intending to verify is already verified by an assertion above it that checks the tier, which also covers the default native code version case.

4 years agoBring back GenAPI subscription, update to latest and workaround roslyn issue (#33499)
Santiago Fernandez Madero [Thu, 12 Mar 2020 11:50:55 +0000 (04:50 -0700)]
Bring back GenAPI subscription, update to latest and workaround roslyn issue (#33499)

4 years agoShare managed EventSource/EventPipe implementation between CoreCLR and Mono. (#33425)
Johan Lorensson [Thu, 12 Mar 2020 11:35:50 +0000 (12:35 +0100)]
Share managed EventSource/EventPipe implementation between CoreCLR and Mono. (#33425)

First changes needed in order to start sharing managed EventSource/EventPipe
code between CoreCLR and Mono runtime. Sharable code has been moved into
S.P.C library project and split into runtime specific source files when
needed, kept within each runtime specific S.P.C project files.

Mono runtime has been extended with a set of icalls needed by
EventPipeInternal, just to make sure EventPipe can be initialized,
current Mono runtime implementation returns dummy values.

Current change also enables ETW provider support on Mono Windows runtime.

NOTE, this is just initial changes needed in order to share managed
EventSource/EventPipe code between runtimes. Future changes will incrementally
add EventPipe native code into Mono runtime.