platform/upstream/dotnet/runtime.git
3 years agoDisabled test, fixed some typos as well. (#45212)
Marie Píchová [Wed, 25 Nov 2020 19:20:18 +0000 (20:20 +0100)]
Disabled test, fixed some typos as well. (#45212)

3 years agoFix ninja package name (#45217)
Jeremy Koritzinsky [Wed, 25 Nov 2020 18:43:40 +0000 (10:43 -0800)]
Fix ninja package name (#45217)

3 years agoMono: switch to CMake build on Windows (#44976)
Alexander Köplinger [Wed, 25 Nov 2020 17:56:52 +0000 (18:56 +0100)]
Mono: switch to CMake build on Windows (#44976)

This unifies the build with the other platforms.

Hooks up the versioning targets so the mono libraries get the correct version.

3 years agoRemove unused Enum::InternalFlagsFormat parameter (#45196)
Marek Safar [Wed, 25 Nov 2020 16:51:13 +0000 (17:51 +0100)]
Remove unused Enum::InternalFlagsFormat parameter (#45196)

3 years ago[wasm] change filtering system timezones from zone.tab as a task parameter (#45138)
Tammy Qiu [Wed, 25 Nov 2020 16:18:33 +0000 (11:18 -0500)]
[wasm] change filtering system timezones from zone.tab as a task parameter (#45138)

* change filtering system timezones from zone.tab as a task parameter

Co-authored-by: Ankit Jain <radical@gmail.com>
3 years ago[master] Update dependencies from dotnet/icu dotnet/llvm-project dotnet/arcade dotne...
dotnet-maestro[bot] [Wed, 25 Nov 2020 15:32:31 +0000 (15:32 +0000)]
[master] Update dependencies from dotnet/icu  dotnet/llvm-project dotnet/arcade dotnet/runtime-assets dotnet/xharness (#44459)

[master] Update dependencies from dotnet/icu  dotnet/llvm-project dotnet/arcade dotnet/runtime-assets dotnet/xharness

 - Merge branch 'master' into darc-master-f04f89fe-a712-45ce-96bf-a8d278fcda72

 - Revert changes to dotnet sdk in global.json

See https://github.com/dotnet/runtime/pull/45108#pullrequestreview-536374298

3 years agoFix spelling of OverideEventProvider (#45113)
Stephen Toub [Wed, 25 Nov 2020 14:35:39 +0000 (09:35 -0500)]
Fix spelling of OverideEventProvider (#45113)

* Fix spelling of OverideEventProvider

* Fix a few more "overrides" in comments

3 years agoImplement TCP Keep-Alive for WinHttpHandler (#44889)
Anton Firszov [Wed, 25 Nov 2020 14:13:09 +0000 (15:13 +0100)]
Implement TCP Keep-Alive for WinHttpHandler (#44889)

Implements the final version of the API proposal in #44025 except the [SupportedOSPlatform("windows10.0.2004")] bits

3 years agoFix Socket telemetry outerloop test failures (#45170)
Stephen Toub [Wed, 25 Nov 2020 11:31:15 +0000 (06:31 -0500)]
Fix Socket telemetry outerloop test failures (#45170)

Based purely on code inspection, since I couldn't repro the failures happening in the lab, I believe what's happening is we're not outputting the right events if the connect ends up completing so fast that it's treated as a synchronous completion.  The fix is to move the relevant tracing to be done when the work completes, regardless of the completion mode.

I was able to simulate at least one set of failures by delaying the calling thread before it reaches a particular point, and this fixes that issue, so even if it's not fixing all known problems (hopefully it is), it's at least fixing some.

3 years agoSkip some PKCS9 tests on NetFx (#45199)
Levi Broderick [Wed, 25 Nov 2020 11:04:05 +0000 (03:04 -0800)]
Skip some PKCS9 tests on NetFx (#45199)

3 years agoFix Activity Start Time Precision (#45175)
Tarek Mahmoud Sayed [Wed, 25 Nov 2020 04:44:54 +0000 (20:44 -0800)]
Fix Activity Start Time Precision (#45175)

3 years agoRemove redundant ExecutionContext private ctor parameter (#45173)
Marek Safar [Wed, 25 Nov 2020 03:30:25 +0000 (04:30 +0100)]
Remove redundant ExecutionContext private ctor parameter (#45173)

3 years agoRemove ForceAsync from CryptoStream (#45150)
Stephen Toub [Wed, 25 Nov 2020 01:25:27 +0000 (20:25 -0500)]
Remove ForceAsync from CryptoStream (#45150)

3 years agoKeep precise argument sizes between import and morph. (#43130)
Sergey Andreenko [Wed, 25 Nov 2020 00:44:23 +0000 (16:44 -0800)]
Keep precise argument sizes between import and morph. (#43130)

Create `GT_PUTARG_TYPE` when signature type does not match node type.
Check in morph that this information has survived inlining and other phases between.

3 years agoFix work item exit code for helix tests (#45164)
Alex Perovich [Tue, 24 Nov 2020 23:52:26 +0000 (15:52 -0800)]
Fix work item exit code for helix tests (#45164)

* Fix work item exit code for helix tests

The helix work items are only supposed to return non-zero if they fail
to report tests for some reason.

* Fix if

3 years agoReduce SafeHandle allocation in CertEnumCertificatesInStore (#45166)
Stephen Toub [Tue, 24 Nov 2020 22:59:42 +0000 (17:59 -0500)]
Reduce SafeHandle allocation in CertEnumCertificatesInStore (#45166)

And avoiding leaving the last invalid one for finalization.

3 years agoJIT: change basic block weight to float (#45052)
Andy Ayers [Tue, 24 Nov 2020 22:25:04 +0000 (14:25 -0800)]
JIT: change basic block weight to float (#45052)

Change the core data type for basic block weights from unsigned to float,
to simplify overall calculations and allow for a wider dynamic range.

Many changes are straightforward, but a few are worth noting:
* LSRA needs a true max weight, so had to introduce infinity
* I removed some of the overflow checking as floats naturally saturate.
* The simple geometric loop weight scaling (*8 per loop nest level) leads
  to some very large counts in some tests (15 level loop nests). We may
  want to rethink this and scale less aggressively in deep nests.
* Morph's use of the weighted ref counts for RCS_EARLY is nonstandard
  and the values are not actually weights, so I just added a cast back to unsigned.
* Several places in the jit seem to try and compare or combine unweighted
  and weighted counts; I don't think this makes sense. But have left as is.
* Lower, LIR, and Decompose were passing around weights but never using them.
* I had to introduce a special new weight for the inline projection we do
  for the prejit root.

These changes lead to small numbers of diffs, mostly places where small rounding
changes have altered heuristics; notably:
* cse weights
* LSRA's initial take on whether a parameter should be enregistered

Overall diff impact is a wash.

There are almost no diffs without PGO/IBC data. Diffs are slightly more
prominent in the Roslyn assemblies prejitted with some IBC.

I've tried to keep the format of weights the same in dumps (in most places)
and see minimal diffs in dumps too.

3 years agoFix Full Width Chars Casing (#45079)
Tarek Mahmoud Sayed [Tue, 24 Nov 2020 21:51:46 +0000 (13:51 -0800)]
Fix Full Width Chars Casing (#45079)

3 years agoDelay initialization of Task related properties which are rarely used (#45127)
Marek Safar [Tue, 24 Nov 2020 21:08:33 +0000 (22:08 +0100)]
Delay initialization of Task related properties which are rarely used (#45127)

* Delay initialization of Task related properties which are rarely used

to reduce the dependencies chain

* Apply PR review suggestions

* fix up previous commit

* Update src/libraries/System.Private.CoreLib/src/System/Threading/ExecutionContext.cs

Co-authored-by: Stephen Toub <stoub@microsoft.com>
Co-authored-by: Stephen Toub <stoub@microsoft.com>
3 years agoadd support for less standard serial port speeds on macOS (#44052)
Tomas Weinfurt [Tue, 24 Nov 2020 18:37:02 +0000 (10:37 -0800)]
add support for less standard serial port speeds on macOS (#44052)

* add support for less standard serial port speeds on macOS

* s/ifdef/if

3 years agoHandle inconsistent \0 in Pkcs9Document{Name|Description}
Jeremy Barton [Tue, 24 Nov 2020 14:53:00 +0000 (06:53 -0800)]
Handle inconsistent \0 in Pkcs9Document{Name|Description}

3 years agoReduce RuntimeType.MakeGenericType overheads (#45137)
Stephen Toub [Tue, 24 Nov 2020 12:03:10 +0000 (07:03 -0500)]
Reduce RuntimeType.MakeGenericType overheads (#45137)

- Avoid an extra GetGenericArguments() call for all arities.
- Special-case a Type[] with just one type.  In looking at all calls to MakeGenericType when starting up a basic ASP.NET MVC app, 70% were for a single generic argument (the rest were for two).

3 years agoUpdate nullability.md
Stephen Toub [Tue, 24 Nov 2020 03:45:58 +0000 (22:45 -0500)]
Update nullability.md

3 years agoFix CoreRT frozen strings handling. (#45095)
Sergey Andreenko [Tue, 24 Nov 2020 02:42:23 +0000 (18:42 -0800)]
Fix CoreRT frozen strings handling. (#45095)

* Fix CoreRT frozen strings handling.

* Review response.

* Delete noway_assert.

* Additional checks.

* Fix failures.

3 years agoFix native build on arm and arm64. (#45131)
Sergey Andreenko [Tue, 24 Nov 2020 02:32:24 +0000 (18:32 -0800)]
Fix native build on arm and arm64. (#45131)

* Fix native build on arm and arm64.

* Fix a typo.

3 years agoRemove most uses of RuntimeTypeHandle.Allocate (#45085)
Levi Broderick [Mon, 23 Nov 2020 23:53:09 +0000 (15:53 -0800)]
Remove most uses of RuntimeTypeHandle.Allocate (#45085)

- Refactoring paves way for related work in https://github.com/dotnet/runtime/pull/32520
- Fixes some possible GC holes in the reflection stack

3 years agoUpdate ILVerify readme (#45123)
Jan Kotas [Mon, 23 Nov 2020 21:51:34 +0000 (13:51 -0800)]
Update ILVerify readme (#45123)

ILVerify is published on nuget now. It is not required to use the nightly feed anymore.

3 years agoUse Type.EmptyTypes consistently (#45112)
Stephen Toub [Mon, 23 Nov 2020 20:48:27 +0000 (15:48 -0500)]
Use Type.EmptyTypes consistently (#45112)

We currently have several hundred uses of `Array.Empty<Type>()` and several hundred uses of `Type.EmptyTypes`.  This just changes the repo to use the latter consistently.

3 years agoUse `argIsInvariant` instead of `argNode->OperIsConst()` for inlining observations...
Sergey Andreenko [Mon, 23 Nov 2020 18:57:27 +0000 (10:57 -0800)]
Use `argIsInvariant` instead of `argNode->OperIsConst()` for inlining observations. (#44790)

* Use `argIsInvariant` instead of `argNode->OperIsConst()`.

* add a small repro test for the current issue.

3 years agoAdd support for stack walks on wasm for the reflection methods which need them. ...
Zoltan Varga [Mon, 23 Nov 2020 17:25:52 +0000 (12:25 -0500)]
Add support for stack walks on wasm for the reflection methods which need them. (#45076)

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

3 years ago[Android] Introduce AndroidApkFileReplacerTask task (#44993)
Egor Bogatov [Mon, 23 Nov 2020 16:33:40 +0000 (19:33 +0300)]
[Android] Introduce AndroidApkFileReplacerTask task (#44993)

3 years agoSkip Invariant initialization test for CultureData.Invariant (#45064)
Ben Adams [Mon, 23 Nov 2020 15:02:35 +0000 (15:02 +0000)]
Skip Invariant initialization test for CultureData.Invariant (#45064)

* Skip Invariant initalization test for CultureData.Invariant

* Feedback

3 years agodisable ReadWrite_Success_Large test for CryptoStream because it takes too long to...
Geoff Kizer [Mon, 23 Nov 2020 14:19:09 +0000 (06:19 -0800)]
disable ReadWrite_Success_Large test for CryptoStream because it takes too long to run (#45081)

Co-authored-by: Geoffrey Kizer <geoffrek@windows.microsoft.com>
3 years agoCreate cancellation token registration wrapper only when it's needed (#45075)
Marek Safar [Mon, 23 Nov 2020 12:58:33 +0000 (13:58 +0100)]
Create cancellation token registration wrapper only when it's needed (#45075)

Co-authored-by: Stephen Toub <stoub@microsoft.com>
3 years agoImprove throughput of Environment.GetEnvironmentVariables() (#45057)
Stephen Toub [Sun, 22 Nov 2020 22:59:47 +0000 (17:59 -0500)]
Improve throughput of Environment.GetEnvironmentVariables() (#45057)

Use IndexOf to search for positions rather than open-coded loops, taking advantage of vectorization to improve throughput.

3 years agoDelete unused WinRT related strings (#45067)
Jan Kotas [Sun, 22 Nov 2020 15:30:25 +0000 (07:30 -0800)]
Delete unused WinRT related strings (#45067)

Fix a few typos

3 years agoFix Typos (#45024)
N [Sun, 22 Nov 2020 06:59:00 +0000 (01:59 -0500)]
Fix Typos (#45024)

3 years agoDrop Convert static constructor dependency from RuntimeType (#45054)
Marek Safar [Sun, 22 Nov 2020 06:06:04 +0000 (07:06 +0100)]
Drop Convert static constructor dependency from RuntimeType (#45054)

* Drop Convert static constructor dependency from RuntimeTypeto make it trimmable

Co-authored-by: Jan Kotas <jkotas@microsoft.com>
3 years agoUse HexConverter directly when producing hex representation of enum value (#44945)
Marek Safar [Sat, 21 Nov 2020 23:06:52 +0000 (00:06 +0100)]
Use HexConverter directly when producing hex representation of enum value (#44945)

instead of hopping over layers of ToString indirections which end up calling HexConvertor anyway.

3 years agoHandle non-ASCII strings in GetNonRandomizedHashCodeOrdinalIgnoreCase (#44688)
Egor Bogatov [Sat, 21 Nov 2020 23:01:32 +0000 (02:01 +0300)]
Handle non-ASCII strings in GetNonRandomizedHashCodeOrdinalIgnoreCase (#44688)

* Fix GetNonRandomizedHashCodeOrdinalIgnoreCase

* Add a test

Co-authored-by: Levi Broderick <levib@microsoft.com>
3 years agoImplement getMethodModule (#45046)
Bruce Forstall [Sat, 21 Nov 2020 18:46:03 +0000 (10:46 -0800)]
Implement getMethodModule (#45046)

R2R testing was failing by hitting an assert about unimplemented
getMethodModule, called as part of R2R-only devirtualization handling
in the JIT.

I didn't determine why this regressed now.

Fixes #45016

3 years agoCorrect nullability annotation for IDataRecord (#44938)
Shay Rojansky [Sat, 21 Nov 2020 07:11:41 +0000 (09:11 +0200)]
Correct nullability annotation for IDataRecord (#44938)

Fixes #44886

3 years agoUse OutputRid for host packs (#45041)
Adeel Mujahid [Sat, 21 Nov 2020 03:12:31 +0000 (05:12 +0200)]
Use OutputRid for host packs (#45041)

3 years ago[browser][tests] Standup System.Net.WebSockets.Client.Tests in CI (#44781)
Kenneth Pouncey [Sat, 21 Nov 2020 02:45:12 +0000 (03:45 +0100)]
[browser][tests] Standup System.Net.WebSockets.Client.Tests in CI (#44781)

* [browser][tests] Standup System.Net.WebSockets.Client.Tests in CI

* Just a small test to see if tests are actually kicked off and failing.

* Remove comment from ActiveIssue to pass tests

* Address review comments

- mark the loopback issues as activeIssue - [ActiveIssue("https://github.com/dotnet/runtime/issues/34690", TestPlatforms.Browser)]

* Address review comments

* Correct confusion I caused

* Remove extra extra exclusion that snuck in

* Make browser specific failure browser specific

Co-authored-by: Larry Ewing <lewing@microsoft.com>
3 years agoHide DispatchTailCalls helper in stacktraces (#45019)
Jan Kotas [Sat, 21 Nov 2020 02:32:04 +0000 (18:32 -0800)]
Hide DispatchTailCalls helper in stacktraces (#45019)

Fixes #45011

3 years agoAdd GetCiphertextLength for CBC, CFB, and ECB.
Kevin Jones [Sat, 21 Nov 2020 00:02:53 +0000 (19:02 -0500)]
Add GetCiphertextLength for CBC, CFB, and ECB.

3 years agoRemove more LINQ usage from various dotnet/runtime libraries (#44964)
Stephen Toub [Fri, 20 Nov 2020 23:58:31 +0000 (18:58 -0500)]
Remove more LINQ usage from various dotnet/runtime libraries (#44964)

* Remove unnecessary OrderBy / copy from MemoryCache.Compact

* Replace First() in ILEmitResolverBuilder with [0]

* Remove stale "using System.Linq;" from System.Text.Json

* Remove stale "using System.Linq;" from System.Security.Cryptography.X509Certificates

* Remove some LINQ usage from System.Security.Cryptography.Pkcs

* Remove System.Linq reference from System.Private.Xml

* Remove System.Linq reference from System.Net.WebHeaderCollection

* Remove stale "using System.Linq;" from CookieContainer

* Remove stale "using System.Linq;" from AltSvcHeaderParser

* Remove Enumerable.Contains on a string from System.IO.Packaging

* Remove System.Linq dependency from System.Diagnostics.Process

* Remove LINQ usage from Microsoft.Extensions.Options

* Remove LINQ usage from Microsoft.Extensions.Logging

* Remove LINQ usage from Microsoft.Extensions.Logging.Console

* Remove LINQ from CollectionExtensions.GetAssets/RuntimeFiles

* Update src/libraries/System.Security.Cryptography.Pkcs/src/System/Security/Cryptography/Pkcs/Rfc3161TimestampToken.cs

Co-authored-by: Jeremy Barton <jbarton@microsoft.com>
Co-authored-by: Jeremy Barton <jbarton@microsoft.com>
3 years agoRemove LINQ usage from EnvironmentVariablesConfigurationProvider (#44923)
Stephen Toub [Fri, 20 Nov 2020 23:57:40 +0000 (18:57 -0500)]
Remove LINQ usage from EnvironmentVariablesConfigurationProvider (#44923)

3 years agoRemove Convert.ToByte usage from Enum (#45004)
Stephen Toub [Fri, 20 Nov 2020 23:17:35 +0000 (18:17 -0500)]
Remove Convert.ToByte usage from Enum (#45004)

3 years agoFix buffer comparison in stream conformance tests (#45012)
Geoff Kizer [Fri, 20 Nov 2020 23:12:55 +0000 (15:12 -0800)]
Fix buffer comparison in stream conformance tests (#45012)

* avoid using Assert.Equals for buffer comparison in stream conformance tests because it's super, super slow

* Apply suggestions from code review

update span comparisons

Co-authored-by: Stephen Toub <stoub@microsoft.com>
Co-authored-by: Geoffrey Kizer <geoffrek@windows.microsoft.com>
Co-authored-by: Stephen Toub <stoub@microsoft.com>
3 years agoRegister allocation cleanup (#44977)
Kunal Pathak [Fri, 20 Nov 2020 21:30:42 +0000 (13:30 -0800)]
Register allocation cleanup (#44977)

* Register allocation cleanup

- Comment updates
- Misc code cleanup

* jit format

3 years agoAdd missing XML docs to System.Security.* (#44461)
Krzysztof Wicher [Fri, 20 Nov 2020 20:32:07 +0000 (21:32 +0100)]
Add missing XML docs to System.Security.* (#44461)

* Add missing XML docs to System.Security.*

* add missing <

* Apply suggestions from code review

Co-authored-by: Carlos Sanchez <1175054+carlossanlop@users.noreply.github.com>
* Update src/libraries/System.Security.Cryptography.Pkcs/src/System/Security/Cryptography/Pkcs/Rfc3161TimestampTokenInfo.cs

Co-authored-by: Carlos Sanchez <1175054+carlossanlop@users.noreply.github.com>
* apply feedback

* fix merge conflict (renamed parameters)

* Apply suggestions from code review

Co-authored-by: Jeremy Barton <jbarton@microsoft.com>
* Update src/libraries/System.Security.Cryptography.Pkcs/src/System/Security/Cryptography/Pkcs/Rfc3161TimestampTokenInfo.cs

Co-authored-by: Carlos Sanchez <1175054+carlossanlop@users.noreply.github.com>
Co-authored-by: Jeremy Barton <jbarton@microsoft.com>
3 years agoAdd chmod for the SoD tool (#45014)
Drew Scoggins [Fri, 20 Nov 2020 20:00:40 +0000 (12:00 -0800)]
Add chmod for the SoD tool (#45014)

* Add chmod for the SoD tool

* crossgen.out input path

3 years agoAdd Linux ARM64 runs (#44887)
Drew Scoggins [Fri, 20 Nov 2020 19:46:32 +0000 (11:46 -0800)]
Add Linux ARM64 runs (#44887)

3 years agoUpdated mono testing doc (#44360)
Fan Yang [Fri, 20 Nov 2020 19:27:44 +0000 (14:27 -0500)]
Updated mono testing doc (#44360)

* Update testing.md

* Create testing-mono.md

* Update mono testing doc

* Update docs/workflow/testing/mono/testing.md

Co-authored-by: Ryan Lucia <rylucia@microsoft.com>
* Update docs/workflow/testing/mono/testing.md

Co-authored-by: Ryan Lucia <rylucia@microsoft.com>
* Update docs/workflow/testing/mono/testing.md

Co-authored-by: Ryan Lucia <rylucia@microsoft.com>
* Update docs/workflow/testing/mono/testing.md

Co-authored-by: Ryan Lucia <rylucia@microsoft.com>
* Update docs/workflow/testing/mono/testing.md

Co-authored-by: Ryan Lucia <rylucia@microsoft.com>
* Update docs/workflow/testing/mono/testing.md

Co-authored-by: Ryan Lucia <rylucia@microsoft.com>
* Update docs/workflow/testing/mono/testing.md

Co-authored-by: Ryan Lucia <rylucia@microsoft.com>
* Update docs/workflow/testing/mono/testing.md

Co-authored-by: Ryan Lucia <rylucia@microsoft.com>
* Update docs/workflow/testing/mono/testing.md

Co-authored-by: Ryan Lucia <rylucia@microsoft.com>
* PR feedback

* Fix format

* Update docs/workflow/testing/mono/testing.md

Co-authored-by: Ryan Lucia <rylucia@microsoft.com>
* Update docs/workflow/testing/mono/testing.md

Co-authored-by: Ryan Lucia <rylucia@microsoft.com>
* Update docs/workflow/testing/mono/testing.md

Co-authored-by: Ryan Lucia <rylucia@microsoft.com>
* Update docs/workflow/testing/mono/testing.md

Co-authored-by: Ryan Lucia <rylucia@microsoft.com>
* PR feedback

* Update docs/workflow/testing/mono/testing.md

Co-authored-by: Ryan Lucia <rylucia@microsoft.com>
* Update docs/workflow/testing/mono/testing.md

Co-authored-by: Ryan Lucia <rylucia@microsoft.com>
* Replace bullet points with sub-headers

* Update sub-headers to remove the duplicated part

Co-authored-by: Ryan Lucia <rylucia@microsoft.com>
3 years ago[mono] Define ENABLE_MONOTOUCH and MONOTOUCH when building iOS/tvOS AOT cross compile...
imhameed [Fri, 20 Nov 2020 19:15:46 +0000 (11:15 -0800)]
[mono] Define ENABLE_MONOTOUCH and MONOTOUCH when building iOS/tvOS AOT cross compilers (#45005)

3 years agoFix add user secrets (#44838)
Vadim Galaktionov [Fri, 20 Nov 2020 17:17:20 +0000 (20:17 +0300)]
Fix add user secrets (#44838)

3 years agoFix CFB8 with Zero padding
Kevin Jones [Fri, 20 Nov 2020 16:37:48 +0000 (11:37 -0500)]
Fix CFB8 with Zero padding

3 years agoDisable on Server Core a couple tests that use notepad (#44972)
Dan Moseley [Fri, 20 Nov 2020 15:50:13 +0000 (07:50 -0800)]
Disable on Server Core a couple tests that use notepad (#44972)

3 years agoUse TryParseUInt32HexNumberStyle directly from Guid.TryParse (#44918)
Stephen Toub [Fri, 20 Nov 2020 15:40:20 +0000 (10:40 -0500)]
Use TryParseUInt32HexNumberStyle directly from Guid.TryParse (#44918)

Skips public entry points of uint.TryParse, including argument validation, branches for style, but most impactfully fetching the current number culture when it won't actually be needed.

3 years agoUse substitute SHA-1 implementation in wasm (#44982)
Levi Broderick [Fri, 20 Nov 2020 15:38:00 +0000 (07:38 -0800)]
Use substitute SHA-1 implementation in wasm (#44982)

* Use different managed SHA-1 implementation

* Add missing call to Start

3 years agoFix parsed RID condition for VS (#44998)
Adeel Mujahid [Fri, 20 Nov 2020 15:37:07 +0000 (17:37 +0200)]
Fix parsed RID condition for VS (#44998)

3 years agoIncrease Hosting test delay to fix flaky BackgroundServiceAsyncExceptionGetsLogged...
Eric Erhardt [Fri, 20 Nov 2020 15:35:39 +0000 (09:35 -0600)]
Increase Hosting test delay to fix flaky BackgroundServiceAsyncExceptionGetsLogged test. (#44953)

* Increase Hosting test delay to fix flaky BackgroundServiceAsyncExceptionGetsLogged test.

Fix #43389

* Use a Task to control the delay on the background service.

3 years agoPreserve symbols in dbgshim (#44970)
Juan Hoyos [Fri, 20 Nov 2020 14:34:29 +0000 (06:34 -0800)]
Preserve symbols in dbgshim (#44970)

* Preserve symbols in the dbgshim

* Remove unused library group option.

3 years agoFix pal cgroup v2 implementation (#44990)
Tom Deseyn [Fri, 20 Nov 2020 14:19:55 +0000 (15:19 +0100)]
Fix pal cgroup v2 implementation (#44990)

* Fix pal cgroup v2 implementation

Fixes two issues in src/pal/src/misc/cgroup.cpp:

* No subsystem match must be performed for cgroup v2.
* Incorrect arguments for sscanf_s when reading cgroup path.

The src/gc/unix/cgroup.cpp implementation doesn't have these issues.

* Rename is_subsystem_match to isSubsystemMatch

3 years agoRemoved unwanted ManualResetEvent from ServiceController (#44716)
Shreyas Jejurkar [Fri, 20 Nov 2020 11:27:36 +0000 (03:27 -0800)]
Removed unwanted ManualResetEvent from ServiceController (#44716)

* Removed unwanted ManualResetEvent from ServiceController

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

* Addressed PR feedback.
Added delay of 250 ms.

3 years agoBuild osx-x64 Crossgen2 package (#44984)
Anton Lapounov [Fri, 20 Nov 2020 08:36:32 +0000 (00:36 -0800)]
Build osx-x64 Crossgen2 package (#44984)

3 years agoFix handling of \G in Regex.Split/Replace (#44975)
Stephen Toub [Fri, 20 Nov 2020 05:07:08 +0000 (00:07 -0500)]
Fix handling of \G in Regex.Split/Replace (#44975)

In our optimized Regex.Split loop, we failed to update runtextstart, which means the \G anchor (aka starting where the previous match ended).

3 years agoFix syntax error in Signing.props (#44971)
Viktor Hofer [Thu, 19 Nov 2020 23:46:44 +0000 (00:46 +0100)]
Fix syntax error in Signing.props (#44971)

3 years agoEnables the interpreter on iOS (#44911)
Steve Pfister [Thu, 19 Nov 2020 23:40:23 +0000 (18:40 -0500)]
Enables the interpreter on iOS (#44911)

To enable on tests, you can pass MonoForceInterpreter=true as an extra MSBuild property.

AppleAppBuilder will also have a ForceInterpreter property on it in order to flow down to device / simulator.

3 years agoUse simple convert method for internal bool to ulong enum conversion (#44942)
Marek Safar [Thu, 19 Nov 2020 23:25:25 +0000 (00:25 +0100)]
Use simple convert method for internal bool to ulong enum conversion (#44942)

3 years agoMove xunit test harness to its own directory under core_root (#44921)
Simon Nattress [Thu, 19 Nov 2020 23:16:41 +0000 (15:16 -0800)]
Move xunit test harness to its own directory under core_root (#44921)

Running `xunit.console` from within the CoreRoot directory is problematic. It is executed by the shared runtime but has a full copy of the runtime and framework libraries next to it from which assemblies are getting loaded despite being for a pre-release test runtime.

Place the xunit assemblies under `<core_root>/xunit` and update the places that invoke it in local and Helix test runs.

The loaded tests do reference the xunit assemblies so they need to also be available in core_root for when the tests run (with the exception of the harness specific assemblies like xunit.console).

3 years agoFix post build signing props and enable post build signing. (#44951)
Jeremy Koritzinsky [Thu, 19 Nov 2020 23:01:30 +0000 (15:01 -0800)]
Fix post build signing props and enable post build signing. (#44951)

3 years agoRun class cctor in RuntimeHelpers.GetUninitializedObject(type). (#44898)
Zoltan Varga [Thu, 19 Nov 2020 22:42:01 +0000 (17:42 -0500)]
Run class cctor in RuntimeHelpers.GetUninitializedObject(type). (#44898)

* Run class cctor in RuntimeHelpers.GetUninitializedObject(type).

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

* Reenable test.

* Don't run the cctor for beforefieldinit classes.

3 years agoCustom attribute properties were not always applied correctly (#44813)
Steve Harter [Thu, 19 Nov 2020 21:16:38 +0000 (15:16 -0600)]
Custom attribute properties were not always applied correctly (#44813)

3 years agoUse multibyte character path for bundle_probe (#44466)
Adeel Mujahid [Thu, 19 Nov 2020 21:04:40 +0000 (23:04 +0200)]
Use multibyte character path for bundle_probe (#44466)

3 years agoMark stress log critical section as compatible with shutdown (#44937)
Tomáš Rylek [Thu, 19 Nov 2020 20:59:40 +0000 (21:59 +0100)]
Mark stress log critical section as compatible with shutdown (#44937)

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

3 years agoRemove temporary SuperPMI scripting code (#44962)
Bruce Forstall [Thu, 19 Nov 2020 20:22:28 +0000 (12:22 -0800)]
Remove temporary SuperPMI scripting code (#44962)

Now that we have new SPMI collections, after
https://github.com/dotnet/runtime/pull/44834,
remove temporary scripting code.

3 years agoFix NRE on EmitCalli (#44452)
Wei Zheng [Thu, 19 Nov 2020 20:07:20 +0000 (04:07 +0800)]
Fix NRE on EmitCalli (#44452)

3 years agoDelete NetEventSource.IsEnabled (#44901)
Stephen Toub [Thu, 19 Nov 2020 19:50:16 +0000 (14:50 -0500)]
Delete NetEventSource.IsEnabled (#44901)

* Delete NetEventSource.IsEnabled

These were all meant to be changed to NetEventSource.Log.IsEnabled(), and there are almost 900 occurrences of that pattern.  But there are still 9 stragglers, and the method itself.  Deleting the method and fixing the call sites.

* Fix uses in NetEventSource itself

3 years agoConsolidate RID and native file naming in MSBuild scripts (#43804)
Adeel Mujahid [Thu, 19 Nov 2020 18:52:32 +0000 (20:52 +0200)]
Consolidate RID and native file naming in MSBuild scripts (#43804)

* Consolidate RID and native file naming in MSBuild scripts
* Use short variable names for native files naming convention, that are
  used by `framework.sharedfx.targets` in arcade, and cleanup
  redefinitions from crossgen2 and installer. e.g. `ExeSuffix` instead
  of `ApplicationFileExtension`, `LibSuffix` instead of
  `LibraryFileExtension` and so on.
* Calculate `TargetArchitecture`, `NonPortableRuntimeOS` (for
  `PortableBuild`) and `PackageRID` values once for the entire
  livebuild, inside `eng/Configurations.props`. This implementation is
  a union of three varied implementations that are being deleted.
* Import `names.props` once in `eng/Configurations.props` based on
  calculated `PackageRID` and cleanup imports of this file from various
  places.
* Combine OS targets definition in MSBuild scripts.

* Delete legacy tooling properties

* Delete legacy tooling properties

3 years agoFix SoD input path (#44954)
Drew Scoggins [Thu, 19 Nov 2020 18:33:55 +0000 (10:33 -0800)]
Fix SoD input path (#44954)

3 years agoFix issue 44646 - ILAsm incorrectly handles method .custom attribute when we have...
Brian Sullivan [Thu, 19 Nov 2020 18:09:57 +0000 (10:09 -0800)]
Fix issue 44646 - ILAsm incorrectly handles method .custom attribute when we have generic type constraint (#44850)

* Fix issue 44646 - ILAsm incorrectly handles method .custom attribute when we have generic type constraint

The IL Assembler incorrectly dropped a .custom attribute for the method
This only occurred when the inline syntax for generic type parameters was used in the method definition.
This behavior can also occur for a generic class definition.

* Fix typo in comment

3 years agoSpeed up Crossgen2 by 10% (#44917)
Simon Nattress [Thu, 19 Nov 2020 16:41:30 +0000 (08:41 -0800)]
Speed up Crossgen2 by 10% (#44917)

Server GC looks to improve Crossgen2 compile times by up to 15% so use it by default.

3 years agoDelete coreconsole test hosts (#44933)
Jan Kotas [Thu, 19 Nov 2020 16:40:18 +0000 (08:40 -0800)]
Delete coreconsole test hosts (#44933)

Superceded by the shipping single-file hosts

Contributes to #44848

3 years ago[mono] Re-enable /JIT/HardwareIntrinsics/General/NotSupported_{r,ro}/ (#44930)
imhameed [Thu, 19 Nov 2020 16:35:51 +0000 (08:35 -0800)]
[mono] Re-enable /JIT/HardwareIntrinsics/General/NotSupported_{r,ro}/ (#44930)

3 years ago[mono] Unconditionally check llvm::Expected<T> for success (#44908)
imhameed [Thu, 19 Nov 2020 15:38:55 +0000 (07:38 -0800)]
[mono] Unconditionally check llvm::Expected<T> for success (#44908)

`assert()` will expand to a no-op if NDEBUG is defined, which can
cause an assertion-enabled LLVM to trap if an `llvm::Expected<T>` is
destroyed before having had `operator bool` applied to it.

3 years agoIncrement breaking change no for doubly linked freelists (#44800)
Peter Sollich [Thu, 19 Nov 2020 13:31:55 +0000 (14:31 +0100)]
Increment breaking change no for doubly linked freelists (#44800)

Update breaking change number because doubly linked free lists use one additional bit in the method table pointer at the beginning of objects now.

Added a comment noting that gcDacVars->major_version_number that is set in gc.cpp is not actually checked by SOS, so SOS_BREAKING_CHANGE_VERSION should be updated if GC changes in a way that is incompatible with the existing SOS.

3 years agoMove EventPipe C library into shared location. (#44791)
Johan Lorensson [Thu, 19 Nov 2020 11:58:31 +0000 (12:58 +0100)]
Move EventPipe C library into shared location. (#44791)

* Move C EventPipe library into shared location.

* Fix CMake build and add CMake eventpipe test runner build.

3 years agoAdd AOT support for the EntryPoint property for UnmanagedCallersOnly. (#44809)
Zoltan Varga [Thu, 19 Nov 2020 10:24:37 +0000 (05:24 -0500)]
Add AOT support for the EntryPoint property for UnmanagedCallersOnly. (#44809)

* Change mono_reflection_create_custom_attr_data_args_noalloc () so it returns the beginning of the metadata string so its length can be computed.

* Add AOT support for the EntryPoint property for UnmanagedCallersOnly.

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

* Update src/mono/mono/mini/driver.c

Co-authored-by: Aleksey Kliger (λgeek) <akliger@gmail.com>
Co-authored-by: Aleksey Kliger (λgeek) <akliger@gmail.com>
3 years agoFix s390x unwinding and remove need for backchain pointer (#44927)
monojenkins [Thu, 19 Nov 2020 08:46:51 +0000 (03:46 -0500)]
Fix s390x unwinding and remove need for backchain pointer (#44927)

Fix unwinding for s390x. Removes the `-mbackchain` flag that had been used in the past when unwinding stack frames but has not been required for sometime. This should also improve performance.

Co-authored-by: nealef <nealef@users.noreply.github.com>
3 years agoUse simple array for AggregateException inner exceptions storage (#44787)
Marek Safar [Thu, 19 Nov 2020 08:23:17 +0000 (09:23 +0100)]
Use simple array for AggregateException inner exceptions storage (#44787)

* Use simple array for AggregateException inner exceptions storage

* Replace cases which called into InnerExceptions inside SPC

* Update src/libraries/System.Private.CoreLib/src/System/AggregateException.cs

Co-authored-by: Stephen Toub <stoub@microsoft.com>
* Fix typo

Co-authored-by: Stephen Toub <stoub@microsoft.com>
3 years agoFix regression in XDocumentType (#44868)
Krzysztof Wicher [Thu, 19 Nov 2020 08:16:00 +0000 (09:16 +0100)]
Fix regression in XDocumentType (#44868)

3 years agoEnsure Debugging assets are signed. (#44915)
Juan Hoyos [Thu, 19 Nov 2020 06:10:51 +0000 (22:10 -0800)]
Ensure Debugging assets are signed. (#44915)

3 years agoSync SPC File.cs implementation with full the implementation in SIF (#44902)
Marek Safar [Thu, 19 Nov 2020 04:39:01 +0000 (05:39 +0100)]
Sync SPC File.cs implementation with full the implementation in SIF (#44902)

3 years agoFix ListSeparator with ICU (#44732)
Tarek Mahmoud Sayed [Thu, 19 Nov 2020 03:20:17 +0000 (19:20 -0800)]
Fix ListSeparator with ICU (#44732)

3 years agoFor x86/x64, call a stack probe helper for all frame sizes equal or over one page...
Egor Chesakov [Thu, 19 Nov 2020 01:39:27 +0000 (17:39 -0800)]
For x86/x64, call a stack probe helper for all frame sizes equal or over one page (#44664)

3 years agoVerify that OCSP and CRL checks fall back.
Kevin Jones [Thu, 19 Nov 2020 01:18:12 +0000 (20:18 -0500)]
Verify that OCSP and CRL checks fall back.

Test that a CRL timeout chain build will use OCSP, and that an OCSP timeout chain build will use CRL.

3 years agoChange gtGetThisArg not to return nullptr. (#44398)
Sergey Andreenko [Thu, 19 Nov 2020 00:40:54 +0000 (14:40 -1000)]
Change gtGetThisArg not to return nullptr. (#44398)

* Don't wrap string literal const as nop for CoreRT.

It was probably an old workaround for another Jit bug, it is most likely fixed by now.

* Change `gtGetThisArg` not to return `nullptr`.

There was only 1 case where a null return was tolerated - for a tail call in `optAssertionGen` marked as virtual.
However, a transformed tail call is never a virtual, fix `fgMorphTailCallViaJitHelper` to unset virtual flag.

* Keep x86 tail call via jit helper as a virtual stub call.

3 years agoMake minor change to corinfo.h to test SuperPMI AzDO job trigger (#44893)
Bruce Forstall [Wed, 18 Nov 2020 23:50:37 +0000 (15:50 -0800)]
Make minor change to corinfo.h to test SuperPMI AzDO job trigger (#44893)