platform/upstream/dotnet/runtime.git
2 years agoAdd reminder for package authoring (#65480)
Dan Moseley [Thu, 17 Feb 2022 03:32:54 +0000 (20:32 -0700)]
Add reminder for package authoring (#65480)

2 years ago[JIT] More ARM64 comparison instruction optimizations with Vector.Zero (#64783)
Will Smith [Thu, 17 Feb 2022 02:32:20 +0000 (18:32 -0800)]
[JIT] More ARM64 comparison instruction optimizations with Vector.Zero   (#64783)

* Normalizing instructions with an implicit vector zero as the second operand

* Checking number of operands before looking at opernads

* Remove assert

* Check commutative flag

* Fixed commutative check

* Handling more HW intrinsics

* Finishing up

* Finishing up

* Formatting

* numOperands = 1

* Feedback

* Added HW_Flag_SupportsContainmentZero

* Added extra assert

* Removing flag and simplifying codegen for containment with zeros

2 years ago[mono][interp] Add checks for interpreter stack overflow. (#65315)
Zoltan Varga [Thu, 17 Feb 2022 02:02:19 +0000 (21:02 -0500)]
[mono][interp] Add checks for interpreter stack overflow. (#65315)

These could show up as random crashes esp. on wasm.

2 years ago[mono][jit] Compute the type of generic context used by static virtual calls properly...
Zoltan Varga [Thu, 17 Feb 2022 02:01:08 +0000 (21:01 -0500)]
[mono][jit] Compute the type of generic context used by static virtual calls properly. (#65459)

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

2 years agoupdate SSL tests to deal better with disabled protocols (#65120)
Tomas Weinfurt [Thu, 17 Feb 2022 01:26:59 +0000 (17:26 -0800)]
update SSL tests to deal better with disabled protocols (#65120)

* update SSL tests to deal better with disabled protocols

* Improve detection of Null encryption on Windows

* update expectation for Mismatched protocols

* update detection

* wrap win32 exception

* update ProtocolMismatchData sets

* remove debug print

* final cleanup

* generate mismatch data

* avoid SslProtocols.Default

2 years agoDisable component governance for musl runs (#65454)
Andy Gocke [Thu, 17 Feb 2022 01:20:00 +0000 (17:20 -0800)]
Disable component governance for musl runs (#65454)

2 years agoRemove or move some expensive low-value testing (#65453)
Andy Gocke [Thu, 17 Feb 2022 01:19:29 +0000 (17:19 -0800)]
Remove or move some expensive low-value testing (#65453)

When PGO was added, I added it in PR as well just to help with monitoring
At this point it's very stable and expensive to run, so we should probably move it out.

Single-file is still tested in our unit tests, but these runs were mainly to test the
compatibility of APIs with single-file. We've found that the analyzer does a pretty good
job of verifying that without testing, and we still have verification via NativeAOT, which
I think is a superset of the testing as a whole.

2 years agoFix PerformanceCounter's when running with Globalization Invariant Mode (#65414)
Tarek Mahmoud Sayed [Thu, 17 Feb 2022 00:54:55 +0000 (16:54 -0800)]
Fix PerformanceCounter's when running with Globalization Invariant Mode (#65414)

2 years ago[wasm] Disable aot tests failing due to OOM (#65413)
Ankit Jain [Thu, 17 Feb 2022 00:40:13 +0000 (19:40 -0500)]
[wasm] Disable aot tests failing due to OOM (#65413)

* [wasm] Disable aot tests failing due to OOM

- https://github.com/dotnet/runtime/issues/65356 - OOM while linking
    `System.Text.Json.SourceGeneration.Roslyn3.11.Tests`

- https://github.com/dotnet/runtime/issues/65411 - possible OOM when
  compiling `System.Text.Json.SourceGeneration.Roslyn4.0.Tests.dll.bc` -> `.o`
     `System.Text.Json.SourceGeneration.Roslyn4.0.Tests`

- https://github.com/dotnet/runtime/issues/61524 - OOM while linking
    `System.Text.Json.Tests`

* Disable System.Collections.Immutable.Tests due to #65335

2 years ago[MAUI][PERF] Reenable Maui w/o package injection (#65409)
Parker Bibus [Wed, 16 Feb 2022 23:56:21 +0000 (17:56 -0600)]
[MAUI][PERF] Reenable Maui w/o package injection (#65409)

* Reenable stuff for android startup.

* Disable package replacement and temporarily most of the perf.yml files.

* Reenable full perf.yml for final test.

2 years ago[LoongArch64] add gc directory for LoongArch64. (#63071)
Qiao Pengcheng [Wed, 16 Feb 2022 22:08:13 +0000 (06:08 +0800)]
[LoongArch64] add gc directory for LoongArch64. (#63071)

Co-authored-by: qiaopengcheng <qiaopengcheng-hf@loongson.cn>
2 years agoMerge a couple NativeAOT smoke tests (#65426)
Michal Strehovský [Wed, 16 Feb 2022 22:07:57 +0000 (07:07 +0900)]
Merge a couple NativeAOT smoke tests (#65426)

Shaves off a couple dozen seconds of test build time.

2 years ago[LoongArch64] add the `coreclr/unwinder/loongarch64` from the #62979. (#63489)
Qiao Pengcheng [Wed, 16 Feb 2022 20:34:06 +0000 (04:34 +0800)]
[LoongArch64] add the `coreclr/unwinder/loongarch64` from the #62979. (#63489)

* [LoongArch64] add the `coreclr/unwinder/loongarch64` from the #62979.

* [LoongArch64] replace the `__in` with `_In_`.

* [LoongArch64] update the version of the `LICENSE description`.

* [LoongArch64] update the macro-define for crossgen2.

* [LoongArch64] amend the comment notes.

Co-authored-by: qiaopengcheng <qiaopengcheng-hf@loongson.cn>
2 years agoProposed changes to ECMA 335 for ref field support (#63659)
David Wrighton [Wed, 16 Feb 2022 20:16:04 +0000 (12:16 -0800)]
Proposed changes to ECMA 335 for ref field support (#63659)

* Initial proposed changes for ref fields

* Fix end of line issue

* Update docs/design/specs/Ecma-335-Augments.md

Co-authored-by: Aaron Robinson <arobins@microsoft.com>
* Update local signature wording

Co-authored-by: Aaron Robinson <arobins@microsoft.com>
2 years agoGracefully emit a diagnostic when the GeneratedDllImport attribute didn't parse quite...
Jeremy Koritzinsky [Wed, 16 Feb 2022 19:51:17 +0000 (11:51 -0800)]
Gracefully emit a diagnostic when the GeneratedDllImport attribute didn't parse quite right and we don't have a valid AttributeData object (#65344)

2 years ago[main] Update dependencies from 9 repositories (#65252)
dotnet-maestro[bot] [Wed, 16 Feb 2022 19:00:47 +0000 (11:00 -0800)]
[main] Update dependencies from 9 repositories (#65252)

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

Microsoft.DotNet.XUnitConsoleRunner , Microsoft.DotNet.CodeAnalysis , Microsoft.DotNet.Build.Tasks.Workloads , Microsoft.DotNet.Build.Tasks.Templating , Microsoft.DotNet.Build.Tasks.Packaging , Microsoft.DotNet.Build.Tasks.Installers , Microsoft.DotNet.Build.Tasks.Feed , Microsoft.DotNet.Build.Tasks.Archives , Microsoft.DotNet.Arcade.Sdk , Microsoft.DotNet.ApiCompat , Microsoft.DotNet.XUnitExtensions , Microsoft.DotNet.GenAPI , Microsoft.DotNet.VersionTools.Tasks , Microsoft.DotNet.GenFacades , Microsoft.DotNet.SharedFramework.Sdk , Microsoft.DotNet.RemoteExecutor , Microsoft.DotNet.PackageTesting , Microsoft.DotNet.Helix.Sdk
 From Version 2.5.1-beta.22110.7 -> To Version 2.5.1-beta.22111.10

* Update dependencies from https://github.com/dotnet/emsdk build 20220211.1

Microsoft.NET.Workload.Emscripten.Manifest-7.0.100
 From Version 7.0.0-alpha.2.22104.1 -> To Version 7.0.0-alpha.2.22111.1

* Update dependencies from https://github.com/dotnet/roslyn-analyzers build 20220212.1

Microsoft.CodeAnalysis.NetAnalyzers
 From Version 7.0.0-preview1.22109.1 -> To Version 7.0.0-preview1.22112.1

* Update dependencies from https://github.com/dotnet/runtime build 20220213.2

Microsoft.NETCore.ILAsm , Microsoft.NETCore.DotNetHostPolicy , Microsoft.NETCore.DotNetHost , Microsoft.NETCore.App.Runtime.win-x64 , System.Runtime.CompilerServices.Unsafe , runtime.native.System.IO.Ports , Microsoft.NET.Sdk.IL , System.Text.Json
 From Version 7.0.0-preview.2.22103.2 -> To Version 7.0.0-preview.2.22113.2

* Update dependencies from https://github.com/dotnet/roslyn-analyzers build 20220213.1

Microsoft.CodeAnalysis.NetAnalyzers
 From Version 7.0.0-preview1.22109.1 -> To Version 7.0.0-preview1.22113.1

* Set warnaserror false for send to helix steps

* PR Feedback

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

Microsoft.DotNet.XUnitConsoleRunner , Microsoft.DotNet.CodeAnalysis , Microsoft.DotNet.Build.Tasks.Workloads , Microsoft.DotNet.Build.Tasks.Templating , Microsoft.DotNet.Build.Tasks.TargetFramework , Microsoft.DotNet.Build.Tasks.Packaging , Microsoft.DotNet.Build.Tasks.Installers , Microsoft.DotNet.Build.Tasks.Feed , Microsoft.DotNet.Build.Tasks.Archives , Microsoft.DotNet.Arcade.Sdk , Microsoft.DotNet.ApiCompat , Microsoft.DotNet.XUnitExtensions , Microsoft.DotNet.GenAPI , Microsoft.DotNet.VersionTools.Tasks , Microsoft.DotNet.GenFacades , Microsoft.DotNet.SharedFramework.Sdk , Microsoft.DotNet.RemoteExecutor , Microsoft.DotNet.PackageTesting , Microsoft.DotNet.Helix.Sdk
 From Version 2.5.1-beta.22110.7 -> To Version 2.5.1-beta.22114.7

* Update dependencies from https://github.com/dotnet/icu build 20220214.1

Microsoft.NETCore.Runtime.ICU.Transport
 From Version 7.0.0-preview.2.22107.1 -> To Version 7.0.0-preview.2.22114.1

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

Microsoft.DotNet.XHarness.CLI , Microsoft.DotNet.XHarness.TestRunners.Common , Microsoft.DotNet.XHarness.TestRunners.Xunit
 From Version 1.0.0-prerelease.22110.1 -> To Version 1.0.0-prerelease.22114.1

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

Microsoft.DotNet.CilStrip.Sources , System.ComponentModel.TypeConverter.TestData , System.Drawing.Common.TestData , System.IO.Compression.TestData , System.IO.Packaging.TestData , System.Net.TestData , System.Private.Runtime.UnicodeData , System.Runtime.Numerics.TestData , System.Runtime.TimeZoneData , System.Security.Cryptography.X509Certificates.TestData , System.Text.RegularExpressions.TestData , System.Windows.Extensions.TestData
 From Version 7.0.0-beta.22107.1 -> To Version 7.0.0-beta.22115.1

* Update dependencies from https://github.com/dotnet/roslyn-analyzers build 20220214.1

Microsoft.CodeAnalysis.NetAnalyzers
 From Version 7.0.0-preview1.22109.1 -> To Version 7.0.0-preview1.22114.1

* Update dependencies from https://github.com/dotnet/hotreload-utils build 20220214.2

Microsoft.DotNet.HotReload.Utils.Generator.BuildTool
 From Version 1.0.2-alpha.0.22107.2 -> To Version 1.0.2-alpha.0.22114.2

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

runtime.win-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools , runtime.win-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk , runtime.linux-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk , runtime.linux-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools , runtime.linux-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk , runtime.linux-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools , runtime.osx.10.12-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk , runtime.osx.10.12-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools
 From Version 11.1.0-alpha.1.22107.4 -> To Version 11.1.0-alpha.1.22114.2

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

Microsoft.DotNet.XUnitConsoleRunner , Microsoft.DotNet.CodeAnalysis , Microsoft.DotNet.Build.Tasks.Workloads , Microsoft.DotNet.Build.Tasks.Templating , Microsoft.DotNet.Build.Tasks.TargetFramework , Microsoft.DotNet.Build.Tasks.Packaging , Microsoft.DotNet.Build.Tasks.Installers , Microsoft.DotNet.Build.Tasks.Feed , Microsoft.DotNet.Build.Tasks.Archives , Microsoft.DotNet.Arcade.Sdk , Microsoft.DotNet.ApiCompat , Microsoft.DotNet.XUnitExtensions , Microsoft.DotNet.GenAPI , Microsoft.DotNet.VersionTools.Tasks , Microsoft.DotNet.GenFacades , Microsoft.DotNet.SharedFramework.Sdk , Microsoft.DotNet.RemoteExecutor , Microsoft.DotNet.PackageTesting , Microsoft.DotNet.Helix.Sdk
 From Version 2.5.1-beta.22110.7 -> To Version 2.5.1-beta.22114.7

* Update dependencies from https://github.com/dotnet/icu build 20220215.2

Microsoft.NETCore.Runtime.ICU.Transport
 From Version 7.0.0-preview.2.22107.1 -> To Version 7.0.0-preview.3.22115.2

* Update dependencies from https://github.com/dotnet/roslyn-analyzers build 20220215.3

Microsoft.CodeAnalysis.NetAnalyzers
 From Version 7.0.0-preview1.22109.1 -> To Version 7.0.0-preview1.22115.3

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Co-authored-by: Santiago Fernandez Madero <safern@microsoft.com>
Co-authored-by: Juan Hoyos <juan.s.hoyos@outlook.com>
Co-authored-by: Alexander Köplinger <alex.koeplinger@outlook.com>
2 years agoAdd linux-musl entry for FALLBACK_HOST_RID (#65339)
Adeel Mujahid [Wed, 16 Feb 2022 18:43:41 +0000 (20:43 +0200)]
Add linux-musl entry for FALLBACK_HOST_RID (#65339)

* Add linux-musl entry for FALLBACK_HOST_RID

* Stay consistent about host vs. target

* Classify linux-musl agnostic of distro

2 years agoSeparate capturing from normal states (#65340)
Olli Saarikivi [Wed, 16 Feb 2022 18:01:46 +0000 (10:01 -0800)]
Separate capturing from normal states (#65340)

This reduces memory usage for NonBacktracking to what it was before capturing support.

2 years agoExplicitly check for TTL expiration when using Ping utility (#65312)
Radek Zikmund [Wed, 16 Feb 2022 15:01:16 +0000 (16:01 +0100)]
Explicitly check for TTL expiration when using Ping utility (#65312)

* Explicitly check for TTL expiration when using Ping utility

* Fixes

* Improve the implementation

2 years agoHosting: ConfigDoesReload tests: increase timeout. (#64976)
Tom Deseyn [Wed, 16 Feb 2022 10:50:23 +0000 (11:50 +0100)]
Hosting: ConfigDoesReload tests: increase timeout. (#64976)

2 years agoJIT: Consider local var reads to be outstanding only if they are values (#65309)
Jakob Botsch Nielsen [Wed, 16 Feb 2022 10:21:50 +0000 (11:21 +0100)]
JIT: Consider local var reads to be outstanding only if they are values (#65309)

For unused indirs off of local variables we produce GT_NULLCHECK nodes
on arm64. The "CheckLclVarSemanticsHelper" class considers indirs off of
local vars to be local var reads and record these as outstanding in this
debug check, expecting to see a later use. However GT_NULLCHECK is not a
value so we never find such a use.

It is not clear that it is correct to consider an indir off of a local
var to be an outstanding read in general, but it seems that we currently
do not see cases that trip this check, so leaving it in for now.

Fix #65307

2 years agoSuppress warnings in NativeAOT smoke tests (#65423)
Michal Strehovský [Wed, 16 Feb 2022 07:44:33 +0000 (16:44 +0900)]
Suppress warnings in NativeAOT smoke tests (#65423)

2 years agoDisable core dumps when running libraries tests on macOS (#65405)
Elinor Fung [Wed, 16 Feb 2022 02:51:06 +0000 (18:51 -0800)]
Disable core dumps when running libraries tests on macOS (#65405)

2 years agoUpdate the ConvertToGeneratedDllImport code-fix to support stripping out PreserveSig...
Jeremy Koritzinsky [Wed, 16 Feb 2022 00:49:41 +0000 (16:49 -0800)]
Update the ConvertToGeneratedDllImport code-fix to support stripping out PreserveSig and transforming the signature when PreserveSig was set to true (#65169)

2 years ago[mini] fix static virtual constrained calls in non-generic interfaces (#65390)
Aleksey Kliger (λgeek) [Wed, 16 Feb 2022 00:42:10 +0000 (19:42 -0500)]
[mini] fix static virtual constrained calls in non-generic interfaces (#65390)

if the callee interface method is not generic, but the constained constraint
uses a generic var or mvar, do the indirect interface call.

fixes https://github.com/dotnet/runtime/issues/65384

2 years agoMake sure we have GCGenerationRanges events when using Generation-Aware analysis...
Andrew Au [Wed, 16 Feb 2022 00:24:51 +0000 (16:24 -0800)]
Make sure we have GCGenerationRanges events when using Generation-Aware analysis on Linux (#65338)

2 years agoAsk helix to run tiering test when it's requested (#65359)
Michal Strehovský [Tue, 15 Feb 2022 23:48:12 +0000 (08:48 +0900)]
Ask helix to run tiering test when it's requested (#65359)

2 years agoCouple optimizations to MultiRegStoreLoc (#64857)
Egor Chesakov [Tue, 15 Feb 2022 23:33:10 +0000 (15:33 -0800)]
Couple optimizations to MultiRegStoreLoc (#64857)

* For StoreLoc prefer allocating a multireg local def in the same registers as src in src/coreclr/jit/lsrabuild.cpp

* Properly check for the last use of a field of a multi-reg local in LinearScan::BuildStoreLocDef() in src/coreclr/jit/lsrabuild.cpp

2 years ago[mono][llvm] Add missing OP_RCONV_TO_I opcode. (#65389)
Zoltan Varga [Tue, 15 Feb 2022 23:12:40 +0000 (18:12 -0500)]
[mono][llvm] Add missing OP_RCONV_TO_I opcode. (#65389)

2 years agoEnsure that tls_destructionMonitor is initialized if a thread is attached to the...
Vladimir Sadov [Tue, 15 Feb 2022 22:33:05 +0000 (14:33 -0800)]
Ensure that tls_destructionMonitor is initialized if a thread is attached to the runtime. (#65358)

* Ensure that tls_destructionMonitor is initialized if a thread is attached to the runtime.

* relax the assert

* no call to `EnsureTlsDestructionMonitor` on unsetting a thread.

* remove obsolete comment

2 years ago[wasm] Clean unused files from emsdk when provisioning (#65116)
Larry Ewing [Tue, 15 Feb 2022 22:02:41 +0000 (16:02 -0600)]
[wasm] Clean unused files from emsdk when provisioning (#65116)

* Clean unused files from emsdk

* Add the ability to update npm instead

2 years ago[Android] Fix leftover direct invocation of clock_nanosleep (#65373)
Simon Rozsival [Tue, 15 Feb 2022 21:53:07 +0000 (22:53 +0100)]
[Android] Fix leftover direct invocation of clock_nanosleep (#65373)

This is a follow-up of #64679

I realized that one invocation of `clock_nanosleep` wasn't replaced with `g_clock_nanosleep`.

2 years agoUpdate library dependencies to the latest (#65381)
Viktor Hofer [Tue, 15 Feb 2022 21:27:19 +0000 (22:27 +0100)]
Update library dependencies to the latest (#65381)

* Update library dependencies to the latest

* Update ILCompiler.Reflection.ReadyToRun.csproj

2 years agoIncorporate review feedback from #64646 (#65376)
Eirik Tsarpalis [Tue, 15 Feb 2022 21:02:39 +0000 (21:02 +0000)]
Incorporate review feedback from #64646 (#65376)

* Incorporate review feedback from
#64646

* Prevent trimming of unused CachingContext.Count method

* use correct syntax for nested types

2 years agoChange SslStream's internal adapter interface to use static abstract interface method...
Stephen Toub [Tue, 15 Feb 2022 20:33:41 +0000 (15:33 -0500)]
Change SslStream's internal adapter interface to use static abstract interface methods (#65239)

* Use static abstract interface methods in Ssl/NegotiateStream adapters

* Remove unnecessary argument from a bunch of methods

It's only used to add duplicative information to an exception message, and in doing so it makes the async methods it's used in more expensive.

2 years agoImprove regex optimizations around repetitions of the same character (#65273)
Stephen Toub [Tue, 15 Feb 2022 20:32:58 +0000 (15:32 -0500)]
Improve regex optimizations around repetitions of the same character (#65273)

- For concatenations, we currently do two passes over its nodes: one that coalesces adjacent characters into strings, and one that coalesces adjacent loops.  This swaps the order so that we first coalesce adjacent loops.  We want to coalesce loops first so that we prioritize associating a One with an adjacent loop rather than with an adjacent string.  This is primarily beneficial later on for auto-atomicity.  Consider `a+ab` composed of a loop, a One 'a', and a One 'b'.  We're either going to make that into a loop `a{2,}` followed by `b` or into a loop `a+` followed by the multi `ab`.  We want to do the former, as then when we apply auto-atomicity to the `a{2,}`, we'll see that it's followed by something non-overlapping ('b'), and make the loop atomic.  In constrast, if we joined the `a` and `b`, then auto-atomicity for the `a+` would see it's followed by an `a` and it wouldn't be upgraded.
- Currently, the adjacent loop coalescing logic joins two individual One nodes with the same Ch value into a repeater.  That's actually a deoptimization, so this stops doing so.  We'd rather have `aa` be evaluated as a Multi of two characters rather than as an `a{2}` repeater, as we're able to apply better optimizations with multis, e.g. taking advantage of StartsWith for matching.
- Also in the adjacent loop logic, we're already checking for a loop followed by a one but we're not checking for a loop followed by a multi.  For the same auto-atomicity benefits discussed earlier, we want to shift any adjacent text from a multi following a loop back into the loop, as it makes it more likely we'll then be able to upgrade that loop to atomic. (We could also add logic for a multi followed by a loop, but the benefits there are less obvious.)
- When creating repeaters, we're actually better off creating multis, for the same reasons outlined earlier.  But we don't want to create massive strings in the super rare case where large repeaters for single chars are used, so we only do so up to a limit.
- When emitting generated code for a One repeater, which might be used to implement the required portion of other loops, emit it as a multi match for short enough repetitions.

2 years ago#51017 enable tests for android (#64743)
Meri Khamoyan [Tue, 15 Feb 2022 20:02:13 +0000 (00:02 +0400)]
#51017 enable tests for android (#64743)

Enables a handful of suites that were previously skipped due to https://github.com/dotnet/runtime/issues/51017

2 years agoRemove default BuildInParallel attributes (#65378)
Viktor Hofer [Tue, 15 Feb 2022 19:45:46 +0000 (20:45 +0100)]
Remove default BuildInParallel attributes (#65378)

Cleanup: Remove BuildInParallel=false attributes which are the default setting.

2 years agoEnable build of arm64 RPM packages (#65345)
Nikola Milosavljevic [Tue, 15 Feb 2022 18:37:31 +0000 (10:37 -0800)]
Enable build of arm64 RPM packages (#65345)

* Enable rpm build for Linux_arm64

* New Arcade Installers infra with Linux packaging update

2 years ago[LoongArch64] add the coreclr/pal directory (#62887)
Qiao Pengcheng [Tue, 15 Feb 2022 18:24:37 +0000 (02:24 +0800)]
[LoongArch64] add the coreclr/pal directory (#62887)

* [LoongArch64] add the coreclr/pal and libunwind directory. (#59561)

* [LoongArch64] delete the libunwind for LoongArch64.
It will be commited within a new PR.

* [LoongArch64] add config files from #62889.

* [LoongArch64] revert some files when moved from #62889.

* [LoongArch64] compiling is sucessfully.

* [LoongArch64] delete the define IMAGE_FILE_MACHINE_LOONGARCH64 for #62886.

* [LoongArch64] exclude some files from pal directory.

* [LoongArch64] rename the `UNW_LOONGARCH_*` with `UNW_LOONGARCH64_*`

* [LoongArch64] update the version of the `LICENSE description`.

* [LoongArch64] revert the `pal/inc/rt/ntimage.h`.

* [LoongArch64] delete unused assert and update the `DAC_CS_NATIVE_DATA_SIZE`

Co-authored-by: qiaopengcheng <qiaopengcheng-hf@loongson.cn>
2 years agoRemove JsonConverter.RuntimeType (#65224)
Eirik Tsarpalis [Tue, 15 Feb 2022 18:19:59 +0000 (18:19 +0000)]
Remove JsonConverter.RuntimeType (#65224)

Backports changes introduced in the polymorphic deserialization prototype. JsonConverter.RuntimeType is an implementation detail stemming from interface support in collection converters, that has leaked into the JsonTypeInfo model. Removing it makes the contract model cleaner and makes the infrastructure compatible with polymorphic deserialization.

2 years agoRemove the concept of fat dispatch tokens and fat type ids from 64 bit platforms...
David Wrighton [Tue, 15 Feb 2022 18:19:18 +0000 (10:19 -0800)]
Remove the concept of fat dispatch tokens and fat type ids from 64 bit platforms (#65045)

* Remove the concept of fat dispatch tokens and fat type ids from 64 bit platforms
- Phase 1 of removing locking from interface dispatch generation for generic dispatch
- We no longer need these due to changes to remove AppDomains from CoreCLR
- Phase 2 will likely remove the MethodTableWriteableData structure and merge the contents into the normal MethodTable

2 years agoInclude IsNetCoreAppRef in assembly version calculation for servicing (#65166)
Santiago Fernandez Madero [Tue, 15 Feb 2022 16:45:35 +0000 (08:45 -0800)]
Include IsNetCoreAppRef in assembly version calculation for servicing (#65166)

2 years agoDon't binplace Microsoft.XmlSerializer.Generator (#65313)
Alexander Köplinger [Tue, 15 Feb 2022 14:06:03 +0000 (15:06 +0100)]
Don't binplace Microsoft.XmlSerializer.Generator (#65313)

It's not needed and avoids accidentally including this assembly in places where we don't want it.

2 years agoILCompiler.Reflection.ReadyToRun shouldn't depend on type system (#65355)
Michal Strehovský [Tue, 15 Feb 2022 14:02:10 +0000 (23:02 +0900)]
ILCompiler.Reflection.ReadyToRun shouldn't depend on type system (#65355)

We don't want to ship it in the NuGet consumed by ILSpy.

2 years agoFix stack overflow tests to accept 800703E9 exit code too (#65331)
Jan Vorlicek [Tue, 15 Feb 2022 12:15:12 +0000 (13:15 +0100)]
Fix stack overflow tests to accept 800703E9 exit code too (#65331)

Sometimes a process failing with stack overflow returns exit code
0x800703e9 (ERROR_STACK_OVERFLOW). This change updates the stack
overflow test to accept that code too.

2 years agoMove MacCatalyst to runtime-extra-platforms pipeline (#64452)
Maxim Lipnin [Tue, 15 Feb 2022 12:08:34 +0000 (15:08 +0300)]
Move MacCatalyst to runtime-extra-platforms pipeline (#64452)

Since #63572 no longer happens in CI, we can promote MacCatalyst templates from the runtime-staging to the runtime-extra-platforms pipeline.

For now we will keep MacCatalyst arm64 legs in runtime-staging as they are not stable on OSX 11.00 queues (see #64452 (comment)).

Co-authored-by: Steve Pfister <steve.pfister@microsoft.com>
Co-authored-by: Alexander Köplinger <alex.koeplinger@outlook.com>
2 years agoFixes for CFG dispatcher on ARM64 (#65127)
Jakob Botsch Nielsen [Tue, 15 Feb 2022 10:28:17 +0000 (11:28 +0100)]
Fixes for CFG dispatcher on ARM64 (#65127)

* Do not run jit-cfg on macOS

jit-cfg includes a GCStress scenario which is not supported on macOS
x64. Rather than excluding it just there, just exclude all of macOS
since CFG is a Windows only feature anyway.

I am still keeping the Linux-x64/Linux-arm64 jobs as we produce
different IR for arguments on these ABIs and I want to keep the CFG
handling working in general for all the forms of IR we can produce
related to calls.

* Fix CFG dispatcher register in VM stub

* Change GS cookie check temp registers

These registers are trashed in the epilog on arm64 for GS cookie checks,
but x9 might conflict with the argument used by the dispatch helper.
Change the temp registers to ip0 and ip1 and add some debug checking to
get a nice assert in the future if this happens.

2 years agoResolve System.Net.Security.Tests.LoggingTest SkipTestException failure (#65322)
Miha Zupan [Tue, 15 Feb 2022 09:45:26 +0000 (01:45 -0800)]
Resolve System.Net.Security.Tests.LoggingTest SkipTestException failure (#65322)

2 years agoAdd a test for control flow guard + small JIT fix (#65122)
Michal Strehovský [Tue, 15 Feb 2022 08:18:05 +0000 (17:18 +0900)]
Add a test for control flow guard + small JIT fix (#65122)

Adds a test that compiles with CFG enabled and then re-runs itself to crash in various ways.
Also fixes a minor RyuJIT issue discovered in the test.

2 years agoValidate `IntPtr` and ByRef field overlap (#65246)
Aaron Robinson [Tue, 15 Feb 2022 06:47:48 +0000 (22:47 -0800)]
Validate `IntPtr` and ByRef field overlap (#65246)

* Validate IntPtr and byref field overlap

2 years agoCleanup some XML tests (#65290)
Dan Moseley [Tue, 15 Feb 2022 05:17:31 +0000 (22:17 -0700)]
Cleanup some XML tests (#65290)

2 years agodisable GetGCMemoryInfo on FreeBSD (#64937)
Tomas Weinfurt [Tue, 15 Feb 2022 05:11:30 +0000 (21:11 -0800)]
disable GetGCMemoryInfo on FreeBSD (#64937)

2 years agoSkip AOT of Microsoft.CodeAnalysis.CSharp.dll for WASM, due to out-of-memory issues...
Jo Shields [Tue, 15 Feb 2022 04:12:31 +0000 (23:12 -0500)]
Skip AOT of Microsoft.CodeAnalysis.CSharp.dll for WASM, due to out-of-memory issues in CI (#63958)

2 years agoFixes for TransitionRegex with effects (#65333)
Olli Saarikivi [Tue, 15 Feb 2022 02:52:57 +0000 (18:52 -0800)]
Fixes for TransitionRegex with effects (#65333)

Effects on nothing leaves are now simplified away.
Enumerating TransitionsWithEffects will now ignore all transitions after
the first unconditionally nullable one.

2 years agoClean up a few confusing regex reduction tests (#65334)
Stephen Toub [Tue, 15 Feb 2022 02:03:03 +0000 (21:03 -0500)]
Clean up a few confusing regex reduction tests (#65334)

I stared at these for a minute trying to rationalize how `e|f` could possibly become `ef`, and then I realized it of course doesn't, rather these branches are being eliminated entirely.

2 years agoUse StartsWith in regex compiler / source gen for shorter strings (#65222)
Stephen Toub [Tue, 15 Feb 2022 02:02:47 +0000 (21:02 -0500)]
Use StartsWith in regex compiler / source gen for shorter strings (#65222)

The RegexCompiler and source generator currently special-case strings < 64 chars in length and unroll the loop, using a series of ulong and uint comparisons where possible.  While efficient, this makes the generated code harder to read, and the source generator also has endianness issues when the compiled binary is then used on a machine with different endianness.  The JIT is going to start doing such unrolling as part of StartsWith, so we can leave the optimization up to it; it'll be able to do it better, anyway, with its optimization applying to more uses, using vectors where applicable, etc.

2 years ago[LoongArch64] Add LoongArch64 support in libunwind. (#62979)
Qiao Pengcheng [Tue, 15 Feb 2022 00:48:49 +0000 (08:48 +0800)]
[LoongArch64] Add LoongArch64 support in libunwind. (#62979)

* [LoongArch64] Add LoongArch64 support in libunwind.

* [LoongArch64] add libunwind/src/CMakeLists.txt from #62889.

* [LoongArch64] add libunwind-version for LoongArch64.

* [LoongArch64] add unwinder/loongarch64/ directory.

* [LoongArch64] add unwind within the `inc/clrnt.h`.

* Revert "[LoongArch64] add unwinder/loongarch64/ directory."
This reverts commit a8fde8904c5ba50b9cf0c9dd8087ac3d5953f59b.

Revert "[LoongArch64] add unwind within the `inc/clrnt.h`."
This reverts commit c5e606d1b2fbc5cc4048d26431c257ae9b477eb7.

* [LoongArch64] Fixed the compiling error by
              https://github.com/libunwind/libunwind/pull/322.

* [LoongArch64] amend the "Apply info" for LoongArch64.

Co-authored-by: qiaopengcheng <qiaopengcheng-hf@loongson.cn>
2 years ago[build] Move Mono API headers under src/native/public (#64569)
Aleksey Kliger (λgeek) [Tue, 15 Feb 2022 00:46:32 +0000 (19:46 -0500)]
[build] Move Mono API headers under src/native/public (#64569)

Contributes to #64456

1. Separate the public API headers from the mono implementation
2. Provide a foundation for refactoring the headers (as outlined in #64456) to be more useful for late binding scenarios

* Move public mono headers to src/native/public

* fix mono dbgshim and mscordbi builds

* Pass --nativedir=src/native to offsets-tool.py

* fix wasm build

* fix windows build

* Add a brief README for the public directory

2 years agoClean the OpenSSL error queue more consistently
Jeremy Barton [Tue, 15 Feb 2022 00:24:52 +0000 (16:24 -0800)]
Clean the OpenSSL error queue more consistently

This change started with the intent of changing the error code / message from an OpenSSL-based
exception from the most recent error in the queue to the oldest error that was produced after the
operation started. This was motivated mostly by EVP_PKEY2PKCS8(pkey) incorrectly indicating a
malloc failure after producing the original/correct error that pkey did not have a private key
portion.

Having fully developed the experiment, data showed that while for EVP_PKEY2PKCS8 the first (of
two) errors was the better one, for everything else with more than one error reported, the last
error was at least as good as, and often better, than the first error. With that data in hand, this
change now represents more consistently cleaning the error queue, and reducing the overhead
in producing the exception objects.

Co-authored-by: Kevin Jones <vcsjones@github.com>
2 years agoUse global caching in JsonSerializerOptions (#64646)
Eirik Tsarpalis [Mon, 14 Feb 2022 23:46:42 +0000 (23:46 +0000)]
Use global caching in JsonSerializerOptions (#64646)

* Use caching in Reflection.Emit member accessors

* Refactor JsonSerializerOptions caching & use shared caching contexts

* Update src/libraries/System.Text.Json/src/System/Text/Json/Serialization/Metadata/ReflectionEmitCachingMemberAccessor.Cache.cs

* address feedback

* tweak cache eviction constants

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

* minor refinements to cache eviction algorithm

* rename JsonSerializerOptions._context to _serializerContext

* ensure that the update handler clears the shared caching contexts

* fix remark

2 years agocrossgen2: Report CORINFO_FLG_NOGCCHECK back for internal calls (#65300)
Jakob Botsch Nielsen [Mon, 14 Feb 2022 23:28:22 +0000 (00:28 +0100)]
crossgen2: Report CORINFO_FLG_NOGCCHECK back for internal calls (#65300)

When there are loops or tailcalls in a function the JIT will check for
a dominating call that is a GC safepoint to figure out if the function
needs to be marked fully interruptible or not. Methods with the
InternalCall flag may turn into fcalls that are not hijackable and thus
not GC safepoints, so in this case JIT should still mark the function
fully interruptible, but was not doing so because crossgen2 was not
reporting this flag back.

Fix #64980

2 years ago[interp] Use dynamic method's assembly when getting a native wrapper (#65320)
Aleksey Kliger (λgeek) [Mon, 14 Feb 2022 22:41:11 +0000 (17:41 -0500)]
[interp] Use dynamic method's assembly when getting a native wrapper (#65320)

The dynamic method `klass` is just System.Object, so its image is always
corelib.  As a result, we incorrectly pick up the DisableRuntimeMarshalling
attribute from CoreLib.

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

The corresponding change to the JIT+AOT was done in
https://github.com/dotnet/runtime/pull/64279/commits/ac825ab0678f07bfd6c161e4ea4413af84df9293

2 years agoRemove Unused Encoding on UriHelper (#65326)
Eric Erhardt [Mon, 14 Feb 2022 22:27:39 +0000 (16:27 -0600)]
Remove Unused Encoding on UriHelper (#65326)

This field was a left-over artifact from conflicts between the commits:
- https://github.com/dotnet/runtime/commit/70c070e84c617de0700612d03c5886e548195bed
- https://github.com/dotnet/runtime/commit/e53e5430c199c210b7d6f7ce508fb5fabb5faeba

In profiling the startup of a Maui Android app, this initialization is pulling in UTF32 and Latin1 encodings. The profile indicates this accounts for 7ms (roughly 1%). Removing this unnecessary field eliminates 7ms in a Maui App's InitializeComponent.

2 years agoConvert non-blittable delegate usage in System.DirectoryServices to function pointers...
Jeremy Koritzinsky [Mon, 14 Feb 2022 21:21:07 +0000 (13:21 -0800)]
Convert non-blittable delegate usage in System.DirectoryServices to function pointers. (#65319)

2 years ago[Group 3] Enable nullable annotations for Microsoft.Extensions.FileProviders.Composit...
Maksym Koshovyi [Mon, 14 Feb 2022 21:07:48 +0000 (23:07 +0200)]
[Group 3] Enable nullable annotations for Microsoft.Extensions.FileProviders.Composite (#65223)

Related to #43605

2 years agoDisable multiple tests failing in R2R-CG2 legs (#65227)
Egor Chesakov [Mon, 14 Feb 2022 21:06:40 +0000 (13:06 -0800)]
Disable multiple tests failing in R2R-CG2 legs (#65227)

2 years ago[Mono] Add SIMD intrinsics for Vector{64, 128} on Arm64 Part I (#64961)
Fan Yang [Mon, 14 Feb 2022 21:03:59 +0000 (16:03 -0500)]
[Mono] Add SIMD intrinsics for Vector{64, 128} on Arm64 Part I (#64961)

* Add SIMD intrinsics for Arm64

* Add check for architecture

* Another one currently only work on arm64

* Xor intrinsics only work on integer types

* Change the implementation for max/min

* fix build on non-arm

* Fix build on mobile platforms

* Fix fmax and fmin on Amd64

* Only intrinsify Vector64 methods on Arm64

2 years ago[wasm] Add memalign to exported functions (#65316)
Radek Doulik [Mon, 14 Feb 2022 20:42:00 +0000 (21:42 +0100)]
[wasm] Add memalign to exported functions (#65316)

* [wasm] Add memalign to exported functions

Fix https://github.com/dotnet/runtime/issues/64724 and https://github.com/dotnet/runtime/issues/64725

The tests were crashing because calling the memalign function, which was
not exported.

* Re-enable failing tests

2 years ago[mono][s390x] Fix OP_FCONV_TO_I and OP_RCONV_TO_I (#65185)
Ulrich Weigand [Mon, 14 Feb 2022 20:27:40 +0000 (21:27 +0100)]
[mono][s390x] Fix OP_FCONV_TO_I and OP_RCONV_TO_I (#65185)

* OP_[FR]CONV_TO_I should result in an 8-byte integer

2 years agoImprove regex code gen for non-backtracking repeaters (#65240)
Stephen Toub [Mon, 14 Feb 2022 19:55:17 +0000 (14:55 -0500)]
Improve regex code gen for non-backtracking repeaters (#65240)

2 years ago[wasm] Allow overriding _EmccAssertionLevelDefault (#65310)
Radek Doulik [Mon, 14 Feb 2022 19:39:24 +0000 (20:39 +0100)]
[wasm] Allow overriding _EmccAssertionLevelDefault (#65310)

2 years agoFix runtime-official when executed against PRs in azdo (#65034)
Santiago Fernandez Madero [Mon, 14 Feb 2022 18:31:15 +0000 (10:31 -0800)]
Fix runtime-official when executed against PRs in azdo (#65034)

2 years agoRespect single targetframeworks in slngen.targets (#65248)
Viktor Hofer [Mon, 14 Feb 2022 18:18:50 +0000 (19:18 +0100)]
Respect single targetframeworks in slngen.targets (#65248)

Now that projects have have single target framework values via the `<TargetFramework>` property, the slngen logic that excludes a reference project from a solution, if it isn't necessary to be included, must be updated.

2 years agoRemove Try/HashData from AsymmetricAlgorithmHelpers
Kevin Jones [Mon, 14 Feb 2022 17:44:21 +0000 (12:44 -0500)]
Remove Try/HashData from AsymmetricAlgorithmHelpers

2 years agoMove more things under S.S.Cryptography.
Kevin Jones [Mon, 14 Feb 2022 16:57:36 +0000 (11:57 -0500)]
Move more things under S.S.Cryptography.

2 years ago[Group 5] Enable nullable annotations for Microsoft.Extensions.Options.ConfigurationE...
Maksym Koshovyi [Mon, 14 Feb 2022 16:10:07 +0000 (18:10 +0200)]
[Group 5] Enable nullable annotations for Microsoft.Extensions.Options.ConfigurationExtensions (#65208)

Related to #43605

2 years ago[Group 3] Enable nullable annotations for Microsoft.Extensions.Caching.Memory (#65213)
Maksym Koshovyi [Mon, 14 Feb 2022 16:03:17 +0000 (18:03 +0200)]
[Group 3] Enable nullable annotations for Microsoft.Extensions.Caching.Memory (#65213)

Related to #43605

2 years agoUpdate OptionsBuilderConfigurationExtensions.cs (#65220)
Maksym Koshovyi [Mon, 14 Feb 2022 15:33:45 +0000 (17:33 +0200)]
Update OptionsBuilderConfigurationExtensions.cs (#65220)

Remove not needed lines

2 years ago[tests][mobile] Enable diagnostic_tracing for iOS runtime tests (#64952)
Mitchell Hwang [Mon, 14 Feb 2022 15:21:40 +0000 (10:21 -0500)]
[tests][mobile] Enable diagnostic_tracing for iOS runtime tests (#64952)

* [tests][diagnostics] Enable diagnostics tracing on iOS runtime tests

* Reenable eventactivityidcontrol on iOS runtime tests

* temporary enable runtime ios tests to be ran

* Revert "temporary enable runtime ios tests to be ran"

This reverts commit dd06be73a8f87604f71f33934b26bf4602699c78.

2 years agoadd test that ensures that the bug is not coming back (#65301)
Adam Sitnik [Mon, 14 Feb 2022 14:50:41 +0000 (15:50 +0100)]
add test that ensures that the bug is not coming back (#65301)

2 years ago[tests] Extend partial disablement of SkippingHiddenFiles (#65280)
Mitchell Hwang [Mon, 14 Feb 2022 12:54:46 +0000 (07:54 -0500)]
[tests] Extend partial disablement of SkippingHiddenFiles (#65280)

2 years agoKeep information about CSE defs on assignment nodes (#64896)
Jakob Botsch Nielsen [Mon, 14 Feb 2022 10:08:08 +0000 (11:08 +0100)]
Keep information about CSE defs on assignment nodes (#64896)

Reuse the gtCSEnum field on assignments to signal "this is a performed
CSE def". gtCanSwapOrder uses the CSE def information to reason about
evaluation order, so without keeping this information we could risk
substitution a CSE def, followed by reordering operands, and then
finally substituting a CSE use.

Fix #64883

2 years agoMove Msquic over to Source-generated delegate interop. (#65204)
Jeremy Koritzinsky [Sun, 13 Feb 2022 16:40:10 +0000 (08:40 -0800)]
Move Msquic over to Source-generated delegate interop. (#65204)

* Move Msquic over to Source-generated delegate interop.

* More fixes

2 years agoOptimize Math.Round(x, MidpointRounding.AwayFromZero/ToEven) (#64016)
Egor Bogatov [Sun, 13 Feb 2022 12:11:49 +0000 (15:11 +0300)]
Optimize Math.Round(x, MidpointRounding.AwayFromZero/ToEven) (#64016)

2 years agoFix reporting ZR to gc (#65253)
Egor Bogatov [Sat, 12 Feb 2022 20:07:31 +0000 (23:07 +0300)]
Fix reporting ZR to gc (#65253)

2 years agoDisable tests on Debug CoreClr that are already disabled on Checked CoreClr (#64891)
Dan Moseley [Sat, 12 Feb 2022 18:32:36 +0000 (11:32 -0700)]
Disable tests on Debug CoreClr that are already disabled on Checked CoreClr (#64891)

* Disable tests on Debug CoreClr that are already disabled on Checked CoreClr

* Increase Process timeout

* Extract timeout modifier and make Debug only

* Update src/libraries/System.Text.RegularExpressions/tests/Regex.Match.Tests.cs

2 years agoFix nullability in `IOptionsMonitor` (#65225)
Maksym Koshovyi [Sat, 12 Feb 2022 17:58:07 +0000 (19:58 +0200)]
Fix nullability in `IOptionsMonitor` (#65225)

* Update IOptionsMonitor

* Update OptionsMonitorExtensions

2 years agoRemove unused private parameters in SPC (#63015)
Marek Safar [Sat, 12 Feb 2022 17:44:41 +0000 (18:44 +0100)]
Remove unused private parameters in SPC (#63015)

2 years agoCaptures support for NonBacktracking (#65129)
Olli Saarikivi [Sat, 12 Feb 2022 17:34:32 +0000 (09:34 -0800)]
Captures support for NonBacktracking (#65129)

* Initial version of captures in NonBacktracking

* Working version of captures in NonBacktracking

* State/transition priorities for NonBacktracking

* Various fixes for capturing in NonBacktracking

Re-enable replacement patterns.
Fix eager derivative.
Fix capture numbering to work with sparsely numbered groups.

* Enable many subcapture tests for NonBacktracking

Also take any subcaptures out of RegexExperiment intersection and
negation tests, as capture semantics with these are not correct yet.

* Use new eager derivative even without subcaptures

This ensures the correct length matches always.

* Enable more subcapture tests for NonBacktracking

* Performance work for NonBacktracking captures

* Bug fixes and comments

* Fix for changes removing exclusive_end

* Rename back to _lower

* Fix beginning handling for captures

* Resurrect deleted test

* Remove debugging test

* Provide effects semantics for extended combinators

Also the unordered Or, which gets the semantics that all alternatives
are visited.

* Apply suggestions from code review to SparseIntMap

Co-authored-by: Stephen Toub <stoub@microsoft.com>
* Apply suggestions from code review

Cleanup and volatile write

Co-authored-by: Stephen Toub <stoub@microsoft.com>
* Comments, fixes and cleanup

* Disable tests for extended features

Conjunction and complement are broken in the new capturing support.

* Apply suggestions from code review

Fixes for FindEndPositionCapturing

Co-authored-by: Stephen Toub <stoub@microsoft.com>
* Switch all phases to use eager derivative

This allows avoiding capture tracking in third phase if there are
no subcaptures.
As a side effect of this change all derivatives produce OrderedOr nodes,
which for now effectively disables the subsumption optimization.

* Flatten ordered or and add subsumption

Previously the loop subsumption optimization only worked in
SymbolicRegexSet, but that is getting phased out with the order
maintaining derivative. This reimplements a version of that for ordered
ors.
Also do actual canonicalization of ordered ors as we should.

* Avoid some copies and overhead in capturing mode

* Improved comment and a better assert

* Move some per thread state into the runner

This avoids some repeated allocations in the capturing mode.

* Fix typo in SparseIntMap

* Various cleanup

* Fix a comment

* Avoid copying captures when doing quick match

Co-authored-by: Stephen Toub <stoub@microsoft.com>
2 years agoObsolete and put SerializationFormat.Binary behind an appcontext switch (#65139)
Shay Rojansky [Sat, 12 Feb 2022 13:03:18 +0000 (15:03 +0200)]
Obsolete and put SerializationFormat.Binary behind an appcontext switch (#65139)

Part of #39289

2 years agoDon't use Targets* helper properties in libs (#64500)
Viktor Hofer [Sat, 12 Feb 2022 12:07:16 +0000 (13:07 +0100)]
Don't use Targets* helper properties in libs (#64500)

* Don't use Targets* helper properties in libs projs

This change makes it possible to migrate 200+ (ref+src) projects to use
TargetFramework instead of TargetFrameworks which avoids the additional
outer build evaluation and invocation which ultimately makes the overall
build faster.

Targets* properties (i.e. TargetsWindows, TargetsAnyOS, TargetsUnix,
etc.) rely on the TargetFramework property which usually are set
inside a project. The TargetFramework property is only
available before a project specifies it if it's explicitly set in a props
file or if the project is cross-targeting and the outer-build dispatches
into the inner-build. During the dispatch, the TargetFramework property
is passed in as a global property.

Until now that behavior wasn't a problem because every libraries project
cross-targeted (by setting the TargetFrameworks property) even though
many only include a single TargetFramework (i.e. NetCoreAppCurrent).

To allow projects to use the TargetFramework property instead of
TargetFrameworks, the Targets* helper properties can't be calculated
anymore early in a props file as the TargetFramework property isn't set
at that time.

In general, the guidance by the SDK/msbuild team is to not read from the
TargetFramework property before the project sets it
(in a property group). That effectively means that the TargetFramework
property shouldn't be used in props files at all.

Therefore these helper properties can't be used anymore for property
conditions and I'm replacing their usage with TargetPlatformIdentifier
comparisons for both properties and items.
In nearly all cases, the Targets* helper properties can be replaced with
TargetPlatformIdentifier checks on items and in the few cases where
TargetsUnix or TargetsLinux marks multiple tfms as compatible, the exact
tfms must be used instead for the TargetPlatformIdentifier comparison.

Whenever a project needs to condition properties on the platform, I'm
first setting the TargetPlatformIdentifier the same way the SDK sets it
so that the SDK later doesn't need to set it again to avoid the
additional expensive msbuild function call.

* Use TargetFramework singular to avoid outer builds

Use TargetFramework instead of TargetFrameworks property whenever a
projects only targets a single target framework. This avoid unnecessary
outer builds and evaluations and makes the build faster.

2 years ago[wasm] Disable System.Text.RegularExpressions.Generators.Tests (#65238)
Ankit Jain [Sat, 12 Feb 2022 09:50:20 +0000 (04:50 -0500)]
[wasm] Disable System.Text.RegularExpressions.Generators.Tests (#65238)

2 years agoStore the result in the return local in native-to-managed IL stubs. (#65203)
Jeremy Koritzinsky [Sat, 12 Feb 2022 06:41:57 +0000 (22:41 -0800)]
Store the result in the return local in native-to-managed IL stubs. (#65203)

* Store the result in the return local in native-to-managed IL stubs.

* Unformat includes

2 years agoConvert over StandardOleMarshalObject to use either source-generated or manual intero...
Jeremy Koritzinsky [Sat, 12 Feb 2022 06:38:37 +0000 (22:38 -0800)]
Convert over StandardOleMarshalObject to use either source-generated or manual interop. (#65226)

* Convert over StandardOleMarshalObject to use either source-generated or manual interop.

* Apply suggestions from code review

Co-authored-by: Aaron Robinson <arobins@microsoft.com>
Co-authored-by: Aaron Robinson <arobins@microsoft.com>
2 years agoInspector wants the content-length set (#65216)
Larry Ewing [Sat, 12 Feb 2022 04:06:00 +0000 (22:06 -0600)]
Inspector wants the content-length set (#65216)

2 years agoUpdate Maui/Mobile pre.py's and disable android due to AOT Issue (#65231)
Parker Bibus [Sat, 12 Feb 2022 01:21:02 +0000 (19:21 -0600)]
Update Maui/Mobile pre.py's and disable android due to AOT Issue (#65231)

* Setup testing jobs, change repo to test perf repo, and added apk-name parameter to pre.py for mobile scenarios.

* Update dotnet install type to be daily. This matches the link for installing net 6.0 in the maui contributing dev requirements list.

* Try lowercase package name.

* List post build folder stuff.

* Add android output format as apk.

* Disable package replacement to see if that is the issue location.

* Revert "Disable package replacement to see if that is the issue location."

This reverts commit 31cffe7cb296ccd5796fccccac14edbdbc526452.

* Always try to publish the binlog files.

* Comment out the props file to see if that fixes the AOT error.

* Readd props references.

* Try building without AOT.

* Disable Maui Android Scenarios so that at least iOS on main are being build and measured for SOD.

* Forgot to remove the uploading of the Android APP.

* Disable download attempt of the MauiAndroidApp.

* Reenable full perf run.

* Set the setup branch back to main.

* Undisable MauiScenario.targets file. It semi-causes the AOT issue but should still be enabled for other working builds.

* Add reason for the commented out sections.

2 years agoFix race condition in InteropSyncBlock for ComWrappers map. (#65214)
Aaron Robinson [Sat, 12 Feb 2022 00:39:02 +0000 (16:39 -0800)]
Fix race condition in InteropSyncBlock for ComWrappers map. (#65214)

2 years agoDisable tests using external TLS1.2 server on win7 (#65188)
Radek Zikmund [Sat, 12 Feb 2022 00:09:13 +0000 (01:09 +0100)]
Disable tests using external TLS1.2 server on win7 (#65188)

2 years ago[Group 3] Enable nullable annotations for Microsoft.Extensions.Options.DataAnnotation...
Maksym Koshovyi [Fri, 11 Feb 2022 23:08:57 +0000 (01:08 +0200)]
[Group 3] Enable nullable annotations for Microsoft.Extensions.Options.DataAnnotations (#65202)