platform/upstream/dotnet/runtime.git
4 years agoPrevent build scripts from letting random values through (#35642)
Ivan Diaz Sanchez [Wed, 13 May 2020 01:58:51 +0000 (18:58 -0700)]
Prevent build scripts from letting random values through (#35642)

* Arch, OS, and Config no longer let random values through when building the repo. Also, removed the casing restrictions on the bash version.

* Fixed the bash build script! Also, casing restrictions are gone!

* Added safeguards for bogus values on -rc and -lc on the sh build script.

* Fixed the merge conflict on build.sh

* Used awk instead of declare for increased compatibility on build.sh

* Restored execute permissions to build.sh

4 years agoFix Microsoft.Extensions.DependencyModel AssemblyVersionInPackageVersion (#36301)
Eric Erhardt [Wed, 13 May 2020 01:07:59 +0000 (20:07 -0500)]
Fix Microsoft.Extensions.DependencyModel AssemblyVersionInPackageVersion (#36301)

4 years agoSet ExactSpelling=true on P/Invokes in System.Private.CoreLib that already specify...
Elinor Fung [Wed, 13 May 2020 01:04:14 +0000 (18:04 -0700)]
Set ExactSpelling=true on P/Invokes in System.Private.CoreLib that already specify the unicode W suffix (#36257)

* Set ExactSpelling=true on P/Invokes in System.Private.CoreLib that
already specify the unicode W suffix

* PR feedback: refactor NDirectMethodDesc::FindEntryPoint

4 years agoFix HttpClient SSL3.0 test on newer Windows OS (#36308)
David Shulman [Wed, 13 May 2020 00:36:08 +0000 (17:36 -0700)]
Fix HttpClient SSL3.0 test on newer Windows OS (#36308)

When I upgraded my dev machine to Windows 10 Version 2004 Preview, I noticed that the
HttpClient GetAsync_SupportedSSLVersion_Succeeds test was failing when using SSL 3.0.

This new version of Windows changes the default setting of SSL 3.0. So, by default,
SSL 3.0 is no longer enabled.

The problem was that this specific test wasn't using our PlatformDetection.SupportsSsl30
logic. Fixed the test so that it will properly detect whether SSL 3.0 is enabled on
the machine.

4 years agoAdd ctor to JsonSerializerOptions that takes serializer defaults (#36073)
Nikiforov Alexey [Wed, 13 May 2020 00:13:16 +0000 (03:13 +0300)]
Add ctor to JsonSerializerOptions that takes serializer defaults (#36073)

* add ctor to JsonSerializerOptions that takes serializer defaults

* add out of range handling; enhance xml documentation

* test serializer option construction via serializer defaults

* adjust PredefinedSerializerOptions tests

4 years agoAdd QCALL_CONTRACT_NO_GC_TRANSITION (#36294)
Aaron Robinson [Tue, 12 May 2020 23:10:36 +0000 (16:10 -0700)]
Add QCALL_CONTRACT_NO_GC_TRANSITION (#36294)

New QCall macro for APIs that use SuppressGCTransitionAttribute.

4 years agoFix nullable annotations on DangerousAcceptAnyServerCertificateValidator (#36305)
Stephen Toub [Tue, 12 May 2020 22:48:53 +0000 (18:48 -0400)]
Fix nullable annotations on DangerousAcceptAnyServerCertificateValidator (#36305)

It should match ServerCertificateCustomValidationCallback.

4 years agoComment typos (#36296)
Aaron Hudon [Tue, 12 May 2020 21:29:36 +0000 (14:29 -0700)]
Comment typos (#36296)

4 years agoUse Publish target for self contained test apps (#36290)
Santiago Fernandez Madero [Tue, 12 May 2020 20:43:24 +0000 (13:43 -0700)]
Use Publish target for self contained test apps (#36290)

4 years agoRemove PlatformAbstractions from runtime tests. (#36243)
Eric Erhardt [Tue, 12 May 2020 20:09:17 +0000 (15:09 -0500)]
Remove PlatformAbstractions from runtime tests. (#36243)

* Remove PlatformAbstractions from runtime tests.

Contributes to #3470

4 years agoIgnore the private key handle cert property for persisted keys
Jeremy Barton [Tue, 12 May 2020 19:54:18 +0000 (12:54 -0700)]
Ignore the private key handle cert property for persisted keys

When a CERT_CONTEXT value has both property 2 (prov info) and property 78
(ncrypt key handle), prefer to load based on the property 2 state.
This avoids a scenario where calling Get[Algorithm]PrivateKey sets the
'CLR IsEphemeral' property on a persisted key, preventing future loads of that key.

An alternative approach of preferring the loaded key over the cold-load was
not selected to avoid value contamination of ephemeral properties set on the
CngKey object directly after the caller calls Get[Algorithm]PrivateKey.

4 years agoFix build break by bumping DependencyModel package version (#36285)
Eric Erhardt [Tue, 12 May 2020 18:04:48 +0000 (13:04 -0500)]
Fix build break by bumping DependencyModel package version (#36285)

4 years agoMinor MethodTable building optimization (#36283)
Jan Vorlicek [Tue, 12 May 2020 17:52:35 +0000 (19:52 +0200)]
Minor MethodTable building optimization (#36283)

When learning on how virtual method overriding is implemented in the
runtime, I've bumped into two places where we were calling
MapToImplSlotNumber twice in a row without any reason. Since this method
isn't trivial, it seems worth fixing.

4 years agoApply CA1835 - Prefer memory overloads for Stream.ReadAsync/WriteAsync (#35941)
Carlos Sanchez Lopez [Tue, 12 May 2020 17:43:28 +0000 (10:43 -0700)]
Apply CA1835 - Prefer memory overloads for Stream.ReadAsync/WriteAsync (#35941)

* Apply CA1835 Roslyn fixes on .NET Libraries
- Prefer the Stream.ReadAsync and Stream.WriteAsync memory overloads.
- Unit test fix suggested by buyaa-n to adjust the usage of these overloads.

* Additional missing unit test overload for ReadOnlyMemory

4 years ago[mono] Don't throw inheritance error on interfaces in IsDefined (#35516)
Ryan Lucia [Tue, 12 May 2020 17:16:16 +0000 (13:16 -0400)]
[mono] Don't throw inheritance error on interfaces in IsDefined (#35516)

Issue is very similar to the one fixed in https://github.com/dotnet/runtime/commit/3df21ae60ec7de12abc77f4cc329903abe9ea542. When adding the error messages, we were too strict on when to throw. This should hopefully avoid all that by being significantly more lax.

Test moved to be in a location better suited to both examples.

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

4 years agoUse CopyTo(arr) instead of creating List<T> first (#36228)
Youssef Victor [Tue, 12 May 2020 16:50:06 +0000 (18:50 +0200)]
Use CopyTo(arr) instead of creating List<T> first (#36228)

* Use LINQ ToArray

* Update RoType.cs

* Update RoType.cs

* Update src/libraries/System.Reflection.MetadataLoadContext/src/System/Reflection/TypeLoading/Types/RoType.cs

Co-authored-by: Stephen Toub <stoub@microsoft.com>
* Fix whitespace causing analyzer warnings

Co-authored-by: Stephen Toub <stoub@microsoft.com>
4 years agoUpdate testing.md (#36286)
Santiago Fernandez Madero [Tue, 12 May 2020 16:49:05 +0000 (09:49 -0700)]
Update testing.md (#36286)

4 years ago[master] Update dependencies from 4 repositories (#36279)
dotnet-maestro[bot] [Tue, 12 May 2020 16:48:50 +0000 (12:48 -0400)]
[master] Update dependencies from 4 repositories (#36279)

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

- Microsoft.DotNet.XUnitExtensions: 5.0.0-beta.20256.5 -> 5.0.0-beta.20258.8
- Microsoft.DotNet.VersionTools.Tasks: 5.0.0-beta.20256.5 -> 5.0.0-beta.20258.8
- Microsoft.DotNet.ApiCompat: 5.0.0-beta.20256.5 -> 5.0.0-beta.20258.8
- Microsoft.DotNet.Arcade.Sdk: 5.0.0-beta.20256.5 -> 5.0.0-beta.20258.8
- Microsoft.DotNet.Build.Tasks.Feed: 5.0.0-beta.20256.5 -> 5.0.0-beta.20258.8
- Microsoft.DotNet.Build.Tasks.Packaging: 5.0.0-beta.20256.5 -> 5.0.0-beta.20258.8
- Microsoft.DotNet.Build.Tasks.SharedFramework.Sdk: 5.0.0-beta.20256.5 -> 5.0.0-beta.20258.8
- Microsoft.DotNet.Build.Tasks.TargetFramework.Sdk: 5.0.0-beta.20256.5 -> 5.0.0-beta.20258.8
- Microsoft.DotNet.CodeAnalysis: 5.0.0-beta.20256.5 -> 5.0.0-beta.20258.8
- Microsoft.DotNet.XUnitConsoleRunner: 2.5.1-beta.20256.5 -> 2.5.1-beta.20258.8
- Microsoft.DotNet.Helix.Sdk: 5.0.0-beta.20256.5 -> 5.0.0-beta.20258.8
- Microsoft.DotNet.RemoteExecutor: 5.0.0-beta.20256.5 -> 5.0.0-beta.20258.8
- Microsoft.DotNet.GenFacades: 5.0.0-beta.20256.5 -> 5.0.0-beta.20258.8

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

- Microsoft.NET.ILLink.Tasks: 5.0.0-preview.3.20257.4 -> 5.0.0-preview.3.20261.2

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

- runtime.linux-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools: 6.0.1-alpha.1.20261.1 -> 6.0.1-alpha.1.20261.3
- runtime.win-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools: 6.0.1-alpha.1.20261.1 -> 6.0.1-alpha.1.20261.3
- runtime.win-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk: 6.0.1-alpha.1.20261.1 -> 6.0.1-alpha.1.20261.3
- runtime.osx.10.12-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools: 6.0.1-alpha.1.20261.1 -> 6.0.1-alpha.1.20261.3
- runtime.osx.10.12-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk: 6.0.1-alpha.1.20261.1 -> 6.0.1-alpha.1.20261.3
- runtime.linux-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk: 6.0.1-alpha.1.20261.1 -> 6.0.1-alpha.1.20261.3

* Update dependencies from https://github.com/dotnet/xharness build 20200511.4

- Microsoft.DotNet.XHarness.Tests.Runners: 1.0.0-prerelease.20257.4 -> 1.0.0-prerelease.20261.4

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
4 years agoEnsure Process.ProcessName doesn't change when setting Thread.Name on Linux (#34064)
Tom Deseyn [Tue, 12 May 2020 14:08:50 +0000 (16:08 +0200)]
Ensure Process.ProcessName doesn't change when setting Thread.Name on Linux (#34064)

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

This issue is a side-effect of adding support for setting thread names on Linux in https://github.com/dotnet/coreclr/pull/27182.

Co-authored-by: Dan Moseley <danmose@microsoft.com>
Co-authored-by: Aleksey Kliger (λgeek) <akliger@gmail.com>
4 years agoAdd configurations for SunOS CoreCLR managed build (#36266)
Adeel Mujahid [Tue, 12 May 2020 13:45:02 +0000 (16:45 +0300)]
Add configurations for SunOS CoreCLR managed build (#36266)

4 years agoBuild tests as self contained apps for mobile targets (#36262)
Santiago Fernandez Madero [Tue, 12 May 2020 11:47:59 +0000 (04:47 -0700)]
Build tests as self contained apps for mobile targets (#36262)

This uses the SDK to publish tests as self contained apps before building the app bundle using the built runtime pack.

I moved the `RunTests.sh` output path to `BundleDir` as whenever we start sending to helix, there is no need to .zip up the whole `OutDir` as we can just send the bundle + `RunTests.sh` script.

4 years agoMerge pull request #35683 from krwq/nullable-xml-2
Krzysztof Wicher [Tue, 12 May 2020 08:29:47 +0000 (01:29 -0700)]
Merge pull request #35683 from krwq/nullable-xml-2

Nullable: System.Xml, part 2

4 years agoBuild WASM runtimes (#35566)
Zoltan Varga [Tue, 12 May 2020 07:29:02 +0000 (03:29 -0400)]
Build WASM runtimes (#35566)

4 years agoFix vs testing link (#36261)
Sean Hall [Tue, 12 May 2020 06:24:02 +0000 (16:24 +1000)]
Fix vs testing link (#36261)

4 years agoHandle struct marshal stubs in ILStubManager::TraceManager. (#36249)
Jeremy Koritzinsky [Tue, 12 May 2020 05:18:17 +0000 (22:18 -0700)]
Handle struct marshal stubs in ILStubManager::TraceManager. (#36249)

Fixes #36248

4 years agodisable ServerAsyncAuthenticate_MismatchProtocols_Fails again (#36250)
Tomas Weinfurt [Tue, 12 May 2020 01:48:54 +0000 (18:48 -0700)]
disable ServerAsyncAuthenticate_MismatchProtocols_Fails again (#36250)

4 years ago[ARM64] Implement Duplicate and DuplicateSelectedScalar (#36144)
Tanner Gooding [Tue, 12 May 2020 01:32:04 +0000 (18:32 -0700)]
[ARM64] Implement Duplicate and DuplicateSelectedScalar (#36144)

* Adding support for DuplicateToVector64 and DuplicateToVector128 to Arm.AdvSimd and Arm.AdvSimd.Arm64

* Adding tests for DuplicateToVector64 and DuplicateToVector128

* Adding support for DuplicateSelectedScalarToVector64 and DuplicateSelectedScalarToVector128 to Arm.AdvSimd and Arm.AdvSimd.Arm64

* Adding tests for DuplicateSelectedScalarToVector64 and DuplicateSelectedScalarToVector128

* Regenerating tests for the newly added HWIntrinsics

* Ensure parentheses exist

* Removing the AdvSimd.Arm64 hwintrinsiclist entry for DuplicateToVector64

* Removing the rest of the NI_AdvSimd_arm64_DuplicateToVector64 usages and clarifying a comment

* Moving break outside the braces for consistency

* Removing another Arm64.DuplicateToVector64

* Removing the AdvSimd.Arm64.DuplicateToVector64 tests

* Adding tests covering DuplicateToVector64/DuplicateToVector128 immediate inputs

* Regenerating the ARM64 HWIntrinsic tests

* Fixing the DuplicateToVector immediate tests

* Regenerating the DuplicateToVector immediate tests

4 years agoDelete outdated todo comment (#36224)
Youssef Victor [Tue, 12 May 2020 01:12:22 +0000 (03:12 +0200)]
Delete outdated todo comment (#36224)

4 years agoupdate branding to preview6 (#36247)
Anirudh Agnihotry [Tue, 12 May 2020 00:56:45 +0000 (17:56 -0700)]
update branding to preview6 (#36247)

4 years agoReduce DebugInfoTable size (#36174)
Simon Nattress [Mon, 11 May 2020 23:35:06 +0000 (16:35 -0700)]
Reduce DebugInfoTable size (#36174)

The DebugInfoTableNode contains an array of native format vertices that currently are not unified. Many methods have identical debug info blobs so they can be collapsed to save output binary size. For identical debug info blobs, pass the same byte array reference to the native format writer which will unify on the object reference.

In the framework composite image for example, 70% of the debug infos are duplicates. Removing the duplicates reduces the composite image size by 5%.

4 years agoFix empty ParamName in ArgumentException (#36208)
Youssef Victor [Mon, 11 May 2020 23:34:17 +0000 (01:34 +0200)]
Fix empty ParamName in ArgumentException (#36208)

* Update reflectioninvocation.cpp

* Update TypeInfoTests.cs

* Update EnumConverterTest.cs

4 years agoFix up nint code after latest changes to use compiler nint. (#36220)
Eric Erhardt [Mon, 11 May 2020 22:02:42 +0000 (17:02 -0500)]
Fix up nint code after latest changes to use compiler nint. (#36220)

4 years ago[testing] Rename Prop AppleTestBuilderDir to AppleAppBuilderDir (#36227)
Mitchell Hwang [Mon, 11 May 2020 21:57:51 +0000 (17:57 -0400)]
[testing] Rename Prop AppleTestBuilderDir to AppleAppBuilderDir (#36227)

Co-authored-by: Mitchell Hwang <mihw@microsoft.com>
4 years agoRemove EmbeddedResourceUseDependentUponConvention (#36140)
Viktor Hofer [Mon, 11 May 2020 21:37:25 +0000 (23:37 +0200)]
Remove EmbeddedResourceUseDependentUponConvention (#36140)

Underlying issue is fixed: https://github.com/microsoft/msbuild/issues/4740

4 years agoUse already defined generateAssemblyReferenceSource rather defining a new target...
Anirudh Agnihotry [Mon, 11 May 2020 20:59:11 +0000 (13:59 -0700)]
Use already defined generateAssemblyReferenceSource rather defining a new target (#35818)

* use arcade target

* extra space

* fixes generation of reference src from runtime projects

* run target to get genapi

* use referencePath to get references

* adding  GenerateReferenceSource target

* added the target name

4 years agoSetup pr and batch runs for dev/infrsatructure (#36218)
Jarret Shook [Mon, 11 May 2020 20:01:19 +0000 (13:01 -0700)]
Setup pr and batch runs for dev/infrsatructure (#36218)

4 years agoEnsure we mark op2 as delayFree if it is rmw and the parent node returns a non-SIMD...
Tanner Gooding [Mon, 11 May 2020 19:43:07 +0000 (12:43 -0700)]
Ensure we mark op2 as delayFree if it is rmw and the parent node returns a non-SIMD type (#36226)

4 years agoUpdate the mscorlib.md document. (#36225)
Aaron Robinson [Mon, 11 May 2020 19:29:42 +0000 (12:29 -0700)]
Update the mscorlib.md document. (#36225)

Rename mscorlib.md to corelib.md.
Remove no longer relevant details.

4 years agoFix iOS and Android samples (#36223)
Egor Bogatov [Mon, 11 May 2020 18:47:13 +0000 (21:47 +0300)]
Fix iOS and Android samples (#36223)

4 years agoMake global ComWrappers for marshalling respect requested IID (#36054)
Elinor Fung [Mon, 11 May 2020 18:06:12 +0000 (11:06 -0700)]
Make global ComWrappers for marshalling respect requested IID (#36054)

4 years agoInclude Content-Type in exception in ReadFromJsonAsync (#36186)
Youssef Victor [Mon, 11 May 2020 18:05:14 +0000 (20:05 +0200)]
Include Content-Type in exception in ReadFromJsonAsync (#36186)

* Update Strings.resx

* Update HttpContentJsonExtensions.cs

4 years agoExpose the parsed signature in structured format (#36190)
Andrew Au [Mon, 11 May 2020 18:00:41 +0000 (11:00 -0700)]
Expose the parsed signature in structured format (#36190)

4 years agoUse TargetFramework conditions consistently in libraries (#35956)
Viktor Hofer [Mon, 11 May 2020 18:00:11 +0000 (20:00 +0200)]
Use TargetFramework conditions consistently in libraries (#35956)

* Use TargetFramework condition consistently in libs

* Add docs section to describe the guideline

* Update Microsoft.Extensions.DependencyInjection.csproj

* Outline TargetFramework DesingTimeBuild issue

* Update Microsoft.Extensions.DependencyInjection.csproj

4 years agoUpdate dependencies from https://github.com/dotnet/llvm-project build 20200511.1...
dotnet-maestro[bot] [Mon, 11 May 2020 17:34:48 +0000 (17:34 +0000)]
Update dependencies from https://github.com/dotnet/llvm-project build 20200511.1 (#36210)

- runtime.linux-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools: 6.0.1-alpha.1.20254.1 -> 6.0.1-alpha.1.20261.1
- runtime.win-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools: 6.0.1-alpha.1.20254.1 -> 6.0.1-alpha.1.20261.1
- runtime.win-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk: 6.0.1-alpha.1.20254.1 -> 6.0.1-alpha.1.20261.1
- runtime.osx.10.12-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools: 6.0.1-alpha.1.20254.1 -> 6.0.1-alpha.1.20261.1
- runtime.osx.10.12-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk: 6.0.1-alpha.1.20254.1 -> 6.0.1-alpha.1.20261.1
- runtime.linux-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk: 6.0.1-alpha.1.20254.1 -> 6.0.1-alpha.1.20261.1

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
4 years agoAdd invalidation to DTFI's SetAllDateTimePatterns (#34438)
ts2do [Mon, 11 May 2020 17:32:59 +0000 (12:32 -0500)]
Add invalidation to DTFI's SetAllDateTimePatterns (#34438)

Invalidate derived patterns to match the behavior of invoking the corresponding property setters

4 years agoRevert "Revert "Remove superflous CheckReleased call which will slow down Event Log...
Tarek Mahmoud Sayed [Mon, 11 May 2020 17:29:17 +0000 (10:29 -0700)]
Revert "Revert "Remove superflous CheckReleased call which will slow down Event Log Reading up to 20x times. (#35911)" (#36143)" (#36188)

This reverts commit ca8c9dea8e30a9701160e4cd61b5b26f209499ff.

4 years agoPreempt Watson exception handling (#36179)
Manish Godse [Mon, 11 May 2020 17:24:37 +0000 (10:24 -0700)]
Preempt Watson exception handling (#36179)

* switch to preemp GC before DW version lookup

* move preempt to PopulateBucketParameters

* Adding GC_TRIGGERS to callchain of CaptureUnhandledInfoForWatson

* explictly adding PREEMPTIVE to all DwGetFileVersionInfo codepaths.

4 years agoAdd some upcoming distro RIDs
Omair Majid [Mon, 11 May 2020 15:58:20 +0000 (11:58 -0400)]
Add some upcoming distro RIDs

This adds some RIDs that we know are current/upcoming:

- Fedora 33 is in development, and the version after this is most likely
  going to be Fedora 34. Adding this RID now, so we can get this RID in
  all current releases when it comes time to build on Fedora 34

- RHEL has generally committed to doing a major release every 3 years.
  With RHEL 8 released in 2019, RHEL 9 is under development. There's
  even a plan on how to create that from Fedora here:
  https://fedoraproject.org/wiki/Changes/ELN_Buildroot_and_Compose

- If there's a RHEL 9, there will most likely be an equivalent CentOS 9.
  Lets add that too.

- CentOS 7 has an aarch64 port. As does CentOS 8.

4 years agoImprove deserialization perf for case-insensitive and missing-property cases (#35848)
Steve Harter [Mon, 11 May 2020 15:54:41 +0000 (10:54 -0500)]
Improve deserialization perf for case-insensitive and missing-property cases (#35848)

4 years agoReturn the correct OSVersion on OSX like systems. (#36029)
Eric Erhardt [Mon, 11 May 2020 14:47:01 +0000 (09:47 -0500)]
Return the correct OSVersion on OSX like systems. (#36029)

* Return the correct OSVersion on OSX like systems.

Fix #34977

* Rename files to not have Linux when they aren't Linux specific.

* Assert OSVersion Build number is valid.

* PR feedback

Move interop code to Common\src\Interop.
Specify the full path to libobjc.dylib.
Fix objc_msgSend_stret for ARM64.

* Specify full path to libproc.dylib.

Fix #24095

4 years agoPort GC changes from dotnet/corert (#36197)
Jan Kotas [Mon, 11 May 2020 10:57:07 +0000 (03:57 -0700)]
Port GC changes from dotnet/corert (#36197)

4 years ago[mono] Fix musl PowerPC build (#36162)
monojenkins [Mon, 11 May 2020 08:35:19 +0000 (04:35 -0400)]
[mono] Fix musl PowerPC build (#36162)

PT_NIP and friends are in this kernel header, but glibc includes it
somewhere in the chain implicitly. musl doesn't. Fix that.

4 years agoUpdate ryujit-tutorial.md (#36191)
Jan Kotas [Mon, 11 May 2020 05:29:50 +0000 (22:29 -0700)]
Update ryujit-tutorial.md (#36191)

4 years agoAdding unit test to provoke exception using Sch_WhiteSpaceRestriction… (#35013)
mrj001 [Mon, 11 May 2020 02:41:54 +0000 (20:41 -0600)]
Adding unit test to provoke exception using Sch_WhiteSpaceRestriction… (#35013)

* Adding unit test to provoke exception using Sch_WhiteSpaceRestriction1 as its message.

4 years ago[tests] Adjustments to interp disabled tests (#36178)
monojenkins [Sun, 10 May 2020 21:12:15 +0000 (17:12 -0400)]
[tests] Adjustments to interp disabled tests (#36178)

Co-authored-by: BrzVlad <BrzVlad@users.noreply.github.com>
4 years agoFix sync call in XContainer.ReadContentFromAsync (#35789)
Emmanuel André [Sun, 10 May 2020 20:37:54 +0000 (22:37 +0200)]
Fix sync call in XContainer.ReadContentFromAsync (#35789)

* Fix sync call in XContainer.ReadContentFromAsync

4 years agoAdd tests for changes in #34438 (#36166)
ts2do [Sun, 10 May 2020 19:17:15 +0000 (14:17 -0500)]
Add tests for changes in #34438 (#36166)

4 years agoRemove CompareOrdinalEx (#36184)
Egor Bogatov [Sun, 10 May 2020 15:59:43 +0000 (18:59 +0300)]
Remove CompareOrdinalEx (#36184)

4 years agoUpdate dependencies from https://github.com/dotnet/runtime-assets build 20200508...
dotnet-maestro[bot] [Sun, 10 May 2020 11:13:17 +0000 (07:13 -0400)]
Update dependencies from https://github.com/dotnet/runtime-assets build 20200508.1 (#36161)

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

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
4 years agoFix mobile testing and do some extra cleanup in variables (#36157)
Santiago Fernandez Madero [Sun, 10 May 2020 10:44:54 +0000 (03:44 -0700)]
Fix mobile testing and do some extra cleanup in variables (#36157)

4 years agoRemove unnecessary static array from FrameworkName (#36176)
Stephen Toub [Sun, 10 May 2020 10:18:20 +0000 (06:18 -0400)]
Remove unnecessary static array from FrameworkName (#36176)

Now that there's a char overload of Split, we don't need the cached array.

4 years agoReenable iOS_arm builds (#34942)
Alexander Köplinger [Sun, 10 May 2020 08:38:48 +0000 (10:38 +0200)]
Reenable iOS_arm builds (#34942)

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

4 years agoFix buffer overrun in JIT for Vector256<T> types on ARM64. (#35864)
Anton Lapounov [Sun, 10 May 2020 01:41:20 +0000 (18:41 -0700)]
Fix buffer overrun in JIT for Vector256<T> types on ARM64. (#35864)

Stop recognizing Vector256<T> types as intrinsic for ARM64 in Crossgen2.

4 years agoEnable Common Runtime Tests for Mono on Linux-Arm64 in CI (#35366)
Nathan Ricci [Sat, 9 May 2020 23:31:27 +0000 (19:31 -0400)]
Enable Common Runtime Tests for Mono on Linux-Arm64 in CI (#35366)

Enable runtime tests on Linux-amd64 running Mono. Also add issues to issues.targets for the same.

4 years agoMake Uri Thread-Safe (#33042)
Miha Zupan [Sat, 9 May 2020 19:26:16 +0000 (21:26 +0200)]
Make Uri Thread-Safe (#33042)

* Do not lock on string in Uri

* Make Uri thread-safe without locks

*A lock may still be used for custom parsers

* Update comments

* Use existing style for enum values

* Add a comment about locking for custom parsers

* Add a comment about DebugSetLeftCtor usage

* Add trailing dot in exception message

* Fix typos

* Fix typo

Co-authored-by: Stephen Toub <stoub@microsoft.com>
Co-authored-by: Stephen Toub <stoub@microsoft.com>
4 years agoUse C# compiler provided nint/nuint (#36159)
Jan Kotas [Sat, 9 May 2020 14:41:33 +0000 (07:41 -0700)]
Use C# compiler provided nint/nuint (#36159)

4 years agoincrease FailingTestTimeoutMiliseconds for Ssl server tests. (#36101)
Tomas Weinfurt [Sat, 9 May 2020 12:57:20 +0000 (05:57 -0700)]
increase FailingTestTimeoutMiliseconds for Ssl server tests. (#36101)

* increase FailingTestTimeoutMiliseconds

* use standard ITestOutputHelper helper

* set timeout to to 500ms

* rework protocol mismatch

Co-authored-by: Tomas Weinfurt <furt@Shining.local>
4 years agoadd platform to two tests to avoid test skip on Unix (#36082)
Tomas Weinfurt [Sat, 9 May 2020 12:55:15 +0000 (05:55 -0700)]
add platform to two tests to avoid test skip on Unix (#36082)

4 years agoApply Regex starting loop optimization to non-atomic loops as well (#35936)
Stephen Toub [Sat, 9 May 2020 10:12:15 +0000 (06:12 -0400)]
Apply Regex starting loop optimization to non-atomic loops as well (#35936)

* Apply Regex starting loop optimization to non-atomic loops as well

* Remove min iteration restriction

The node.N > 0 restriction isn't necessary, and prevents this optimization from being used with * loops.    Worst case, the loop doesn't match anything, and we pay to overwrite the starting position with itself.  Best case, we eliminate a ton of cost.

4 years ago[interp] Fix sdks build (#36121)
monojenkins [Sat, 9 May 2020 08:26:43 +0000 (04:26 -0400)]
[interp] Fix sdks build (#36121)

Co-authored-by: BrzVlad <BrzVlad@users.noreply.github.com>
4 years agoFixing test failing on arm64 (#36145)
Jose Perez Rodriguez [Sat, 9 May 2020 05:20:34 +0000 (22:20 -0700)]
Fixing test failing on arm64 (#36145)

4 years agoFinish the other part of the GCTotalPhysicalMemory config implementation (#36152)
Jan Kotas [Sat, 9 May 2020 04:39:46 +0000 (21:39 -0700)]
Finish the other part of the GCTotalPhysicalMemory config implementation (#36152)

* Finish the other part of the GCTotalPhysicalMemory config implementation

The total physical memory specified by the GCTotalPhysicalMemory config
needs to communicated over to the VM side for memory load calculation.
Otherwise inside GC we are using the correct physical memory specified,
but when we ask for the memory load it's still based on the total available
memory.

* Delete unnecessary delay-loading of kernel32.dll

* Avoid mutable restricted memory limit inside OS PAL

Co-authored-by: Maoni0 <maonis@microsoft.com>
4 years agoReact to latest Roslyn nullability changes (#36104)
Levi Broderick [Sat, 9 May 2020 03:12:52 +0000 (20:12 -0700)]
React to latest Roslyn nullability changes (#36104)

Also updates the compiler toolset to the latest version

4 years agoNaricc/test mono is mono (#36079)
Nathan Ricci [Fri, 8 May 2020 21:58:24 +0000 (17:58 -0400)]
Naricc/test mono is mono (#36079)

Add test to test if we are running mono.

4 years agoRevert "Remove superflous CheckReleased call which will slow down Event Log Reading...
Tarek Mahmoud Sayed [Fri, 8 May 2020 21:30:35 +0000 (14:30 -0700)]
Revert "Remove superflous CheckReleased call which will slow down Event Log Reading up to 20x times. (#35911)" (#36143)

This reverts commit 4602a61526631a5b29d451b40be3e3e321b86c00.

4 years agoEnable VS Test Explorer without the -vs switch (#36126)
Viktor Hofer [Fri, 8 May 2020 20:12:25 +0000 (22:12 +0200)]
Enable VS Test Explorer without the -vs switch (#36126)

* Enable VS Test Explorer without the -vs switch

4 years agoAdd windows 8 and windows 7 testing for PRs in a reduced way (#36096)
Santiago Fernandez Madero [Fri, 8 May 2020 19:07:15 +0000 (12:07 -0700)]
Add windows 8 and windows 7 testing for PRs in a reduced way (#36096)

4 years agoDocument F5 and Test Explorer prerequisites (#36117)
Viktor Hofer [Fri, 8 May 2020 19:03:17 +0000 (21:03 +0200)]
Document F5 and Test Explorer prerequisites (#36117)

* Document F5 and Test Explorer prerequisites

* Update docs/workflow/testing/visualstudio.md

Co-authored-by: Alexander Köplinger <alex.koeplinger@outlook.com>
4 years agoFix reverse marshalling of refs to blittable types (#8140) (#36119)
Jan Kotas [Fri, 8 May 2020 18:34:07 +0000 (11:34 -0700)]
Fix reverse marshalling of refs to blittable types (#8140) (#36119)

Hit in selfhosted ilc.exe. In JitInterface we have a couple cases where we do reverse p/invoke with a delegate that has a ref parameter. Sometimes the `ref` is null (and we don't touch it).

The marshaller was trying to make a copy of the pointed to value, NullRefing in the process because the pointer was null. We don't actually need to make a copy because the value is blittable.

Co-authored-by: Michal Strehovský <MichalStrehovsky@users.noreply.github.com>
4 years agoMerge pull request #35826 from layomia/converter_handle_null
Layomi Akinrinade [Fri, 8 May 2020 17:56:28 +0000 (13:56 -0400)]
Merge pull request #35826 from layomia/converter_handle_null

Add opt-in for converters to handle null

4 years agoMerge pull request #32107 from YohDeadfall/fix-hidden-props
Layomi Akinrinade [Fri, 8 May 2020 17:55:20 +0000 (13:55 -0400)]
Merge pull request #32107 from YohDeadfall/fix-hidden-props

Fixed serialization of hidden base class members

4 years agoAdd mono performance runs (#34825)
Drew Scoggins [Fri, 8 May 2020 17:50:13 +0000 (10:50 -0700)]
Add mono performance runs (#34825)

* Add mono perf job

* Move runtimeFlavor to the right level

* chnage variable access

* Change condition

* Add steps to download mono and build the patched dotnet

* Change variable access

* Pass variables directly

* Plumb through mono path to runner

* Fix parameter reference

* Fix variables access?

* Fix typo

* Fix pathing issue

* Add log saving for publish to helix step

* Fix variable in shell script

* Fix up mv command and publish logs step

* Change runkind and add Windows runs

* Add Windows mono build

* Fixup parsing

* Remove Windows runs for now

* Switch to using build command to generate mono testhost

* Fixup parens

* Forgot to add a slash

* Add Windows runs and fix pathing issue

* Add backslash for Windows and -r for cp on Linux

* Switch to using corerun argument

* Switch to monopath

* Use CoreRun

* Remove mono property and use corerun instead

* Fixing closing tags

* Change xcopy to copy

* Add llvm config flag

* Add AOT and Interpreter config flags

* Change order to ensure config gets added

* Change order

* Add exlusion filter for Perf_Image_Load tests

* Add more to exclusion list

* Remove Windows legs for now

4 years ago[master] Update dependencies from 4 repositories (#36111)
dotnet-maestro[bot] [Fri, 8 May 2020 17:03:48 +0000 (17:03 +0000)]
[master] Update dependencies from 4 repositories (#36111)

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

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

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

- Microsoft.NET.ILLink.Tasks: 5.0.0-preview.3.20256.5 -> 5.0.0-preview.3.20257.4

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

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

* Update dependencies from https://github.com/dotnet/xharness build 20200507.4

- Microsoft.DotNet.XHarness.Tests.Runners: 1.0.0-prerelease.20256.2 -> 1.0.0-prerelease.20257.4

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
4 years agoModified PR for reverse diagnostics server (#35850)
John Salem [Fri, 8 May 2020 16:50:00 +0000 (09:50 -0700)]
Modified PR for reverse diagnostics server (#35850)

Remove attempts to do too much cleanup on process shutdown, e.g., don't attempt to close handles or cancel overlapped IO

4 years agoOptimize Vector128 and Vector256.Create methods (#35857)
Tanner Gooding [Fri, 8 May 2020 16:09:12 +0000 (09:09 -0700)]
Optimize Vector128 and Vector256.Create methods (#35857)

* Updating Vector128.Create(T value) to be intrinsic

* Updating Vector128.Create(T, ..., T) to be intrinsic

* Updating Vector256.Create(T) and Vector256.Create(T, ..., T) to be intrinsic

* Applying formatting patch

* Adding additional comments explaining how the Vector128.Create and Vector256.Create calls are lowered

* Add an assert that argCnt is as expected for LowerHWIntrinsicCreate

* Applying formatting patch

* Use unsigned rather than signed types in LowerHWIntrinsicCreate

* Have HWIntrinsicInfo::lookupId take the number of arguments into account

* Adjusting Vector128.Create(T, ..., T) to not be recursive on ARM64

* Fixing MyICJI::allocMem in superpmi to respect certain CorJitAllocMemFlag

* Avoid an implicit downcast

4 years agoremove unused locals: System.Private.DataContractSerialization (#35958)
Nikiforov Alexey [Fri, 8 May 2020 15:29:14 +0000 (18:29 +0300)]
remove unused locals: System.Private.DataContractSerialization (#35958)

4 years agoStruct Improvements (#35544)
Carol Eidt [Fri, 8 May 2020 14:58:10 +0000 (07:58 -0700)]
Struct Improvements (#35544)

* Struct Improvements

- If we have a struct with a single field we can reference it as the full size of the struct.
- Eliminate old code for an integer zero RHS with a SIMD12 LHS, and unify the codegen for zero-init for SIMD8 and SIMD12 (between block init and assignment of SIMD init of 0)

4 years ago[interp] Add x86 support (#35966)
monojenkins [Fri, 8 May 2020 14:44:14 +0000 (10:44 -0400)]
[interp] Add x86 support (#35966)

This mainly consists of a trampoline that is used when calling from interp into native code, as well as the call convention logic that initializes the CallContext structure (which is passed to the trampoline). On other platforms we also have a single trampoline used when entering interpreter code. That trampoline works in a similar way and its purpose is to avoid compilation of all possible interp entry signatures, which is problematic on full aot scenarios. Given the interp x86 support is currently provided for android, we can avoid using that trampoline for now and use the per signature jit compiled interp_in_wrappers instead.

The few disabled interp tests are the same as on amd64.

We only support pinvoke into cdecl functions.

Co-authored-by: BrzVlad <BrzVlad@users.noreply.github.com>
4 years agoRemove MinHandles and OutstandingHandles logic from SocketAsyncEngine (#36019)
Adam Sitnik [Fri, 8 May 2020 14:28:25 +0000 (16:28 +0200)]
Remove MinHandles and OutstandingHandles logic from SocketAsyncEngine (#36019)

* remove MinHandles logic from SocketAsyncEngine (always use Round-robin)

* remove _outstandingHandles

* add Debug.Assert to make sure that we always succeed in adding a new context to the dcitionary

* remove duplicated Debug.Assert (checked few lines above)

4 years agodisable sslv2 tests for now (#36102)
Tomas Weinfurt [Fri, 8 May 2020 13:21:56 +0000 (06:21 -0700)]
disable sslv2 tests for now (#36102)

Co-authored-by: Tomas Weinfurt <furt@Shining.local>
4 years agoMigrating Apple and Android AppBuilder and TestRunner binaries to Artifacts/Bin ...
Mitchell Hwang [Fri, 8 May 2020 12:56:03 +0000 (08:56 -0400)]
Migrating Apple and Android AppBuilder and TestRunner binaries to Artifacts/Bin (#35909)

This PR is a part of #35123.

This PR achieves two things:
1. Migrates Apple and Android AppBuilder and TestRunner binaries to `<repo-root>/artifacts/bin`
2. Add property paths for Apple and Android AppBuilder and TestRunner projects and binaries

After changes, when building `./build.sh -os iOS -subset Mono+Libs+Libs.Tests`, binary files are no longer produced in `<repo-root>/src/mono/msbuild/`. Instead, they can be found in `<repo-root>/artifacts/bin/`

4 years ago[interp] Fix memory overwrite during pinvoke r4 parameter passing. (#35835)
monojenkins [Fri, 8 May 2020 09:36:09 +0000 (05:36 -0400)]
[interp] Fix memory overwrite during pinvoke r4 parameter passing. (#35835)

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

Co-authored-by: vargaz <vargaz@users.noreply.github.com>
4 years agoMigrating libraries props into both iOS and Android test runner workflow (#35535)
Mitchell Hwang [Fri, 8 May 2020 08:34:09 +0000 (04:34 -0400)]
Migrating libraries props into both iOS and Android test runner workflow (#35535)

This PR targets "Migrate existing props and targets into the libraries test build flow" in #35123.

The changes are primarily simplifying hard-coded paths to the `lib-runtime-packs` `native` and `lib` sub-directories by extending runtime pack path properties.

Co-authored-by: Mitchell Hwang <mihw@microsoft.com>
4 years agoMix installer build configurations in PRs as all are Debug now (#36081)
Santiago Fernandez Madero [Fri, 8 May 2020 06:41:20 +0000 (23:41 -0700)]
Mix installer build configurations in PRs as all are Debug now (#36081)

4 years agoDisable BerConverterTest in arm64 (#36088)
Santiago Fernandez Madero [Fri, 8 May 2020 05:50:10 +0000 (22:50 -0700)]
Disable BerConverterTest in arm64 (#36088)

* Disable BerConverterTest in arm64

* Disable just for failing format

4 years agoOptimize BitOperations.PopCount() with arm64 intrinsics (#35636)
Kunal Pathak [Fri, 8 May 2020 05:32:10 +0000 (22:32 -0700)]
Optimize BitOperations.PopCount() with arm64 intrinsics (#35636)

* Intrinsicy BitOperations.PopCount() for arm64

Co-authored-by: Tanner Gooding <tagoo@outlook.com>
4 years agoDisable NonDisposedSocket_SafeHandlesCollected in AnyUnix (#36099)
Santiago Fernandez Madero [Fri, 8 May 2020 05:10:50 +0000 (22:10 -0700)]
Disable NonDisposedSocket_SafeHandlesCollected in AnyUnix (#36099)

4 years agoDisable Microsoft.Extensions.Caching.Memory.Tests on Mono (#36083)
Santiago Fernandez Madero [Fri, 8 May 2020 03:52:10 +0000 (20:52 -0700)]
Disable Microsoft.Extensions.Caching.Memory.Tests on Mono (#36083)

4 years agoRevert "Build an apphost with hostfxr and hostpolicy linked in (#35368)" (#36076)
Santiago Fernandez Madero [Fri, 8 May 2020 03:19:20 +0000 (20:19 -0700)]
Revert "Build an apphost with hostfxr and hostpolicy linked in (#35368)" (#36076)

This reverts commit f6e5219b13f4bb9d6c1c9f80fd6ca6c594c6c7f8.

4 years agoAdd support for ComWrappers-based RCWs to the special native WeakReference support...
Jeremy Koritzinsky [Fri, 8 May 2020 02:20:23 +0000 (19:20 -0700)]
Add support for ComWrappers-based RCWs to the special native WeakReference support. (#35819)

* Add support for ComWrappers-based RCWs to the special native WeakReference support.

Rename the WinRT weak reference handle to "native COM weak reference" handle.

* Fix line endings.

* Fix line endings (try 2).

* Revert change to prebuilt idl

* Try updating prebuilt again.

* Remove accidental duplicate of the test.

* PR feedback.

* PR Feedback.

* React to global ComWrappers changes.

* Add back WinRT enum member to prebuilt idl.

* Add back old enum member to idl for backcompat.

* Change definition of enum member to explicitly assign the same value.

* Code cleanup and go down a non-allocating route when possible.

* Switch to preemptive mode for the QI call.

* Fix contracts

* Add a check before calling GetComWeakReference so we only call it when the object has interop info attached.

* Apply early check to WeakReference<T> as well.

* Make sure we only make one call to PassiveGetSyncBlock instead of 2.

* PR Feedback.

* ComWrappersNative::GetIdentityForObject can trigger GC since we transition to and from pre-emptive when calling into the external QI.