platform/upstream/dotnet/runtime.git
4 years ago[runtime] Fix Type.GetTypeCode () for generic enums. (#34670)
monojenkins [Wed, 8 Apr 2020 16:05:09 +0000 (12:05 -0400)]
[runtime] Fix Type.GetTypeCode () for generic enums. (#34670)

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

<!--
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: vargaz <vargaz@users.noreply.github.com>
4 years agoUnify exclusion of System.IO.Ports.Native build (#34683)
Marek Safar [Wed, 8 Apr 2020 14:36:45 +0000 (16:36 +0200)]
Unify exclusion of System.IO.Ports.Native build (#34683)

4 years agoCoreCLR runtime fixes for composite R2R build with shared framework (#34432)
Tomáš Rylek [Wed, 8 Apr 2020 12:59:53 +0000 (14:59 +0200)]
CoreCLR runtime fixes for composite R2R build with shared framework (#34432)

In jithelpers, switch the query over to use a ReadyToRunInfo method
to make it work in composite mode. Also fix two places in
ReadyToRunInfo that were erroneously referring to composite info
(inlining tables).

Thanks

Tomas

4 years agoRemove upload-unsigned-artifacts-step.yml from mono build-job.yml (#34687)
Alexander Köplinger [Wed, 8 Apr 2020 12:30:29 +0000 (14:30 +0200)]
Remove upload-unsigned-artifacts-step.yml from mono build-job.yml (#34687)

After https://github.com/dotnet/runtime/pull/34643 there are no .nupkg's produced by the Mono build anymore so that step fails.

4 years agoEnable xunit1024 (#34512)
Alex Villarreal [Wed, 8 Apr 2020 10:58:54 +0000 (05:58 -0500)]
Enable xunit1024 (#34512)

* Enable analyzer rule xUnit1024

* Remove redundant test in System.Text.Json

The very next method is a Theory with inline data that tests this
exact scenario.

* Rename test methods in System.Text.Json

* Rename test methods in System.ComponentModel.Annotations

* Private methods -> local functions in System.Text.Json

* Rename test methods in System.Collections.Immutable

For RemoveNonExistingTest, just moved the logic from the single-use
helper into the method with the Fact attribute.

* Rename test methods in System.Globalization

* Rename test methods in System.Runtime.Extensions

In Math.cs, removed Round_Decimal_Digits Fact which manually tested
cases included in the MemberData of a Theory with the same name.

* Rename test methods in System.Private.Uri

* Rename test methods in System.Runtime.WindowsRuntime.UI.Xaml

* Rename test methods in System.Security.Cryptography.X509Certificates

* Rename test methods in System.Reflection

* Remove redundant test in System.IO.FileSystem.Watcher

Theory EndInit_ResumesPausedEnableRaisingEvents alredy tests
the same scenario as the removed Fact of the same name.

* Rename test methods in System.IO.FileSystem.Watcher

* Rename test methods in System.Composition.Runtime

* Rename test methods in System.Drawing.Primitives

* Rename test methods in System.Reflection.Emit

* Rename test methods in System.Text.RegularExpressions

* Private methods -> local functions in System.Threading.Tasks.Parallel

* Rename test methods in System.Threading.Tasks.Parallel

* Rename test methods in System.Threading.Tasks

* Simplify tests in System.Threading

* Rename test methods in System.Threading

* Rename test methods in Microsoft.VisualBasic.Core

* Rename test methods in System.DirectoryServices.AccountManagement

* Private methods -> local functions in System.Text.Encoding

* Rename test methods in System.Text.Encoding

* Rename test methods in System.Security.Cryptography.Primitives

* Rename test methods in System.Runtime.Numeric

* Rename test methods in System.CodeDom.Tests

* Rename test methods in System.Reflection.Emit.ILGeneration

* Rename test methods in System.Composition.AttributedModel

* Rename test methods in System.Data.DataSetExtensions

* Rename test methods in System.Runtime

* Rename test methods in System.Runtime.InteropServices

* Remove redundant test in System.ServiceModel.Syndication

* Rename test methods in System.ServiceModel.Syndication

* Rename test methods in System.Data.Common

* Rename test methods in System.Security.Cryptography.Xml

* Private methods -> local functions in System.Security.Cryptography.Xml

* Simplify tests in System.Security.Cryptography.ProtectedData

* Replace private methods with local functions...

In System.Security.Cryptography.Algorithms

* Rename test methods in System.Security.Cryptography.Algorithms

* Simplify tests code in System.Collections.Concurrent

* Rename test methods in System.Drawing.Common

* Rename test methods in System.Data.OleDb

* Rename test methods in System.ComponentModel.TypeConverter

* Rename test methods in System.Web.HttpUtility

* Rename test methods in System.Linq

* Private method -> local function in System.Linq

* Rename test methods in System.Memory

* Rename test methods in System.IO.IsolatedStorage

* Rename test methods in System.DirectoryServices.Protocols

* Rename test methods in System.Globalization.Extensions

* Private methods -> local functions in System.Globalization.Extensions

* Rename test methods in System.IO.Compression

* Rename test methods in System.Security.Cryptography.Encoding

* Rename test methods in Microsoft.Win32.Registry

* Rename test methods in System.IO.UnmanagedMemoryStream

* Rename test methods in System.Collections

* Rename test methods in System.Collections.Specialized

* Rename test methods in System.Private.Xml

* Rename test methods in System.IO.FileSystem

* Rename test methods in System.Diagnostics.StackTrace

* Rename test methods in System.Diagnostics

* Improve some test method renames

* Minor nit fixing

* More improvements to test method names

4 years agoFix merge mistake in runtime-official.yml (#34680)
Alexander Köplinger [Wed, 8 Apr 2020 10:33:08 +0000 (12:33 +0200)]
Fix merge mistake in runtime-official.yml (#34680)

iOS_arm should be disabled but resolving a merge conflict caused a wrong line to be added.

4 years agoSupport 'System.GC.LargePages' in runtimeconfig.json (#34329)
Andrew Au [Wed, 8 Apr 2020 06:35:41 +0000 (23:35 -0700)]
Support 'System.GC.LargePages' in runtimeconfig.json (#34329)

4 years ago[meta] Fix loader printf mistake and outdated info in Makefile (#34602)
Ryan Lucia [Wed, 8 Apr 2020 05:10:34 +0000 (01:10 -0400)]
[meta] Fix loader printf mistake and outdated info in Makefile (#34602)

4 years agoClean up GetDelegateForFunctionPointer() code and test paths (#34655)
Aaron Robinson [Wed, 8 Apr 2020 04:50:05 +0000 (21:50 -0700)]
Clean up GetDelegateForFunctionPointer() code and test paths (#34655)

Update comments for GetDelegateForFunctionPointer() code path
Remove dead code
Update GetDelegateForFunctionPointer() tests in CoreCLR.
Removed duplicate tests that are covered in libraries test suite.

4 years agoRedesign the subset feature (#34663)
Viktor Hofer [Wed, 8 Apr 2020 01:09:31 +0000 (03:09 +0200)]
Redesign the subset feature (#34663)

* Redesign subset feature and remove subsetcategory

Implement proposal from https://github.com/dotnet/runtime/issues/34403.
Remove subsetcategory and allow all subsets to specified via the -subset
switch.

4 years agoRemove .pkgproj from Mono (#34643)
Alexander Köplinger [Wed, 8 Apr 2020 00:03:39 +0000 (02:03 +0200)]
Remove .pkgproj from Mono (#34643)

They are no longer needed since we have normal runtime packs now.

4 years agoInitial addition of tvOS Mono (#34475)
Jo Shields [Wed, 8 Apr 2020 00:00:28 +0000 (20:00 -0400)]
Initial addition of tvOS Mono (#34475)

4 years agoRename CoreFx.Private.TestUtilities and reference it in slns (#34656)
Viktor Hofer [Tue, 7 Apr 2020 23:26:53 +0000 (01:26 +0200)]
Rename CoreFx.Private.TestUtilities and reference it in slns (#34656)

* Rename CoreFx.Private.TestUtilities to TestUtilities

* Add TestUtilities reference to slns

4 years agoPublish crossgen2 as a .zip/tar.gz file (#34623)
David Wrighton [Tue, 7 Apr 2020 21:53:22 +0000 (14:53 -0700)]
Publish crossgen2 as a .zip/tar.gz file (#34623)

- For consumption in dotnet-docker repo

4 years agoFix unsupported instruction set handling in crossgen2 (#34605)
David Wrighton [Tue, 7 Apr 2020 21:49:50 +0000 (14:49 -0700)]
Fix unsupported instruction set handling in crossgen2 (#34605)

- A refactoring during crossgen2 production in the recent pr broke the unsupported instruction set mode for crossgen

Fixes #34628

4 years ago[master] Update dependencies from 5 repositories (#34275)
dotnet-maestro[bot] [Tue, 7 Apr 2020 21:48:26 +0000 (21:48 +0000)]
[master] Update dependencies from 5 repositories (#34275)

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

- runtime.win-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools - 6.0.1-alpha.1.20174.1
- runtime.win-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk - 6.0.1-alpha.1.20174.1
- runtime.osx.10.12-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools - 6.0.1-alpha.1.20174.1
- runtime.osx.10.12-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk - 6.0.1-alpha.1.20174.1
- runtime.linux-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools - 6.0.1-alpha.1.20174.1
- runtime.linux-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk - 6.0.1-alpha.1.20174.1

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

- ILLink.Tasks - 5.0.0-preview.3.20179.1

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

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

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

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

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

- ILLink.Tasks - 5.0.0-preview.3.20181.4

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

- ILLink.Tasks - 5.0.0-preview.3.20181.6

* Update dependencies from https://github.com/microsoft/vstest build 20200401-02

- Microsoft.NET.Test.Sdk - 16.6.0

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

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

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

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

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

- ILLink.Tasks - 5.0.0-preview.3.20202.1

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

- ILLink.Tasks - 5.0.0-preview.3.20203.2

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

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

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

- runtime.linux-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools - 6.0.1-alpha.1.20181.1
- runtime.win-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools - 6.0.1-alpha.1.20181.1
- runtime.win-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk - 6.0.1-alpha.1.20181.1
- runtime.osx.10.12-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools - 6.0.1-alpha.1.20181.1
- runtime.osx.10.12-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk - 6.0.1-alpha.1.20181.1
- runtime.linux-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk - 6.0.1-alpha.1.20181.1

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

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

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

- ILLink.Tasks - 5.0.0-preview.3.20206.2

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

- runtime.linux-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools - 6.0.1-alpha.1.20206.1
- runtime.win-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools - 6.0.1-alpha.1.20206.1
- runtime.win-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk - 6.0.1-alpha.1.20206.1
- runtime.osx.10.12-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools - 6.0.1-alpha.1.20206.1
- runtime.osx.10.12-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk - 6.0.1-alpha.1.20206.1
- runtime.linux-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk - 6.0.1-alpha.1.20206.1

* Update dependencies from https://github.com/microsoft/vstest build 20200406-12

- Microsoft.NET.Test.Sdk - 16.6.0-preview-20200406-12

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Co-authored-by: Viktor Hofer <viktor.hofer@microsoft.com>
4 years agoFix various LastIndexOf bugs when given zero-length target values (#34616)
Levi Broderick [Tue, 7 Apr 2020 19:16:24 +0000 (12:16 -0700)]
Fix various LastIndexOf bugs when given zero-length target values (#34616)

- string.LastIndexOf(string.Empty) shouldn't perform -1 adjustment
- MemoryExtensions.LastIndexOf(ROS<char>, string.Empty) shouldn't return 0
- Tighten up some existing unit tests

4 years agoEnable RuntimeIdentifierTests (#34595)
Eric Erhardt [Tue, 7 Apr 2020 18:57:31 +0000 (13:57 -0500)]
Enable RuntimeIdentifierTests (#34595)

* Enable RuntimeIdentifierTests

Now that we have an updated test host, we can enable the RuntimeInformation.RuntimeIdentifier tests that are disabled.

Fix #26780

* Trim quotes from ID in /etc/os-release

4 years agoFeed cleanup (#34044)
Matt Mitchell [Tue, 7 Apr 2020 17:01:44 +0000 (10:01 -0700)]
Feed cleanup (#34044)

* Feed cleanup

Move away from blob feeds.

* Add dotnet5 feed
* Update version of System.CommandLine.Experimental
* Revert to released versions in SuperILC and R2RDump
* Don't remove public feeds for tests

4 years agoFix ObjectDisposedException in FileSystemWatcher.OSX.cs (#34589)
Stephen Toub [Tue, 7 Apr 2020 14:49:38 +0000 (10:49 -0400)]
Fix ObjectDisposedException in FileSystemWatcher.OSX.cs (#34589)

Synchronize access to disposing the SafeHandle, and clean up some code distributed oddly between the ctor and Start, so as to make more fields readonly and only register for cancellation once everything has started, to avoid race conditions that could otherwise result between cancellation and starting happening concurrently.

4 years agoRestore followup (#34632)
Viktor Hofer [Tue, 7 Apr 2020 13:37:19 +0000 (15:37 +0200)]
Restore followup (#34632)

* Remove dead yml file

* Fix installer prepare for publish

4 years agoUse HostArch as a default TargetArchitecture (#34619)
Egor Bogatov [Tue, 7 Apr 2020 12:02:48 +0000 (15:02 +0300)]
Use HostArch as a default TargetArchitecture (#34619)

4 years agoMerge pull request #34468 from janvorli/fix-native-callable-method-hijack
Jan Vorlicek [Tue, 7 Apr 2020 10:21:38 +0000 (12:21 +0200)]
Merge pull request #34468 from janvorli/fix-native-callable-method-hijack

Prevent return address hijacking of NativeCallable method

4 years ago[sgen] Fix coverity issue (#34629)
Vlad Brezae [Tue, 7 Apr 2020 09:56:08 +0000 (12:56 +0300)]
[sgen] Fix coverity issue (#34629)

4 years agoAdd cgroup v2 support to coreclr (#34334)
Jan Vorlicek [Tue, 7 Apr 2020 09:21:48 +0000 (11:21 +0200)]
Add cgroup v2 support to coreclr (#34334)

Upstream cgroup v2 documentation is available at:
https://www.kernel.org/doc/Documentation/cgroup-v2.txt

Some notable differences between cgroup v1 and v2, from a coreclr point
of view, include:

- cgroup v2 has a single hierarchy, so we just look for a single "cgroup2"
  entry in /proc/self/mountinfo (without looking for a subsystem match).

- Since cgroup v2 has a single hierarchy, /proc/self/cgroup generally
  has a single line "0::/path". There's no need to match subsystems or
  hierarchy ids here.

- "memory.limit_in_bytes" is now "memory.max". It can contain the
  literal "max" to indicate no limit.

- "memory.usage_in_bytes" is now "memory.current"

- "cpu.cfs_quota_us" and "cpu.cfs_period_us" have been combined into a
  single "cpu.max" file with the format "$MAX $PERIOD". The max value
  can be a literal "max" to indicate a limit is not active.

It is possible to have both cgroup v1 and v2 enabled on a host (but not
inside a container, AFAIK). In that case, this change will pick one
based on /sys/fs/cgroup.

4 years agoFix IsBlittable flag bug on types. (#34613)
Fadi Hanna [Tue, 7 Apr 2020 05:19:15 +0000 (22:19 -0700)]
Fix IsBlittable flag bug on types. (#34613)

The issue is that we are automatically assuming that types are blittable until proven otherwise while traversing the list of fields declared on the type. In the case of a type with no fields, we have to also check if the parent type is blittable, before blindly setting the flag to true (Ex: what if the base type has non-blittable fields?)

4 years agoChange FrameworkName to .NET (#34615)
Jan Kotas [Tue, 7 Apr 2020 04:38:18 +0000 (21:38 -0700)]
Change FrameworkName to .NET (#34615)

Fixes #33680

4 years agoUse valid instructions in StubPrecode and NDirectImportPrecode on x64 (#34611)
Jan Kotas [Tue, 7 Apr 2020 04:33:03 +0000 (21:33 -0700)]
Use valid instructions in StubPrecode and NDirectImportPrecode on x64 (#34611)

StubPrecode and NDirectImportPrecode precoded used undefined instruction
encodings on x64 due to copy&paste from x86. Change them to use valid
instructions.

4 years agoAdd back support for Delegate field marshaling (#34620)
Aaron Robinson [Tue, 7 Apr 2020 04:18:28 +0000 (21:18 -0700)]
Add back support for Delegate field marshaling (#34620)

* Block route trip of function pointer as Delegate field.
Add tests for scenario.

* Update MarshalStructAsParamDLL.cpp

4 years agomoving more tfm dependent properties to targets file (#34532)
Anirudh Agnihotry [Tue, 7 Apr 2020 04:12:10 +0000 (21:12 -0700)]
moving more tfm dependent properties to targets file (#34532)

* moving more tfm dependent properties to targets file

* correct allconfig build

* shimrefpath -> runtime and indentation

4 years agoMissed feedback. (#34622)
Aaron Robinson [Tue, 7 Apr 2020 04:11:19 +0000 (21:11 -0700)]
Missed feedback. (#34622)

4 years ago[mono] Implement Arm intrinsics: ArmBase, Crc32 (#34240)
Egor Bogatov [Tue, 7 Apr 2020 01:25:11 +0000 (04:25 +0300)]
[mono] Implement Arm intrinsics: ArmBase, Crc32 (#34240)

* Implement Arm.ArmBase and Arm.Crc32 intrinsics

4 years agoAdds de/serialization support for JsonDocument (#34537)
Marcus Turewicz [Mon, 6 Apr 2020 23:56:54 +0000 (09:56 +1000)]
Adds de/serialization support for JsonDocument (#34537)

* Adds deserialization support for JsonDocument

This change adds support to `System.Text.Json` for deserializing `JsonDocument`.

Specifically, an internal converter `JsonDocumentConverter` is added to the default converter dictionary.

I have created a basic test, but I feel more could be done here, and it may not be in the right file/class - some guidance would be helpful here.

Fixes #1573

* Adds JsonDocumentTests

* Dispose JsonDocument

4 years agoDon't test ANSI any mapping on non en-US locales. (#34599)
Aaron Robinson [Mon, 6 Apr 2020 23:48:39 +0000 (16:48 -0700)]
Don't test ANSI any mapping on non en-US locales. (#34599)

4 years agoSuperIlc fixes to unblock composite build using the shared library (#34430)
Tomáš Rylek [Mon, 6 Apr 2020 22:33:51 +0000 (00:33 +0200)]
SuperIlc fixes to unblock composite build using the shared library (#34430)

4 years ago[llvm] Define a separate symbol for the aot method info for every method. Pass this...
monojenkins [Mon, 6 Apr 2020 22:14:07 +0000 (18:14 -0400)]
[llvm] Define a separate symbol for the aot method info for every method. Pass this symbol to the init functions instead of the method index. (#34009)

This removes a dependency the generated code has on the method index, hopefully allowing separate compilation etc. in the future.

<!--
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: vargaz <vargaz@users.noreply.github.com>
4 years agoEnable more nullable reference types in asn.xslt.
Kevin Jones [Mon, 6 Apr 2020 17:31:58 +0000 (13:31 -0400)]
Enable more nullable reference types in asn.xslt.

string and Oid types on Choice can be null.
Reference types that are @optional can be null.

Also, remove #nullable enable, because all projects that include the ASN.1 generate files should already have nullable enable project-wide.

4 years agoAdds tests for missing object and collection properties in S.T.J.S (#34559)
Marcus Turewicz [Mon, 6 Apr 2020 17:27:59 +0000 (03:27 +1000)]
Adds tests for missing object and collection properties in S.T.J.S (#34559)

4 years agoFix missing version info in host binaries (#34520)
Elinor Fung [Mon, 6 Apr 2020 17:23:46 +0000 (10:23 -0700)]
Fix missing version info in host binaries (#34520)

4 years agoAdd build configuration to generate runtime packs for Android (#34192)
Mitchell Hwang [Mon, 6 Apr 2020 16:30:36 +0000 (12:30 -0400)]
Add build configuration to generate runtime packs for Android (#34192)

* [installer] Include Android into installer

* [eng] Provide Android with just Microsoft.NETCore.App.Runtime

* Attempt to make same changes from iOS PR

Co-authored-by: Mitchell Hwang <mihw@microsoft.com>
4 years agoFix contructor attributes nullability in S.R.E.CustomAttributeBuilder (#34556)
Marcus Turewicz [Mon, 6 Apr 2020 15:55:19 +0000 (01:55 +1000)]
Fix contructor attributes nullability in S.R.E.CustomAttributeBuilder (#34556)

* Fix contructor attributes nullability in S.R.E.CustomAttributeBuilder

Fixes #819

* Finalise nullable

* Updates ref

4 years agoFix Linux x86 build (#34548)
Gleb Balykov [Mon, 6 Apr 2020 15:40:10 +0000 (18:40 +0300)]
Fix Linux x86 build (#34548)

* Fix Linux x86 build

Related to #33005

* Fix Linux x86 build

Related to #33653, #33005

* Fix Linux x86 build

Related to #32250

4 years agoAdd cgroup v2 support to coreclr
Omair Majid [Tue, 31 Mar 2020 16:06:44 +0000 (12:06 -0400)]
Add cgroup v2 support to coreclr

Upstream cgroup v2 documentation is available at:
https://www.kernel.org/doc/Documentation/cgroup-v2.txt

Some notable differences between cgroup v1 and v2, from a coreclr point
of view, include:

- cgroup v2 has a single hierarchy, so we just look for a single "cgroup2"
  entry in /proc/self/mountinfo (without looking for a subsystem match).

- Since cgroup v2 has a single hierarchy, /proc/self/cgroup generally
  has a single line "0::/path". There's no need to match subsystems or
  hierarchy ids here.

- "memory.limit_in_bytes" is now "memory.max". It can contain the
  literal "max" to indicate no limit.

- "memory.usage_in_bytes" is now "memory.current"

- "cpu.cfs_quota_us" and "cpu.cfs_period_us" have been combined into a
  single "cpu.max" file with the format "$MAX $PERIOD". The max value
  can be a literal "max" to indicate a limit is not active.

It is possible to have both cgroup v1 and v2 enabled on a host (but not
inside a container, AFAIK). In that case, this change will pick one
based on /sys/fs/cgroup.

4 years agoChanged triggered by the StringBuilder analyzer (#34574)
Prashanth Govindarajan [Mon, 6 Apr 2020 15:22:34 +0000 (08:22 -0700)]
Changed triggered by the StringBuilder analyzer (#34574)

4 years agoRemove entry point helper scripts (#33756)
Viktor Hofer [Mon, 6 Apr 2020 13:38:04 +0000 (15:38 +0200)]
Remove entry point helper scripts (#33756)

* Remove entry point helper scripts

The entry point helper scripts were useful during the consolidation of
the repositories. This work is mostly done and the build.cmd/sh script
should be used, going forward.

4 years agoFix x86 build break and reflect PR feedback
Jan Vorlicek [Mon, 6 Apr 2020 13:13:27 +0000 (15:13 +0200)]
Fix x86 build break and reflect PR feedback

4 years agoEnable restore for ref and src projects in libs (#33553)
Viktor Hofer [Mon, 6 Apr 2020 09:54:10 +0000 (11:54 +0200)]
Enable restore for ref and src projects in libs (#33553)

- Use RestoreUseStaticGraphEvaluation which improves no-op restore by 10-15x down to 10-20 seconds.
- .builds msbuild files renamed to .proj as RestoreUseStaticGraphEvaluation throws for non .proj files without an env var set.
- Introducing subsets for libraries and mono and replacing -buildtests switch which was only working for libraries in favor of the subset switch -subset tests which works consistently.
- Fixing the Microsoft.DotNet.CodeAnalysis analyzer which wasn't running and adding missing exclusions.
- Separating restore and build phases in different parts in the repo (ie for installer.tasks) as generated props and targets need to be imported which requires a reevaluation in the build phase.
- Fix eng/docker/build-docker-sdk.ps1 by using the official build entrypoints (cc @alnikola)
- Remove a few depprojs in favor of project restore (faster restore :))
- Fix root code coverage measurement not working correctly
- Traversal support instead of dir.traversal.targets or manual build target defines.
- Introduce a root Build.proj entrypoint which is responsible for building and restoring the repository. This is necessary to enable the new NuGet fast restore which works best and fastest with a single entrypoint.
- Avoid binclashes in libraries and between libraries and installer (netstandard.depproj vs netstandard.csproj)
- Upgrading the SDK to 5.0 latest
- Code cleanup

4 years agoFix incorrect assumption around the presence of ICF frames in EH codebase for 64...
Fadi Hanna [Mon, 6 Apr 2020 03:04:38 +0000 (20:04 -0700)]
Fix incorrect assumption around the presence of ICF frames in EH codebase for 64-bit targets (#34526)

4 years agoSupport ECParameters that contain only D on Windows and Linux
Kevin Jones [Sun, 5 Apr 2020 19:11:43 +0000 (15:11 -0400)]
Support ECParameters that contain only D on Windows and Linux

If D (private key) is supplied but not the public key (Q), permit
this and allow the platform to re-calculate the public key from
the private key.

* Windows uses CNG blobs with the Q.X and Q.Y values set to (0,0).
* LInux uses the ECC math module to recompute Q from D and G.
* macOS is TBD.

4 years ago[llvm] Enable optimizations for LLVM 9 JIT. (#34555)
monojenkins [Sun, 5 Apr 2020 19:09:04 +0000 (15:09 -0400)]
[llvm] Enable optimizations for LLVM 9 JIT. (#34555)

Share more code between LLVM 6 and LLVM 9.

Mangler::getNameWithPrefix takes a Twine, not a std::string, so use a
StringRef to avoid an unnecessary allocation.

InstructionCombiningPass grew a dependency on
ProfileSummaryInfoWrapperPass in
https://github.com/dotnet/llvm-project/commit/09e539fcaebb6362795d352cdcf4a818cf4d0d6a,
which depends on the enclosing FunctionPassManager having a valid
reference to a module. This commit adds a dummy module to satisfy this,
instead of recreating a new FunctionPassManager on every compilation.
(See also
http://lists.llvm.org/pipermail/llvm-dev/2019-March/130690.html.)

Co-authored-by: imhameed <imhameed@users.noreply.github.com>
4 years agoFix memory leak in SuperPMI (#34523)
Bruce Forstall [Sun, 5 Apr 2020 17:10:46 +0000 (10:10 -0700)]
Fix memory leak in SuperPMI (#34523)

Introduced by change to Heap APIs. Also fixes a long-existing
memory leak on Linux.

Introduce a small, simple class to keep track of memory allocations
associated with the CompileResult that we need to free. In the replay
case, SuperPMI allocates these (such as for the JIT calling allocMem).
In the case of collection, the VM allocates memory for allocMem (and related),
so that memory doesn't need to be tracked.

4 years ago[WIP] LLVM changes (#33847)
monojenkins [Sun, 5 Apr 2020 14:20:58 +0000 (10:20 -0400)]
[WIP] LLVM changes (#33847)

<!--
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: vargaz <vargaz@users.noreply.github.com>
4 years agoRemove a few string allocations from System.IO.FileSystem (#34551)
Stephen Toub [Sun, 5 Apr 2020 11:41:49 +0000 (07:41 -0400)]
Remove a few string allocations from System.IO.FileSystem (#34551)

4 years agoFix host linker options to have -Bsymbolic (#34534)
Elinor Fung [Sun, 5 Apr 2020 08:34:03 +0000 (01:34 -0700)]
Fix host linker options to have -Bsymbolic (#34534)

* Fix host linker options to have -Bsymbolic

* Remove -Bsymbolic-functions

4 years agoAdds scripting guide doc (#34539)
Marcus Turewicz [Sun, 5 Apr 2020 03:13:17 +0000 (13:13 +1000)]
Adds scripting guide doc (#34539)

Scripting guide for Shell, PowerShell and CMD files for styling or other guidance.

Fixes #9317

4 years ago[debugger] Bump protocol for multi threaded single step implementation (#34531)
monojenkins [Sat, 4 Apr 2020 23:57:56 +0000 (19:57 -0400)]
[debugger] Bump protocol for  multi threaded single step implementation (#34531)

As suggested by @jbevain we should bump the protocol to implement multi threaded single step.

Co-authored-by: thaystg <thaystg@users.noreply.github.com>
4 years agoAdd test for max depth in exception message (#34528)
Thomas Levesque [Sat, 4 Apr 2020 21:50:31 +0000 (23:50 +0200)]
Add test for max depth in exception message (#34528)

Co-authored-by: Thomas Levesque <thomaslevesque@users.noreply.github.com>
4 years agoDisable test DnsGetHostEntry_LocalHost_ReturnsFqdnAndLoopbackIPs (#34527)
Karel Zikmund [Sat, 4 Apr 2020 21:17:51 +0000 (14:17 -0700)]
Disable test DnsGetHostEntry_LocalHost_ReturnsFqdnAndLoopbackIPs (#34527)

4 years agoMemory leak during marshal failure. (#34533)
Aaron Robinson [Sat, 4 Apr 2020 16:48:45 +0000 (09:48 -0700)]
Memory leak during marshal failure. (#34533)

Minor code cleanup to make the logic clearer.

4 years agoUpdate formatting (#34538)
Borislav Ivanov [Sat, 4 Apr 2020 16:28:45 +0000 (19:28 +0300)]
Update formatting (#34538)

4 years agoAdded links to issues in issues.targets. (#34530)
Nathan Ricci [Sat, 4 Apr 2020 16:28:03 +0000 (12:28 -0400)]
Added links to issues in issues.targets. (#34530)

4 years agoDefine dirent d_type for Solaris based OS (#34263)
Adeel Mujahid [Sat, 4 Apr 2020 16:27:01 +0000 (19:27 +0300)]
Define dirent d_type for Solaris based OS (#34263)

4 years agoFixup more package dependencies for Microsoft.Windows.Compatibility (#34479)
Matt Mitchell [Sat, 4 Apr 2020 14:19:06 +0000 (07:19 -0700)]
Fixup more package dependencies for Microsoft.Windows.Compatibility (#34479)

A few more dependencies on removed packages. System.Reflection.Emit*

4 years ago[wasm] Wasm TimeZoneInfo implementation VFS (#34186)
monojenkins [Sat, 4 Apr 2020 11:37:03 +0000 (07:37 -0400)]
[wasm] Wasm TimeZoneInfo implementation VFS (#34186)

Right now WebAssembly does not have an implementation for TimeZoneInfo and instead throws exceptions.

This is an alternate implementation of https://github.com/mono/mono/pull/17617 that loads the zone information into the webassembly virtual file system using a pre-loaded file package.

__BCL Changes__
TimeZoneInfo implementation for WebAssembly to read from WASM VFS `/zoneinfo`.
- Remove `TimeZoneInfo.WebAssembly.cs` file
- Remove source dependencies on `TimeZoneInfo.WebAssembly.cs`.
- Modify TimeZoneInfo for specific WASM functionality
   - Default root directory is `zoneinfo`
   -  Add icall `mono_timezone_get_local_name` for WASM in CreateLocal
- Add icall implementation
   - ves_icall_System_TimeZoneInfo_mono_timezone_get_local_name

__WASM Runtime Build__

- Add `-s FORCE_FILESYSTEM=1` to mono wasm runtime build
   - Required so that it includes support for loading pre preload packages
   * Message when generating the zoneinfo data.
   > Remember to build the main file with  -s FORCE_FILESYSTEM=1  so that it includes support for loading this file package
- Add targets to run time zone tests.
   - make run-tzd-sample
   - make run-tzd-interp-sample
   - make run-tzd-aot-sample
- Modify `runtime-tests.js` to load and parse the zoneinfo data manually to load into the VFS.

__WASM Driver - aka `driver.c`__

- Add implementations of the following:
   - mono_timezone_get_local_name

These will be called from the managed bcl module `TimeZoneInfo.cs` module.

__packager.exe__
- Add `-s FORCE_FILESYSTEM=1`
   - Required so that it includes support for loading pre preload packages
   * Message when generating the zoneinfo data.
   > Remember to build the main file with  -s FORCE_FILESYSTEM=1  so that it includes support for

__Zone Info data and support files__

- Three files for zoneinfo VFS support.
   - `mono-webassembly-zoneinfo-fs-smd.js.metadata` - This is the separate metadata output by emscripten file-packager.  Used to parse the zoneinfo data in non browser environments.  See `runtime-tests.js`
   - `mono-webassembly-zoneinfo-fs.js` - Output by emscripten file-packager that will be referenced by browser environments to load the zoneinfo data into the VFS at `/zoneinfo`
   - `zoneinfo.data` - The binary file output by emscripten file-packager.  The file contains the actual zoneinfo data loaded into the VFS and parsed by `TimeZoneInfo`.

The packages are generated automatically and the repo is temporarily at:  https://github.com/kjpou1/mono-webassembly-zoneinfo

There are some limitations to this method where the file packages generated by the emscripten [file_packager](https://emscripten.org/docs/porting/files/packaging_files.html#packaging-using-the-file-packager-tool) only runs within a web browser.

Special consideration is needed to load the VFS with the data outside of browser.  See modification for `runtime-tests.js` where the zoneinfo data is parsed manually and loaded into the VFS.  We may need to create our own file packager to handle some of the other cases.

Co-authored-by: kjpou1 <kjpou1@users.noreply.github.com>
4 years agoFix testhost publish condition and omptimize assets we publish in official builds...
Santiago Fernandez Madero [Sat, 4 Apr 2020 10:04:36 +0000 (03:04 -0700)]
Fix testhost publish condition and omptimize assets we publish in official builds (#34469)

* Fix testhost publish condition and omptimize assets we publish in official builds

* Publish ref/ folder in official builds as it is needed for the installer build

* Just validate all assets paths when IncludeOOB* is true

4 years ago[wasm][debugger] Improve array visualization (#34482)
monojenkins [Sat, 4 Apr 2020 08:08:12 +0000 (04:08 -0400)]
[wasm][debugger] Improve array visualization (#34482)

TODO: viz for multidim arrays

Co-authored-by: radical <radical@users.noreply.github.com>
4 years agoUpdate Dotnet host for testing and other runtime => runtime dependencies (#34516)
Eric Erhardt [Sat, 4 Apr 2020 02:26:04 +0000 (21:26 -0500)]
Update Dotnet host for testing and other runtime => runtime dependencies (#34516)

4 years agoMove DependencyModel to libraries (#34296)
Eric Erhardt [Sat, 4 Apr 2020 01:47:17 +0000 (20:47 -0500)]
Move DependencyModel to libraries (#34296)

* Move DependencyModel to libraries

Moving DependencyModel to the same folder and infrastructure as the rest of our libraries, and out of the installer folder.

I also dropped support for anything below netstandard2.0 at this time.

Contributes to #3470
Fix #3425

* Exclude DependencyModel in shims and package checks since it has a duplicated type with System.Collections.

* Harvest previous TFM assets from the previously shipped package.

This also means we start building DependencyModel for net461 to ensure full framework support works correctly, and doesn't pick up the old net451 asset.

* Fix unit tests to consistently pass on core and netfx.

* Add back HashCodeCombiner as obsolete.

* Fix DependencyModel pkg build to reference the correct version of Newtonsoft.Json for the harvested package assets.

* Adding IgnoredTypes for Serialization.Primitives in netcoreapp1.0 and netcoreapp1.1

Co-authored-by: Jose Perez Rodriguez <joperezr@microsoft.com>
4 years agoBitOperations arm64 intrinsic for LeadingZeroCount, TrailingZeroCount and Log2 (...
Kunal Pathak [Sat, 4 Apr 2020 00:26:57 +0000 (17:26 -0700)]
BitOperations arm64 intrinsic for LeadingZeroCount, TrailingZeroCount and Log2 (#34486)

ARM64 intrinsic for:
- LeadingZeroCount
- Log2
- TrailingZeroCount

4 years agoFix building WinRT tests on new Windows SDK (with new cppwinrt). (#34513)
Jeremy Koritzinsky [Sat, 4 Apr 2020 00:24:12 +0000 (17:24 -0700)]
Fix building WinRT tests on new Windows SDK (with new cppwinrt). (#34513)

4 years agoLittle refactoring based on PR feedback
Jan Vorlicek [Sat, 4 Apr 2020 00:22:30 +0000 (17:22 -0700)]
Little refactoring based on PR feedback

4 years agoMoving more Tfm specific properties to the targetFramework.props file (#34349)
Anirudh Agnihotry [Fri, 3 Apr 2020 23:09:55 +0000 (16:09 -0700)]
Moving more Tfm specific properties to the targetFramework.props file (#34349)

* follow up

* other occurences

* fixing compiler services failure

4 years agoHardware instruction set support for crossgen2 (#33274)
David Wrighton [Fri, 3 Apr 2020 23:02:12 +0000 (16:02 -0700)]
Hardware instruction set support for crossgen2 (#33274)

- Add support for the --instruction-set parameter as described in #226 .
NOTE: As the abi for Vector parameters is not yet stable, support for the --instruction-set parameter is only enabled if --inputbubble is also enabled. Parallel work to stabilize the abi is in progress, but is not complete.
ALSO NOTE: The names of the instruction sets are shared with mono, and don't follow the names in issue #226
- Add concept of baseline instruction set support to R2R file format
- Can be applied at a per method level or at the entire R2R file level
  - R2RDump support for dumping the extra data
- Refactor how support for hardware intrinsics beyond SSE2 support are handled in crossgen2
- Add feature to the JIT to detect which hardware features are actually used
  - Tell the JIT unconditionally that SSE42+Lzcnt+Popcnt+Pclmulqdq are supported
  - But if support beyond the --instruction-set specified baseline is used, notate the method with a per-method instruction set support fixup.
  - This enables usage of many intrinsics in corelib with greater efficiency than today
  - This enables usage of SSE42 and below intrinsics safely in non-CoreLib code. Use of higher level intrinsics in non CoreLib code will generate code which does not use the higher level intrinsic, and note that the method's code should not be used in the presence of hardware which does support greater CPU capabilities.
  - In the future a logical enhancement of this work would be to generate multiple bodies of code to handle these more complex cases.
  - In combination with the --instruction-set argument, if Avx2 is enabled, then the logic gracefully adds a dependency on Avx2 capability and Vector<T> becomes useable by crossgen'd code.

4 years agoAdd profiler tests to the runtime repo (#34411)
David Mason [Fri, 3 Apr 2020 22:10:18 +0000 (15:10 -0700)]
Add profiler tests to the runtime repo (#34411)

Ports GCBasic, ReJIT, and EventPipe tests as well as adds a test that verifies profilers can call MetaDataGetDispenser.

4 years agoEnable nullable reference types for mono's Corelib (#34400)
Stephen Toub [Fri, 3 Apr 2020 21:18:30 +0000 (17:18 -0400)]
Enable nullable reference types for mono's Corelib (#34400)

* Enable nullable reference types for mono's Corelib

Corelib had nullable reference types enabled, but all warnings were suppressed.  This fixes the thousands of warnings that were being hidden and fully enables nullable reference types for mono's corelib, as it is for coreclr's corelib.

I copied over the public API annotations from coreclr's corelib and tried to annotate the mono source as accurately as possible.  However, I'm 100% sure there are issues, both places I misexpressed the contract of an internal API and places where I suppresed warnings with `!` where it likely could actually null ref.  Along the way, when there was an obvious null ref where coreclr was doing a null check and providing different behavior, I fixed it or at least added a comment, but I expect there are more issues lurking.

* Fix iOS build for GetSpecialFolder

* Address PR feedback

4 years agoSocket.Windows: support ConnectAsync(SocketAsyncEventArgs) for UDP, and Unix sockets...
Tom Deseyn [Fri, 3 Apr 2020 18:42:52 +0000 (20:42 +0200)]
Socket.Windows: support ConnectAsync(SocketAsyncEventArgs) for UDP, and Unix sockets (#33674)

Socket.Windows: support ConnectAsync(SocketAsyncEventArgs) for non-stream protocols

4 years ago[CBOR] Add a CborReader.SkipValue() method (#34477)
Eirik Tsarpalis [Fri, 3 Apr 2020 18:28:19 +0000 (19:28 +0100)]
[CBOR] Add a CborReader.SkipValue() method (#34477)

* Add a CborReader.SkipValue() method

* revert reader state format error changes

* refactor skip from recursive to imperative

* use non-allocating skips for string data items

* add a test for extremely nested values

* remove blank line

* consolidate SkipString() methods

4 years agoDisable iOS_arm builds on official builds too (#34504)
Alexander Köplinger [Fri, 3 Apr 2020 18:24:35 +0000 (20:24 +0200)]
Disable iOS_arm builds on official builds too (#34504)

It started failing with the same issue as https://github.com/dotnet/runtime/issues/34465

4 years agoCrossgen2 fixes to enable composite build with shared framework (#34431)
Tomáš Rylek [Fri, 3 Apr 2020 17:48:08 +0000 (19:48 +0200)]
Crossgen2 fixes to enable composite build with shared framework (#34431)

These changes involve targeted fixes to issues seen due to the new
build mode and generic signature encoding fixes identified in
my offline investigation with JanV. While I locally see the tests
passing with just a handful of failures, I still seem unable to
make the tests run in the lab; I keep investigating that but
I believe it's useful to merge this delta in to let us parallelize
follow-up efforts.

Thanks

Tomas

4 years agoParallel Builds PRv2 (#34460)
Manish Godse [Fri, 3 Apr 2020 17:37:09 +0000 (10:37 -0700)]
Parallel Builds PRv2 (#34460)

* simplify libraries build dependencies.

* FIx depends for tests

* Fix artifact name for webAssembly

4 years agoAdd armel arch in help message (#34491)
Gleb Balykov [Fri, 3 Apr 2020 16:22:56 +0000 (19:22 +0300)]
Add armel arch in help message (#34491)

4 years agoDelete stale CPU cache size detection (#34488)
Jan Kotas [Fri, 3 Apr 2020 16:21:48 +0000 (09:21 -0700)]
Delete stale CPU cache size detection (#34488)

Fixes #34478

4 years agoPort CoreCLR's TypeNameBuilder to C#, and use it in Mono too (#33701)
Alexis Christoforides [Fri, 3 Apr 2020 14:28:23 +0000 (10:28 -0400)]
Port CoreCLR's TypeNameBuilder to C#, and use it in Mono too (#33701)

* Port CoreCLR's TypeNameBuilder to C#, and use it in Mono too

Mono's System.Reflection.Emit creates type names that fail to be normalized or shaped in all ways that CoreCLR does.

Port CoreCLR's mixed-mode thread-unsafe implementation to thread-safe C#, and start using it in Mono for names in TypeBuilder.

Fixes issues with e.g. null-delimited type names being passed to different Reflection.Emit builders. Contributes to https://github.com/dotnet/runtime/issues/2389.

4 years agoFix WriteLargeJsonToStreamWithoutFlushing test (#34489)
Layomi Akinrinade [Fri, 3 Apr 2020 13:27:27 +0000 (09:27 -0400)]
Fix WriteLargeJsonToStreamWithoutFlushing test (#34489)

4 years agoDon't build `System.Utf8String.Experimental.Tests.csproj` tests for mono (#34445)
Egor Bogatov [Fri, 3 Apr 2020 13:24:55 +0000 (16:24 +0300)]
Don't build `System.Utf8String.Experimental.Tests.csproj` tests for mono (#34445)

4 years agoFix subsetCategory is just one `-` not two `--` (#34498)
nietras [Fri, 3 Apr 2020 13:20:10 +0000 (15:20 +0200)]
Fix subsetCategory is just one `-` not two `--` (#34498)

Otherwise fails with:
```
MSBUILD : error MSB1001: Unknown switch.
Switch: --subsetCategory
```
on Windows

4 years ago[sgen] Implement api for allocating pinned arrays (#34398)
Vlad Brezae [Fri, 3 Apr 2020 12:49:06 +0000 (15:49 +0300)]
[sgen] Implement api for allocating pinned arrays (#34398)

* [sgen] Add support for allocating pinned array

These objects will end up allocated either in LOS (which is by design not moved around) or into special major blocks where compaction doesn't take place.

* [sgen] Be consistent with coreclr on GC api

* Enable GC tests for pinned array allocation

* Skip large array allocation test on mono

4 years ago[mono][sre] Add an expected attribute on underlying fields of enum classes (#34212)
Alexis Christoforides [Fri, 3 Apr 2020 12:48:12 +0000 (08:48 -0400)]
[mono][sre] Add an expected attribute on underlying fields of enum classes (#34212)

Follow CoreCLR's example and add the RTSpecialName type attribute to any class field with the 'value__' name when , used as the value store for enumeration class instances.

Second part of the "RTSpecialName fix" that started with https://github.com/dotnet/runtime/pull/33389 - before, our behavior was to add the RTSpecialName immediately, as soon as the EnumBuilder was constructed.
Contributes to https://github.com/dotnet/runtime/issues/2389

4 years agoFix two issues detected by Valgrind (#34462)
Jan Vorlicek [Fri, 3 Apr 2020 11:39:35 +0000 (13:39 +0200)]
Fix two issues detected by Valgrind (#34462)

* Fix two issues detected by Valgrind

When I have used Valgrind to investigate a memory corruption issue recently,
I've noticed that it has also reported two cases when a conditional jump
was using an uninitialized variable as one of the inputs to the condition.

This change fixes these.

4 years agoFix Unix build break
Jan Vorlicek [Fri, 3 Apr 2020 08:56:03 +0000 (10:56 +0200)]
Fix Unix build break

4 years agoDisable iOS arm PR builds (#34467)
Alexander Köplinger [Fri, 3 Apr 2020 06:04:07 +0000 (08:04 +0200)]
Disable iOS arm PR builds (#34467)

* Disable iOS arm PR builds

Infrastructure issue: https://github.com/dotnet/runtime/issues/34465

* Add tracking issue and disable installer iOS arm build too

4 years agoRemove -runtime version suffix hack for M.E. (#34464)
Maryam Ariyan [Fri, 3 Apr 2020 01:51:21 +0000 (18:51 -0700)]
Remove -runtime version suffix hack for M.E. (#34464)

4 years agoArm64: Add xtn and xtn2 intrinsics codegen, api and tests. (#33108)
Tamar Christina [Fri, 3 Apr 2020 01:19:15 +0000 (02:19 +0100)]
Arm64: Add xtn and xtn2 intrinsics codegen, api and tests. (#33108)

4 years agoRemove @jeremykuhne from area owners (#34483)
Dan Moseley [Fri, 3 Apr 2020 01:11:08 +0000 (18:11 -0700)]
Remove @jeremykuhne from area owners (#34483)

cc @ericstj

4 years agoEnable warn as error for libraries (#34457)
Jared Parsons [Thu, 2 Apr 2020 22:59:51 +0000 (15:59 -0700)]
Enable warn as error for libraries (#34457)

This enables warn as error for the libraries jobs now that our builds
are warning free.

4 years agoMove the reverse pinvoke frame check to EECodeManager
Jan Vorlicek [Thu, 2 Apr 2020 20:45:07 +0000 (22:45 +0200)]
Move the reverse pinvoke frame check to EECodeManager

Reflects PR feedback.

4 years agoSync changes from ASP.NET Core dynamic HPack (#34247)
James Newton-King [Thu, 2 Apr 2020 20:21:24 +0000 (09:21 +1300)]
Sync changes from ASP.NET Core dynamic HPack (#34247)

4 years agoExperimental pgo tool (#34433)
David Wrighton [Thu, 2 Apr 2020 18:35:24 +0000 (11:35 -0700)]
Experimental pgo tool (#34433)

* Experimental pgo tool
- Experiment and rough design going forward for providing profile data to the compiler

* Update build so dotnet-pgo is built

4 years agoAdd build configuration to generate runtime packs for iOS (#34050)
Steve Pfister [Thu, 2 Apr 2020 17:42:08 +0000 (13:42 -0400)]
Add build configuration to generate runtime packs for iOS (#34050)

This adds support for generating Microsoft.NETCore.App.Runtime packs for ios-x64, ios-arm, and ios-arm64.

4 years ago[meta] Add mono_type_get_name_full to public API (#34436)
Ryan Lucia [Thu, 2 Apr 2020 16:45:42 +0000 (12:45 -0400)]
[meta] Add mono_type_get_name_full to public API (#34436)

This is needed by Xamarin.Android to be able to round-trip with names fetched via reflection, as the only public API for this (mono_type_get_name) uses the IL format instead.