platform/upstream/dotnet/runtime.git
3 years ago[master] Update dependencies from dotnet/runtime-assets dotnet/icu (#48698)
dotnet-maestro[bot] [Thu, 25 Feb 2021 10:19:11 +0000 (10:19 +0000)]
[master] Update dependencies from dotnet/runtime-assets dotnet/icu (#48698)

[master] Update dependencies from dotnet/runtime-assets dotnet/icu

3 years agoTweak package build for dotnet-pgo so that it builds in our official builds (#48724)
David Wrighton [Thu, 25 Feb 2021 00:07:47 +0000 (16:07 -0800)]
Tweak package build for dotnet-pgo so that it builds in our official builds (#48724)

3 years agoPreserve the System.RuntimeType constructor in mono ILLink (#48710)
Tanner Gooding [Thu, 25 Feb 2021 00:05:36 +0000 (16:05 -0800)]
Preserve the System.RuntimeType constructor in mono ILLink (#48710)

* Preserve the System.RuntimeType constructor in mono ILLink

* Update src/mono/System.Private.CoreLib/src/ILLink/ILLink.Descriptors.xml

* Update src/mono/System.Private.CoreLib/src/ILLink/ILLink.Descriptors.xml

Co-authored-by: Larry Ewing <lewing@microsoft.com>
Co-authored-by: Larry Ewing <lewing@microsoft.com>
3 years agoMake Exception.StackTrace resilient to missing attribute assemblies (#48535)
Jan Vorlicek [Wed, 24 Feb 2021 21:33:09 +0000 (13:33 -0800)]
Make Exception.StackTrace resilient to missing attribute assemblies (#48535)

A customer has reported a problem when they could not get stack trace
from an exception that they needed to log, because one of the methods on
the stack or its defining type had an attribute from an assembly that
was missing.
This change fixes that by ignoring exceptions in attempts to get
StackTraceHiddenAttribute, preferring to err on the side of getting a
stack frame that was marked as hidden in the stack trace rather than
not getting any stack trace at all.

3 years agoReplace non-generic WeakReference usage in several libraries (#48618)
Stephen Toub [Wed, 24 Feb 2021 21:03:07 +0000 (16:03 -0500)]
Replace non-generic WeakReference usage in several libraries (#48618)

* Replace non-generic WeakReference usage in System.Private.Runtime.InteropServices.JavaScript

* Replace non-generic WeakReference usage in System.Private.Xml

* Replace non-generic WeakReference usage in System.Diagnostics.TraceSource

* Address PR feedback

3 years agoEnhance coreclr processing of event pipe configuration to be able to write the pid...
David Wrighton [Wed, 24 Feb 2021 20:43:51 +0000 (12:43 -0800)]
Enhance coreclr processing of event pipe configuration to be able to write the pid of the current process into the nettrace file (#48537)

- Also fix the behavior of get_next_config_value_as_utf8_string to work correctly on coreclr, it was type-punning between a buffer returned by ep_rt_byte_array_alloc and ep_rt_utf8_string_free, which isn't safe in the coreclr implementation

3 years agoFixup richnav triggers (#48714)
Santiago Fernandez Madero [Wed, 24 Feb 2021 19:58:23 +0000 (11:58 -0800)]
Fixup richnav triggers (#48714)

3 years agoTurn off LKG calculation (#48708)
Drew Scoggins [Wed, 24 Feb 2021 18:24:11 +0000 (10:24 -0800)]
Turn off LKG calculation (#48708)

3 years agoR2RTest cleanup for Serp compile (#48528)
Simon Nattress [Wed, 24 Feb 2021 18:11:30 +0000 (10:11 -0800)]
R2RTest cleanup for Serp compile (#48528)

* Simplify compilation logic now a single mega composite image is functional
* Remove composite scenario switch and support just composite or individual assemblies
* Use the same list of allowed Dlls in the serp/bin directory that Serp deployment uses

3 years agoFix warning for Rfc2898OneShotTests.cs (#48688)
Juan Hoyos [Wed, 24 Feb 2021 18:11:13 +0000 (10:11 -0800)]
Fix warning for Rfc2898OneShotTests.cs (#48688)

3 years agoSpill 'RET_EXPR' in fat call arguments. (#48690)
Sergey Andreenko [Wed, 24 Feb 2021 18:00:26 +0000 (10:00 -0800)]
Spill 'RET_EXPR' in fat call arguments. (#48690)

3 years agoHot reload for xplat change broke DAC (#48672)
Mike McLaughlin [Wed, 24 Feb 2021 17:12:38 +0000 (09:12 -0800)]
Hot reload for xplat change broke DAC (#48672)

On Linux/MacOS only enabled ENC for the debug/ee and vm directories and that
through some the EE's data structure's vtables between the runtime and DAC.

3 years agoUpdating snaps (#48668)
Rahul Bhandari [Wed, 24 Feb 2021 16:37:54 +0000 (08:37 -0800)]
Updating snaps (#48668)

3 years ago[browser][crypto] Fix Quota Exceeded error (#48692)
Kenneth Pouncey [Wed, 24 Feb 2021 16:21:33 +0000 (17:21 +0100)]
[browser][crypto] Fix Quota Exceeded error (#48692)

* Add batched implementation to fix error with quota exceeded limit

* Add and/or update tests for exceeding the quota limit of browser set at 65536.

* Update to test quota exceeded

* Code to use views and write directly to heap

3 years agoEnable async-over-sync Task in Dns to be canceled (#48684)
Stephen Toub [Wed, 24 Feb 2021 14:54:17 +0000 (09:54 -0500)]
Enable async-over-sync Task in Dns to be canceled (#48684)

While we can't currently cancel the synchronous call, we can at least cancel the Task prior to its being executed.

3 years agoUpdate dependencies from https://github.com/dotnet/xharness build 20210224.1 (#48693)
dotnet-maestro[bot] [Wed, 24 Feb 2021 12:04:09 +0000 (12:04 +0000)]
Update dependencies from https://github.com/dotnet/xharness build 20210224.1 (#48693)

[master] Update dependencies from dotnet/xharness

3 years agoFix MailAddress.TryCreate behavior (#47574)
hrrrrustic [Wed, 24 Feb 2021 11:10:36 +0000 (14:10 +0300)]
Fix MailAddress.TryCreate behavior (#47574)

* change tests

* fix TryParse behavior

* fix spacing

* review improvements, change tests

* update throwing exception

* Update src/libraries/System.Net.Mail/tests/Unit/MailAddressTests/MailAddressParsingTest.cs

* Update src/libraries/System.Net.Mail/tests/Functional/MailAddressTest.cs

Co-authored-by: Marie Píchová <11718369+ManickaP@users.noreply.github.com>
3 years agoIntroduce FileStreamStrategy as a first step of FileStream rewrite (#47128)
Adam Sitnik [Wed, 24 Feb 2021 07:28:12 +0000 (08:28 +0100)]
Introduce FileStreamStrategy as a first step of FileStream rewrite (#47128)

Co-authored-by: Stephen Toub <stoub@microsoft.com>
Co-authored-by: David Cantú <dacantu@microsoft.com>
3 years agoForward Span-based MemoryExtensions overloads to ReadOnlySpan overloads (#48669)
Stephen Toub [Wed, 24 Feb 2021 04:03:34 +0000 (23:03 -0500)]
Forward Span-based MemoryExtensions overloads to ReadOnlySpan overloads (#48669)

3 years agoImport iOS from MacCatalyst in libraries OSGroups.json (#48652)
Alexander Köplinger [Wed, 24 Feb 2021 02:38:43 +0000 (03:38 +0100)]
Import iOS from MacCatalyst in libraries OSGroups.json (#48652)

This allows us to reuse the existing iOS build configs since we don't have MacCatalyst-specific logic yet.

3 years agoSupport SPMI collection of tiered compilation runs, fix utf8 issues (#48665)
Andy Ayers [Wed, 24 Feb 2021 01:47:22 +0000 (17:47 -0800)]
Support SPMI collection of tiered compilation runs, fix utf8 issues (#48665)

Add new flag `--tiered_compilation` to enable collection of runs with tiered
compilation enabled (by not setting `COMPlus_TieredCompilation=0`).

Note `COMPlus_TieredCompilation` has no impact on prejitting or on replay.

Also be more tolerant of utf-8 encoding issues, in case we see asserts in
methods or classes with funny names.

3 years agoThreadpool autorelease (#47592)
Jeremy Koritzinsky [Wed, 24 Feb 2021 01:19:16 +0000 (17:19 -0800)]
Threadpool autorelease (#47592)

3 years agoFix indent (#48676)
Drew Scoggins [Wed, 24 Feb 2021 01:05:35 +0000 (17:05 -0800)]
Fix indent (#48676)

* Fix yml indenting

* Fix one other indent issue

* Fix comment error

3 years agoAdd arm64 mono (#48671)
Drew Scoggins [Wed, 24 Feb 2021 00:53:06 +0000 (16:53 -0800)]
Add arm64 mono (#48671)

* Add Mono interpreter ARM64 perf jobs

* WIP

* Add nightly Arm64 interpreter runs

* Remove test category

3 years agoAdd progressbar to SuperPMI.py script (#48649)
Egor Bogatov [Tue, 23 Feb 2021 20:47:32 +0000 (23:47 +0300)]
Add progressbar to SuperPMI.py script (#48649)

3 years agoUpdate workflow doc to include a rough disk size minimum requirement (#48657)
Juan Hoyos [Tue, 23 Feb 2021 19:10:26 +0000 (11:10 -0800)]
Update workflow doc to include a rough disk size minimum requirement (#48657)

* Update workflow doc to include a rough disk size minimum requirement

3 years agoRevert "Fix installer build on Alpine (#48505)" (#48651)
Viktor Hofer [Tue, 23 Feb 2021 19:06:22 +0000 (20:06 +0100)]
Revert "Fix installer build on Alpine (#48505)" (#48651)

This reverts commit c9fe433ebb3e5a489083fda8582861926596a41e.

3 years agoThrow an ObjectDisposedException instead of InvalidOperationException after Process...
Roman Marusyk [Tue, 23 Feb 2021 18:42:57 +0000 (20:42 +0200)]
Throw an ObjectDisposedException instead of InvalidOperationException after Process object has been disposed (#46593)

fixes #45149

3 years agoMake it clear the subset flag can be omitted (#47691)
SingleAccretion [Tue, 23 Feb 2021 17:25:02 +0000 (20:25 +0300)]
Make it clear the subset flag can be omitted (#47691)

* Make it clear the subset flag can be omitted

* Just mention that the subset flag can be implicit

3 years agoUpdate dependencies from https://github.com/dotnet/icu build 20210222.1 (#48644)
dotnet-maestro[bot] [Tue, 23 Feb 2021 17:01:03 +0000 (17:01 +0000)]
Update dependencies from https://github.com/dotnet/icu build 20210222.1 (#48644)

[master] Update dependencies from dotnet/icu

3 years agoEnable char.Is{High}Surrogate(string, int) to be trimmed in default Blazor wasm app...
Stephen Toub [Tue, 23 Feb 2021 16:31:17 +0000 (11:31 -0500)]
Enable char.Is{High}Surrogate(string, int) to be trimmed in default Blazor wasm app (#48621)

And simpler/faster code.

3 years agoCompile native AppleCryptoNative_SecCopyErrorMessageString for ios/tvos
Marek Safar [Tue, 23 Feb 2021 15:22:27 +0000 (16:22 +0100)]
Compile native AppleCryptoNative_SecCopyErrorMessageString for ios/tvos

It's referenced from a lot of managed placed

3 years agoFix C# warning in Comparer_get_Default (#48643)
Egor Bogatov [Tue, 23 Feb 2021 15:11:24 +0000 (18:11 +0300)]
Fix C# warning in Comparer_get_Default (#48643)

3 years agoimplement test for Long Paths support in ProcessModule.FileName (#46685)
Adam Sitnik [Tue, 23 Feb 2021 14:40:59 +0000 (15:40 +0100)]
implement test for Long Paths support in ProcessModule.FileName (#46685)

3 years agoAdd a Mono ARM64 runtime pack & test build (#48532)
Jo Shields [Tue, 23 Feb 2021 14:29:59 +0000 (09:29 -0500)]
Add a Mono ARM64 runtime pack & test build (#48532)

3 years agoissue-44801 EnsureCapacity Apis For List Stack Queue (#47149)
LateApexEarlySpeed [Tue, 23 Feb 2021 14:03:35 +0000 (22:03 +0800)]
issue-44801 EnsureCapacity Apis For List Stack Queue (#47149)

* issue-44801 Initial commit: public List.EnsureCapacity.

* Create Stack.EnsureCapacity().

* issue-44801 Fix comment for Stack.

* issue-44801 Fix comment: Move temp MaxArrayLength into near usage scope for Stack.

* issue-44801 Fix comment for List.

* issue-44801 Create EnsureCapacity for Queue.

* issue-44801 Create tests for List.EnsureCapacity.

* issue-44801 Create tests for Stack.EnsureCapacity.

* issue-44801 Create tests for Queue.EnsureCapacity.

* issue-44801 Update version if updating internal buffer.

* issue-44801 Update test cases to verify invalidating enumeration (List, Stack, Queue).

* issue-44801 Improve code change for List:

1. Avoid incrementing version number twice in one Insert (or Add) method call;
2. Avoid more capacity check for Insert (or Add) method.

* issue-44801 Fix comments: consider integer overflow; refactor methods.

* Update src/libraries/System.Private.CoreLib/src/System/Collections/Generic/List.cs

Fix comment: update xml doc.

Co-authored-by: Eirik Tsarpalis <eirik.tsarpalis@gmail.com>
* ensure same algorithm is used for all resize operations

* revert array length check in List.EnsureCapacityCore

* remove GrowFactor constant

* skip large capacity tests on mono.

* Fix overflow handling when capacity < MaxArrayLength; add clarifying comments

Co-authored-by: Eirik Tsarpalis <eirik.tsarpalis@gmail.com>
3 years ago[master] Update dependencies from dotnet/runtime dotnet/xharness (#48585)
dotnet-maestro[bot] [Tue, 23 Feb 2021 13:38:32 +0000 (13:38 +0000)]
[master] Update dependencies from dotnet/runtime dotnet/xharness (#48585)

[master] Update dependencies from dotnet/runtime dotnet/xharness

 - Merge branch 'master' into darc-master-d9d4c102-0da3-4e51-b50a-daa5955aadce

3 years agoFix ArgIterator::GetNextOffset for macOS arm64 (#48632)
Jan Vorlicek [Tue, 23 Feb 2021 11:31:00 +0000 (03:31 -0800)]
Fix ArgIterator::GetNextOffset for macOS arm64 (#48632)

* Fix ArgIterator::GetNextOffset for macOS arm64

The ArgIterator::GetNextOffset method was not aligning offsets it returns
for reference types and some others. That was causing coreclr test failures
with GCStress mode 3.

This change fixes it by properly aligning the returned offsets.

* Fix indentation

3 years agoFix installer build on Alpine (#48505)
Adeel Mujahid [Tue, 23 Feb 2021 09:00:28 +0000 (11:00 +0200)]
Fix installer build on Alpine (#48505)

* Fix installer build on Alpine

* Update src/tests/build.sh

Co-authored-by: Viktor Hofer <viktor.hofer@microsoft.com>
Co-authored-by: Viktor Hofer <viktor.hofer@microsoft.com>
3 years agoBuild unsupported version of System.Security.Cryptography.OpenSsl for mobile targets...
Marek Safar [Tue, 23 Feb 2021 08:09:59 +0000 (09:09 +0100)]
Build unsupported version of System.Security.Cryptography.OpenSsl for mobile targets (#48595)

Co-authored-by: Adeel Mujahid <3840695+am11@users.noreply.github.com>
Co-authored-by: Jeremy Barton <jbarton@microsoft.com>
3 years agoCA1200 -> Info (#48612)
Carlos Sanchez [Tue, 23 Feb 2021 03:29:54 +0000 (19:29 -0800)]
CA1200 -> Info (#48612)

Co-authored-by: carlossanlop <carlossanlop@users.noreply.github.com>
3 years agoRemove 'domain' arguments from the reflection object creation functions. (#48586)
Zoltan Varga [Tue, 23 Feb 2021 03:19:51 +0000 (22:19 -0500)]
Remove 'domain' arguments from the reflection object creation functions. (#48586)

* Remove 'domain' arguments from the reflection object creation functions.

* Remove some more domain usage.

3 years agofix an old test (#48627)
Sergey Andreenko [Tue, 23 Feb 2021 03:13:49 +0000 (19:13 -0800)]
fix an old test (#48627)

3 years agoRefactor code that considers guarded devirtualization (#48611)
Andy Ayers [Tue, 23 Feb 2021 02:47:17 +0000 (18:47 -0800)]
Refactor code that considers guarded devirtualization (#48611)

Merge two similar hunks of code.

Also, unblock guarded devirtualization when prejitting, as we may see class
guesses via static PGO.

3 years agoSpecial-case Enumerable.SequenceEqual for byte[] (#48287)
Stephen Toub [Tue, 23 Feb 2021 01:43:50 +0000 (20:43 -0500)]
Special-case Enumerable.SequenceEqual for byte[] (#48287)

3 years agoAdd ActivitySource.CreateActivity methods (#48374)
Tarek Mahmoud Sayed [Tue, 23 Feb 2021 00:49:17 +0000 (16:49 -0800)]
Add ActivitySource.CreateActivity methods (#48374)

* Add ActivitySource.CreateActivity methods

* Address the feedback

* Add IdFormat parameter to ActivitySource.Create and fix the whole IdFormat logic

* Address @noahfalk feedback

3 years agoSet nuspec packaging properties correctly (#48625)
Viktor Hofer [Tue, 23 Feb 2021 00:37:40 +0000 (01:37 +0100)]
Set nuspec packaging properties correctly (#48625)

Define PackageProjectUrl which is the public facing property to specify
a project url in a nuspec. Arcade defaults PackageProjectUrl to
RepositoryUrl if it isn't set. RepositoryUrl was incorrectly set to
git://github.com/dotnet/runtime instead of
https://github.com/dotnet/runtime which cause PackageProjectUrl to use
that incorrect value as well which ultimately results in nuget.org
failing package validation and refusing to add the package.

Also changing ProjectUrl to the previous https://dot.net value which is
the expected url to the dotnet project. In addition to that, specifying
Owners which aren't set anymore in 6.0.

Adding the ProjectUrl property as well as the
Microsoft.DotNet.Build.Tasks.Packaging package depends on it. That line
can be removed after the fix to not override its value unconditionally
is merged and consumed.

3 years agoRemove unnecessary msbuild-sdk from global.json (#48599)
Eric Erhardt [Mon, 22 Feb 2021 23:20:30 +0000 (17:20 -0600)]
Remove unnecessary msbuild-sdk from global.json (#48599)

* Remove unnecessary msbuild-sdk from global.json

This line was meant to delineate between sdks that were auto-updated by different PRs. But we have since switched to no longer auto-update these SDKs, so there is no reason for this line anymore.

* Reorder so hard-coded entries are in the middle.

3 years agoUse SHA256 one-shot for CrlCache
Kevin Jones [Mon, 22 Feb 2021 20:54:33 +0000 (15:54 -0500)]
Use SHA256 one-shot for CrlCache

Co-authored-by: Jeremy Barton <jbarton@microsoft.com>
3 years agoAdd static PBKDF2 one-shot methods
Kevin Jones [Mon, 22 Feb 2021 20:53:59 +0000 (15:53 -0500)]
Add static PBKDF2 one-shot methods

This avoids the disposable object creation for Rfc2989DeriveBytes and the
state tracking.

Since the one-shots just call into platform routines (when available) it
should allow for higher iteration counts for the same clock time.

3 years agoEmptyAiaResponseIsIgnored should use incomplete chain.
Kevin Jones [Mon, 22 Feb 2021 20:51:47 +0000 (15:51 -0500)]
EmptyAiaResponseIsIgnored should use incomplete chain.

Since the certificate names were the same, different tests were
colliding with caches since they had the same certificate name.

In addition to the simple fix, this changes the test to build a partial
chain using two intermediates. The leaf's issuing intermediate is
added to the ExtraStore and the second intermediate is expected
to be fetched by AIA (and fail with an empty response).

This is to help coerce chain builders treat it as a partial chain,
and can actually make some progress, as opposed to the leaf being
treated as an invalid root.

3 years agoMake sure pal_icushim_static.c is linked in even if no symbols are used from it,...
Zoltan Varga [Mon, 22 Feb 2021 20:35:17 +0000 (15:35 -0500)]
Make sure pal_icushim_static.c is linked in even if no symbols are used from it, so the EMSCRIPTEN_KEEPALIVE functions in it are actually kept. (#48550)

3 years agoSupport PolynomialMultiplyWideningLower and PolynomialMultiplyWideningUpper (#48525)
Fan Yang [Mon, 22 Feb 2021 20:01:10 +0000 (15:01 -0500)]
Support PolynomialMultiplyWideningLower and PolynomialMultiplyWideningUpper (#48525)

3 years agoMinor msbuild code cleanup in installer partition (#48603)
Viktor Hofer [Mon, 22 Feb 2021 19:38:21 +0000 (20:38 +0100)]
Minor msbuild code cleanup in installer partition (#48603)

* Minor code clean-up in installer partition

* Move prepare-artifacts.proj into installer root

3 years agoPackage dotnet-pgo as a dotnet tool (#48542)
David Wrighton [Mon, 22 Feb 2021 19:30:05 +0000 (11:30 -0800)]
Package dotnet-pgo as a dotnet tool (#48542)

- The package is marked as non-shipping as we're not ready to make it part of the official product at this time, but this should make it easier to consume in downstream repos.

3 years agoTransition JIT memory management from domains to memory managers (#48483)
Zoltan Varga [Mon, 22 Feb 2021 19:02:32 +0000 (14:02 -0500)]
Transition JIT memory management from domains to memory managers (#48483)

* [jit] Add a MonoJitMemoryManager structure, which is the same as the MonoJitDomainInfo structure, but owned by a MonoMemoryManager instead of a domain.

* Move static_rgctx_trampoline_hash to MonoJitMemoryManager.

* Move jump_target_hash to MonoJitMemoryManager.

* Move jump_trampoline_hash to MonoJitMemoryManager.

* Move jit_trampoline_hash to MonoJitMemoryManager.

* Move delegate_trampoline_hash to MonoJitMemoryManager.

* Move method_code_hash to MonoJitMemoryManager.

* Move more fields to MonoJitMemoryManager.

* Move llvm data to MonoJitMemoryManager.

* Move arch_seq_points field to MonoJitMemoryManager.

* Remove unused fields from MonoJitDomainInfo.

* Use the default alc memory manager only for now.

* Remove MonoJitDomainInfo which is now unused.

3 years agoRead basic properties of a X509 certificate using Android-built-in Crypto APIs (...
Elinor Fung [Mon, 22 Feb 2021 18:50:45 +0000 (10:50 -0800)]
Read basic properties of a X509 certificate using Android-built-in Crypto APIs (#48425)

3 years agoRemove hardcoded PackageVersion in Platforms pkg (#48596)
Viktor Hofer [Mon, 22 Feb 2021 18:05:55 +0000 (19:05 +0100)]
Remove hardcoded PackageVersion in Platforms pkg (#48596)

Mapping the package to `$(ProductVersion)` would be wrong in servicing cases. Hence just removing the hardcoded value entirely.

3 years agoFix ThreadPool events validation test (#48588)
Sung Yoon Whang [Mon, 22 Feb 2021 17:28:45 +0000 (09:28 -0800)]
Fix ThreadPool events validation test (#48588)

* Fix ThreadPool events validation test

* space

3 years agoRemove unaligned offsets for mapped layout (#42464)
Sven Boemer [Mon, 22 Feb 2021 17:22:39 +0000 (09:22 -0800)]
Remove unaligned offsets for mapped layout (#42464)

* Remove unaligned offsets for mapped layout

* Assert on windows only

- Unix will use the mapped layout with an offset for bundled assemblies
- Windows still should't create a mapped layout for bundles

3 years ago[master] Update dependencies from mono/linker (#48597)
dotnet-maestro[bot] [Mon, 22 Feb 2021 17:12:32 +0000 (18:12 +0100)]
[master] Update dependencies from mono/linker (#48597)

Microsoft.NET.ILLink.Tasks
 From Version 6.0.100-preview.2.21118.4 -> To Version 6.0.100-preview.2.21122.1

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
3 years agoDelete publish-final.proj and clean-up installer.tasks unused files (#48598)
Viktor Hofer [Mon, 22 Feb 2021 16:54:36 +0000 (17:54 +0100)]
Delete publish-final.proj and clean-up installer.tasks unused files (#48598)

* Delete publish-final.proj and delete unused installer.tasks files

* Avoid extra restore phase for tasks

The repo local tasks don't participate in the repo restore anymore,
hence avoiding the extra restore phase which should improve reliability
and build times.

3 years agoDelete updateversions.proj (#48593)
Viktor Hofer [Mon, 22 Feb 2021 15:53:49 +0000 (16:53 +0100)]
Delete updateversions.proj (#48593)

dead code

3 years agoFix doc comment typo in JsonSerializerOptions.cs (#48590)
Eric Mutta [Mon, 22 Feb 2021 13:54:03 +0000 (16:54 +0300)]
Fix doc comment typo in JsonSerializerOptions.cs (#48590)

The following sentence in the doc comments for the `IgnoreReadOnlyFields` member:

> A property is read-only if it isn't marked with the <c>readonly</c> keyword.

Should read:

> A field is read-only if it is marked with the <c>readonly</c> keyword.

3 years agoFix another doc comment typo in JsonSerializerOptions.cs (#48591)
Eric Mutta [Mon, 22 Feb 2021 13:52:10 +0000 (16:52 +0300)]
Fix another doc comment typo in JsonSerializerOptions.cs (#48591)

* Fix another doc comment typo in JsonSerializerOptions.cs

The following sentence in the doc comments for the `IncludeFields` member:

> Determines whether fields are handled serialization and deserialization.

Should read:

> Determines whether fields are handled **during** serialization and deserialization.

* Update src/libraries/System.Text.Json/src/System/Text/Json/Serialization/JsonSerializerOptions.cs

Co-authored-by: Eirik Tsarpalis <eirik.tsarpalis@gmail.com>
3 years agoAdd LINQ APIs for Index and Range (#28776) (#48559)
Dixin [Mon, 22 Feb 2021 13:43:14 +0000 (05:43 -0800)]
Add LINQ APIs for Index and Range (#28776) (#48559)

* Implement dotnet/runtime#28776: Implement LINQ APIs for index and range.

* Implement dotnet#28776: Implement LINQ APIs for index and range.

* Implement dotnet#28776: LINQ APIs for index and range.

* Implement dotnet#28776: LINQ APIs for index and range.

* Implement dotnet#28776: LINQ APIs for index and range.

* Implement dotnet#28776: LINQ APIs for index and range.

* Implement dotnet/runtime#28776: LINQ APIs for index and range.

* Implement dotnet/runtime#28776: LINQ APIs for index and range.

* Implement dotnet/runtime#28776: LINQ APIs for index and range.

* Implement dotnet/runtime#28776: LINQ APIs for index and range.

* Implement dotnet/runtime#28776: LINQ APIs for index and range.

* Implement dotnet/runtime#28776: LINQ APIs for index and range.

* Implement dotnet/runtime#28776: LINQ APIs for index and range.

* Implement dotnet/runtime#28776: LINQ APIs for index and range.

* Implement dotnet/runtime#28776: LINQ APIs for index and range.

* Implement dotnet/runtime#28776: LINQ APIs for index and range.

* Implement dotnet/runtime#28776: LINQ APIs for index and range.

* Implement dotnet/runtime#28776: LINQ APIs for index and range. Code review update.

* Implement dotnet/runtime#28776: LINQ APIs for index and range. Code review update.

* Implement dotnet/runtime#28776: LINQ APIs for index and range.

* Implement dotnet/runtime#28776: LINQ APIs for index and range. Code review update.

* Implement dotnet/runtime#28776: LINQ APIs for index and range.

* Implement dotnet/runtime#28776: LINQ APIs for index and range.

* Implement dotnet/runtime#28776: LINQ APIs for index and range.

* Implement dotnet/runtime#28776: LINQ APIs for index and range.

* Implement dotnet/runtime#28776: LINQ APIs for index and range.

* Implement dotnet/runtime#28776: LINQ APIs for index and range. Update ElementAt, keep the original behavior.

* Implement dotnet#28776: LINQ APIs for index and range. Update ElementAt, keep the original behavior.

* Implement dotnet/runtime#28776: LINQ APIs for index and range. Update ElementAt, keep the original behavior.

* Implement dotnet/runtime#28776: LINQ APIs for index and range. Add unit tests for ElementAt, ElementAtOrDefault.

* Implement dotnet/runtime#28776: LINQ APIs for index and range. Update unit tests.

* Implement dotnet/runtime#28776: LINQ APIs for index and range. Update unit tests.

* Implement dotnet/runtime#28776: LINQ APIs for index and range. Update unit tests.

* Implement dotnet/runtime#28776: LINQ APIs for index and range. Update for merge.

* Implement #28776: LINQ APIs for index and range. Update unit tests.

3 years ago[interp] Inline more AggressiveInlining methods (#48513)
Vlad Brezae [Mon, 22 Feb 2021 13:34:08 +0000 (15:34 +0200)]
[interp] Inline more AggressiveInlining methods (#48513)

* [interp] Inline more AggressiveInlining methods

By default, the interpreter stops inlining when encountering a call that it cannot inline or a throw. Inline the method anyway if the aggressive inlining attribute is present.

* [interp] Fix some long conditional branch opcodes

3 years agoDelete unused installer properties (#48569)
Viktor Hofer [Mon, 22 Feb 2021 11:49:14 +0000 (12:49 +0100)]
Delete unused installer properties (#48569)

* Delete unused msbuild properties, targets and files

3 years agoImprove S.DS.P tests, fix async API, and improve error messages (#47703)
Dan Moseley [Mon, 22 Feb 2021 01:25:21 +0000 (17:25 -0800)]
Improve S.DS.P tests, fix async API, and improve error messages (#47703)

3 years agoSimplify connection usability logic (#48446)
Geoff Kizer [Mon, 22 Feb 2021 00:17:48 +0000 (16:17 -0800)]
Simplify connection usability logic  (#48446)

* simplify connection usability logic

Co-authored-by: Geoffrey Kizer <geoffrek@windows.microsoft.com>
3 years agoJIT: remove JitGuardedDevirtualizationGuessBestClass (#48574)
Andy Ayers [Sun, 21 Feb 2021 23:32:34 +0000 (15:32 -0800)]
JIT: remove JitGuardedDevirtualizationGuessBestClass (#48574)

And slightly rearrange the two bits of code that consider guarded
devirualization with the goal of eventually unifying them.

Fixes #48564.

3 years agoAdd disabling test policy to the docs (#48575)
Anirudh Agnihotry [Sun, 21 Feb 2021 21:47:14 +0000 (13:47 -0800)]
Add disabling test policy to the docs (#48575)

* add disabling test policy

* Update docs/infra/buildtriage.md

Co-authored-by: Dan Moseley <danmose@microsoft.com>
3 years agoFix #28035 Refactor DLL imports interop classes (#48556)
Badre BSAILA [Sun, 21 Feb 2021 21:45:59 +0000 (22:45 +0100)]
Fix #28035 Refactor DLL imports interop classes (#48556)

* refactor interop classes

* move interop files to subdirectory

3 years agoEnable CG2 determinism tests on all architectures (#48526)
Tomáš Rylek [Sun, 21 Feb 2021 21:05:37 +0000 (22:05 +0100)]
Enable CG2 determinism tests on all architectures (#48526)

I have noticed that these two tests are still conditionally
executed on x64 only. I don't see why they shouldn't work on
other architectures.

Thanks

Tomas

3 years agoupdate branding to preview3 (#48530)
Anirudh Agnihotry [Sun, 21 Feb 2021 19:00:48 +0000 (11:00 -0800)]
update branding to preview3 (#48530)

3 years agoReuse SDK target for latest commit hash (#48561)
Adeel Mujahid [Sun, 21 Feb 2021 12:06:16 +0000 (14:06 +0200)]
Reuse SDK target for latest commit hash (#48561)

* Reuse SDK target for latest commit hash

Co-authored-by: Viktor Hofer <viktor.hofer@microsoft.com>
* Further clean-up corehost.proj

Co-authored-by: Viktor Hofer <viktor.hofer@microsoft.com>
3 years agoAdd assembly name to SuperPMI collection (#48534)
Bruce Forstall [Sat, 20 Feb 2021 21:56:50 +0000 (11:56 -1000)]
Add assembly name to SuperPMI collection (#48534)

* Add assembly name to SuperPMI collection

For each class, add JIT/EE calls to getAssemblyName so the SuperPMI
collections contain this information. This can be useful to try and track
down where a particular function in a large method context hive came
from.

Only do this when `COMPlus_EnableExtraSuperPmiQueries=1` is set.

* Formatting

3 years agoEnable Hot Reload API on Linux (#48497)
Mike McLaughlin [Sat, 20 Feb 2021 21:51:39 +0000 (13:51 -0800)]
Enable Hot Reload API on Linux (#48497)

Enable Hot Reload API on Linux

Only define EnC_SUPPORTED for vm/ee on xplat. Doesn't enable the ENC ICorDebug API.

Enable hotreload api tests on Linux/MacOS. API not implemented on arm/arm64

Remove all the ENC_DELTA_HACK code. Remove more ENC_DELTA_HACK code from ilasm

3 years ago[mono] Remove MonoRuntimeUnhandledExceptionPolicy (#48555)
Aleksey Kliger (λgeek) [Sat, 20 Feb 2021 20:26:30 +0000 (15:26 -0500)]
[mono] Remove MonoRuntimeUnhandledExceptionPolicy (#48555)

policy was always set to MONO_UNHANDLED_POLICY_CURRENT.  The
legacy (pre-.NET 2.0) policy was not used.

3 years agoJIT: workaround for unreliable change detection in fgReorderBlocks (#48516)
Andy Ayers [Sat, 20 Feb 2021 17:17:32 +0000 (09:17 -0800)]
JIT: workaround for unreliable change detection in fgReorderBlocks (#48516)

This method costs trees, which can in turn modify the IR by swapping operands.
As a result the bool value returned doesn't properly reflect whether any
changes happened.

This impacts proper reporting phase status by `optOptimizeLayout'. Since phase
status just gates post-phase dumps and checks, we'll just claim this phase
always modifies IR.

Add similar workaround for `optInvertLoops`.

Fixes #48494.
Fixes #48495.

3 years agoFix JIT rolling build (#48552)
Adeel Mujahid [Sat, 20 Feb 2021 16:34:53 +0000 (18:34 +0200)]
Fix JIT rolling build (#48552)

3 years agoUpdate hardcoded rids for targeting/runtime pks (#48459)
Viktor Hofer [Sat, 20 Feb 2021 12:18:35 +0000 (13:18 +0100)]
Update hardcoded rids for targeting/runtime pks (#48459)

* Update hardcoded rids for targeting/runtime pks

3 years agoFormat (#48548)
Next Turn [Sat, 20 Feb 2021 05:07:06 +0000 (13:07 +0800)]
Format (#48548)

3 years agoBuilding singlefilehost with clr partition. (#48254)
Vladimir Sadov [Sat, 20 Feb 2021 04:40:14 +0000 (20:40 -0800)]
Building singlefilehost with clr partition. (#48254)

* building single file host with clr partition

* make coreclr_static a STATIC lib again

3 years ago[mono] Implement public hot reload API (#48380)
Aleksey Kliger (λgeek) [Fri, 19 Feb 2021 20:11:03 +0000 (15:11 -0500)]
[mono] Implement public hot reload API (#48380)

* [mono] Implement public hot reload API

Also add ApplyUpdateSdb that takes byte[] arguments for use with
mono/debugger-libs as its awkward to call a ROS<byte> method from the debugger.

Contributes to https://github.com/dotnet/runtime/issues/45689

* Update src/mono/System.Private.CoreLib/src/System/Reflection/Metadata/AssemblyExtensions.cs

Co-authored-by: Marek Safar <marek.safar@gmail.com>
* Don't allow changes to System.Private.CoreLib

* formatting

* more formatting

* Add a TODO to remove ApplyUpdateSdb

* update DeltaHelper

* don't use ApplyUpdateSdb in DeltaHelper

* throw InvalidOpertionException for corlib changes with hot reload disabled

* Run the test on mono on all platoforms; CoreCLR windows only

* Use resource string

* Address review feedback

Co-authored-by: Marek Safar <marek.safar@gmail.com>
3 years agoTemporarily work around publishing issues with disk space (#48521)
Matt Galbraith [Fri, 19 Feb 2021 20:09:10 +0000 (12:09 -0800)]
Temporarily work around publishing issues with disk space (#48521)

3 years agoWasm download fix (#48514)
Drew Scoggins [Fri, 19 Feb 2021 19:08:57 +0000 (11:08 -0800)]
Wasm download fix (#48514)

* Don't use container for WASM

* Remove dashes

* Remove comments for testing

3 years agoDisable TestOnExecuteCustomCommand() for WSC (#48501)
Dan Moseley [Fri, 19 Feb 2021 18:59:19 +0000 (10:59 -0800)]
Disable TestOnExecuteCustomCommand() for WSC (#48501)

3 years agoRemove StringBuilderCache from Version.ToString (#48511)
Stephen Toub [Fri, 19 Feb 2021 18:38:31 +0000 (13:38 -0500)]
Remove StringBuilderCache from Version.ToString (#48511)

Rather than using a StringBuilder in both ToString and TryFormat, we can just write ToString in terms of TryFormat and use stack space for the small string being generated.  As part of this, I removed the extra code optimizing ToString(0) and ToString(1), as I can't find any real code anywhere that does that and it's not worth the extra lines.

3 years agoFix EqualityComparer<T>.Default for nullable (#48161)
Egor Bogatov [Fri, 19 Feb 2021 18:00:28 +0000 (21:00 +0300)]
Fix EqualityComparer<T>.Default for nullable (#48161)

3 years agoNo const arg to temp (#48308)
Alex Covington [Fri, 19 Feb 2021 17:55:18 +0000 (09:55 -0800)]
No const arg to temp (#48308)

* Starting to add IsInvariant helper

* Finished IsInvariant helper. Starting testing

* Removed IsInvariant from GenTree to avoid asserts

* Formatting

* Fixed missing not operator

* Changed AsOp() call to 'this' to avoid failing assertions

* Formatting

* Update src/coreclr/jit/morph.cpp

Co-authored-by: Sergey Andreenko <seandree@microsoft.com>
* Update src/coreclr/jit/compiler.h

Co-authored-by: Sergey Andreenko <seandree@microsoft.com>
* Apply suggestions from code review

Co-authored-by: Sergey Andreenko <seandree@microsoft.com>
* Change arguments to const to avoid cast

* Formatting

* delete `IsInvariant` from Compiler.

Co-authored-by: Sergey Andreenko <seandree@microsoft.com>
3 years agoDon't build Quic for platforms where it's not supported (#48480)
Marek Safar [Fri, 19 Feb 2021 17:46:58 +0000 (18:46 +0100)]
Don't build Quic for platforms where it's not supported (#48480)

3 years agoAnnotate framework assemblies as trimmable (#48428)
Sven Boemer [Fri, 19 Feb 2021 17:27:41 +0000 (09:27 -0800)]
Annotate framework assemblies as trimmable (#48428)

* Annotate framework assemblies as trimmable

This will opt them into trimming with the behavior described at https://github.com/mono/linker/blob/main/docs/design/trimmed-assemblies.md#assemblymetadataistrimmable-true.

* Add a condition to let projects opt out

A project just needs to set <SetIsTrimmable>false</SetIsTrimmable>, and
it won't get the trimmable metadata.

I also got rid of the SkipFrameworkAssemblyMetadata check since I don't
think the IsTrimmable metadata should be tied to whether we are building
a framework assembly, and this property was unused as far as I could tell.

3 years agoFix Socket.SendFile test: SliceBuffers_Success (#48457)
Anton Firszov [Fri, 19 Feb 2021 16:37:05 +0000 (17:37 +0100)]
Fix Socket.SendFile test: SliceBuffers_Success (#48457)

* do not expect a single receive

* use expected.Length

* enable test

3 years agoRemove trimming attributes from any assembly. (#48424)
Eric Erhardt [Fri, 19 Feb 2021 15:10:48 +0000 (09:10 -0600)]
Remove trimming attributes from any assembly. (#48424)

* Remove trimming attributes from any assembly.

These attributes are allowed to be in any assembly, for assemblies that are built using older TFMs where the attributes didn't exist.

Fix #48399

* Remove nullable attributes as well.

3 years agoNormalized names SIMD_OP_LLVM_* -> SIMD_OP_ARM64_* (#48489)
Nathan Ricci [Fri, 19 Feb 2021 14:41:27 +0000 (09:41 -0500)]
Normalized names SIMD_OP_LLVM_* -> SIMD_OP_ARM64_* (#48489)

Co-authored-by: Nathan Ricci <naricc@xam-emag-01.redmond.corp.microsoft.com>
3 years ago[master] Update dependencies from dotnet/xharness (#48452)
dotnet-maestro[bot] [Fri, 19 Feb 2021 10:51:53 +0000 (10:51 +0000)]
[master] Update dependencies from dotnet/xharness (#48452)

[master] Update dependencies from dotnet/xharness

3 years agoExpand PriorityQueue test coverage (#48420)
Eirik Tsarpalis [Fri, 19 Feb 2021 10:02:52 +0000 (10:02 +0000)]
Expand PriorityQueue test coverage (#48420)

* make comparer field readonly

* abstract IComparer in PriorityQueue generic tests

does minor refactorings and adds new tests

* add PriorityQueue property tests

* address feedback

* add seed for deterministic runs

* apply var fixes in property tests

* replace FsCheck properties with theories

3 years agoRemoving myself from codeowners file (#48502)
David Karlaš [Fri, 19 Feb 2021 09:24:33 +0000 (10:24 +0100)]
Removing myself from codeowners file (#48502)

In past I was involved in mono/debugger-agent.c, but not anymore, hence removing myself from CODEOWNERS file

3 years ago[interp] Small interp tweaks (#48412)
Vlad Brezae [Fri, 19 Feb 2021 09:07:44 +0000 (11:07 +0200)]
[interp] Small interp tweaks (#48412)

* [interp] Fix overflow in PROFILE_INTERP log

* [interp] Replace LDFLDA of offset 0 field with MOV

Commonly used when accessing first field of valuetypes, eg span operations. Will help with cprop and remove redundant instruction.

* [interp] Remove redundant opcode