platform/upstream/dotnet/runtime.git
23 months agoPartial revert of #71486 to unblock dotnet/sdk (#80791)
Jan Kotas [Wed, 18 Jan 2023 17:39:28 +0000 (09:39 -0800)]
Partial revert of #71486 to unblock dotnet/sdk (#80791)

23 months agoUpdate dependencies from https://github.com/dotnet/linker build 20230117.1 (#80782)
dotnet-maestro[bot] [Wed, 18 Jan 2023 16:48:36 +0000 (17:48 +0100)]
Update dependencies from https://github.com/dotnet/linker build 20230117.1 (#80782)

Microsoft.NET.ILLink.Tasks
 From Version 8.0.100-1.23064.1 -> To Version 8.0.100-1.23067.1

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
23 months agoUpdate dependencies from https://github.com/dotnet/arcade build 20230117.5 (#80780)
dotnet-maestro[bot] [Wed, 18 Jan 2023 16:44:10 +0000 (17:44 +0100)]
Update dependencies from https://github.com/dotnet/arcade build 20230117.5 (#80780)

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

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
23 months agoUse TaskDialog for error dialog in Windows GUI apps (#78087)
Elinor Fung [Wed, 18 Jan 2023 15:44:12 +0000 (07:44 -0800)]
Use TaskDialog for error dialog in Windows GUI apps (#78087)

23 months agoFix diagnosticport test failure in ilasm/ildasm round-trip testing (#80766)
Elinor Fung [Wed, 18 Jan 2023 15:43:30 +0000 (07:43 -0800)]
Fix diagnosticport test failure in ilasm/ildasm round-trip testing (#80766)

23 months ago[mono][interp] Add 16 byte default alignment to interp frames (#80700)
Vlad Brezae [Wed, 18 Jan 2023 15:20:52 +0000 (17:20 +0200)]
[mono][interp] Add 16 byte default alignment to interp frames (#80700)

* [mono][interp] Remove MINT_VT_ALIGNMENT

It serves no purpose nowadays. All vars are aligned to MINT_STACK_SLOT_SIZE.

* [mono][interp] Add 16 byte default alignment to optimized code

This will enable us to control alignment of Vector128 vars at compile time.

* [mono][interp] Add stack alignment for unoptimized code

For normal calls, we introduce a new opcode before the call that will move all the arguments to aligned stack location. When emitting the code for the call, we emit directly the aligned call args offset instead. Unoptimized code has its own opcodes that do moving of param, we tweak them to copy them into aligned location.

23 months ago[mono][aot] Optimize the layout of the extra_method_table. (#80682)
Zoltan Varga [Wed, 18 Jan 2023 11:30:09 +0000 (06:30 -0500)]
[mono][aot] Optimize the layout of the extra_method_table. (#80682)

23 months agoFix use of span local in WebSocketHandle.ConnectAsync (#80770)
Stephen Toub [Wed, 18 Jan 2023 11:00:36 +0000 (06:00 -0500)]
Fix use of span local in WebSocketHandle.ConnectAsync (#80770)

23 months ago[wasm] Enable dedup by default. (#80260)
Zoltan Varga [Wed, 18 Jan 2023 09:21:58 +0000 (04:21 -0500)]
[wasm] Enable dedup by default. (#80260)

* [wasm] Enable dedup by default.

* [wasm] Enable symbol map for AOT tests too

* MonoAOTCompiler: Fix up the path for the output items if they had been

.. copied to `aot-in` for the compilation step.

Example:
- when using WasmDedup=true, we get the main assemblies in `publish`
directory after linking, but `aot-instances.dll` is in different directory.
- this causes `MonoAOTCompiler` to copy all of them to a temporary `aot-in` dir for compiling with `mono-aot-cross`.
- And when the output items are set, we get:

```
 Output Item(s):
     _WasmAssembliesInternal=
         obj/Debug/net8.0/browser-wasm/wasm/for-publish/aot-in/Debug_u4nbxx3i.gc5.dll
                 LlvmBitcodeFile=obj/Debug/net8.0/browser-wasm/wasm/for-publish/Debug_u4nbxx3i.gc5.dll.bc
```

- here the `ItemSpec` is incorrectly set to the temporary `aot-in` path
- which can cause build failures in the following build steps

* WBT: remove redundant case

Co-authored-by: Ankit Jain <radical@gmail.com>
23 months agoJIT: Add a stress mode that poisons implicit byrefs (#80691)
Jakob Botsch Nielsen [Wed, 18 Jan 2023 09:18:07 +0000 (10:18 +0100)]
JIT: Add a stress mode that poisons implicit byrefs (#80691)

This stress mode poisons all implicit byrefs before returns from the
method. GC pointers are nulled out and other parts of the structs are
filled with 0xcd bytes.

This should help expose incorrectly elided copies in the recently added
last-use copy elision optimization.

23 months agoJIT: Account for GT_JMP implicit uses in local morph ref counting (#80734)
Jakob Botsch Nielsen [Wed, 18 Jan 2023 09:06:44 +0000 (10:06 +0100)]
JIT: Account for GT_JMP implicit uses in local morph ref counting (#80734)

Fix #80731

23 months agoJIT: Fix GC hole for Armv8.1 Atomics (#80740)
Jakob Botsch Nielsen [Wed, 18 Jan 2023 09:01:49 +0000 (10:01 +0100)]
JIT: Fix GC hole for Armv8.1 Atomics (#80740)

Unlike seemingly all other ARM instructions, the set of instructions
marked by this PR actually write their result in the second operand
register instead of the first. This means we were incorrectly updating
GC info when emitting these instructions.

Fix #79431
Fix #80582
Fix #80584
Fix #80585
Fix #80586
Fix #80587
Fix #80588

23 months ago[wasm] WBT: Add `submit-wbt-helix` make target (#80763)
Ankit Jain [Wed, 18 Jan 2023 08:44:48 +0000 (03:44 -0500)]
[wasm] WBT: Add `submit-wbt-helix` make target (#80763)

23 months agoSet AssemblyName.ProcessorArchitecture for compatibility. (#80581)
Vladimir Sadov [Wed, 18 Jan 2023 06:04:07 +0000 (22:04 -0800)]
Set AssemblyName.ProcessorArchitecture for compatibility. (#80581)

* Set AssemblyName.ProcessorArchitecture for compatibility.

* Simplified ProcArch computation.

23 months ago[main] Update dependencies from dotnet/arcade (#80547)
dotnet-maestro[bot] [Wed, 18 Jan 2023 03:58:17 +0000 (21:58 -0600)]
[main] Update dependencies from dotnet/arcade (#80547)

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

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

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

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

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

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

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

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

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Co-authored-by: Larry Ewing <lewing@microsoft.com>
23 months agoUpdate dependencies from https://github.com/dotnet/linker build 20230114.1 (#80655)
dotnet-maestro[bot] [Wed, 18 Jan 2023 03:56:54 +0000 (21:56 -0600)]
Update dependencies from https://github.com/dotnet/linker build 20230114.1 (#80655)

Microsoft.NET.ILLink.Tasks
 From Version 8.0.100-1.23062.1 -> To Version 8.0.100-1.23064.1

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
23 months agoUpdating stind_ref.il test to actually use stind_ref (#80761)
Will Smith [Wed, 18 Jan 2023 03:22:13 +0000 (19:22 -0800)]
Updating stind_ref.il test to actually use stind_ref (#80761)

23 months agoDefault to ILC host architecture that matches OS architecture on Windows (#80752)
Jan Kotas [Wed, 18 Jan 2023 01:01:18 +0000 (17:01 -0800)]
Default to ILC host architecture that matches OS architecture on Windows (#80752)

It allows compilation using msbuild.exe that is x86 by default

23 months agoJIT: maintain pred lists during loop unrolling (#80625)
Andy Ayers [Wed, 18 Jan 2023 00:31:19 +0000 (16:31 -0800)]
JIT: maintain pred lists during loop unrolling (#80625)

We now update pred lists during loop unrolling, rather than recomputing
them from scratch.

There are several parts to the fix: first, `optRedirectBlock' now has
a new ability to add pred references for the flow from a newly cloned
block, be it either to a remapped successor or a non-remapped successor.
Along with this we no longer copy over the block ref count in `CloneBlockState`.
These changes allow us to create the right pred links and ref counts in the
interior of a cloned subgraph.

Second, we now scrub block references from the original loop body blocks
instead of just setting their ref counts to zero.

Finally, we fix up references for exterior flow into and out of the unroll
complex.

Addresses one of the cases mentioned in #49030.

23 months agoIntroduce TieredPGO_InstrumentedTierAlwaysOptimized for PGO tests (#80524)
Egor Bogatov [Tue, 17 Jan 2023 23:30:43 +0000 (00:30 +0100)]
Introduce TieredPGO_InstrumentedTierAlwaysOptimized for PGO tests (#80524)

23 months ago[wasm] Change TrimMode setting for templates, and tests (#80639)
Ankit Jain [Tue, 17 Jan 2023 21:28:47 +0000 (16:28 -0500)]
[wasm] Change TrimMode setting for templates, and tests (#80639)

* [wasm] Set TrimMode=full for templates

* [wasm] Remove TrimMode=partial default setting

.. and set TrimMode=partial for library tests.

* [wasm] don't set TrimMode explicitly for template projects. it will default to full now

23 months agoSolve recently introduce ASCII regression (#80709)
Adam Sitnik [Tue, 17 Jan 2023 21:24:08 +0000 (22:24 +0100)]
Solve recently introduce ASCII regression (#80709)

* call the helper methods directly to reduce overhead (important for small inputs)

* inline the helper that was supposed to be public into it's only caller

23 months ago[wbt] correctly add RunAnalyzers property to template projects (#80747)
Aleksey Kliger (λgeek) [Tue, 17 Jan 2023 20:36:05 +0000 (15:36 -0500)]
[wbt] correctly add RunAnalyzers property to template projects (#80747)

* [wbt] correctly add RunAnalyzers property to template projects

Follow-up for https://github.com/dotnet/runtime/pull/77704

The first argument to `AddItemsPropertiesToProject` is the project file

* Catch non-existent projectFiles even if there's nothing to add

23 months ago[mono][aot] Reduce collisions in mono_aot_method_hash () for some wrappers. (#80667)
Zoltan Varga [Tue, 17 Jan 2023 19:33:30 +0000 (14:33 -0500)]
[mono][aot] Reduce collisions in mono_aot_method_hash () for some wrappers. (#80667)

23 months agoFix fuzzers for .NET 8 SDK publish (#80673)
Jakob Botsch Nielsen [Tue, 17 Jan 2023 17:52:57 +0000 (18:52 +0100)]
Fix fuzzers for .NET 8 SDK publish (#80673)

dotnet publish does not allow publishing with an output path in the .NET
8 SDK. They failed this weekend's rolling runs so this change makes the
build scripts specify the project to build.

23 months agoAdd the DbgDisablePagemapUse environment variable to control pagemap useage (#80714)
Mike McLaughlin [Tue, 17 Jan 2023 17:40:58 +0000 (09:40 -0800)]
Add the DbgDisablePagemapUse environment variable to control pagemap useage (#80714)

The default is currently opt-in. "DbgDisablePagemapUse=0" needs to be set to
enable the pagemap checking feature. It is opt-in because it is breaking createdump
testing against 8.0.

23 months ago[wasm] debugger tests- Misc improvements (#80660)
Ankit Jain [Tue, 17 Jan 2023 16:54:57 +0000 (11:54 -0500)]
[wasm] debugger tests- Misc improvements (#80660)

* [wasm] DebuggerTests - Split EvaluateOnCallFrameTests

* [wasm] debugger tests - emit some output on CI

23 months agoAdd location of NativeAot Corelib project (#80738)
Andrii Kurdiumov [Tue, 17 Jan 2023 16:06:07 +0000 (22:06 +0600)]
Add location of NativeAot Corelib project (#80738)

23 months agoUpdate JsonSerializerOptions.AddContext to have combine semantics. (#80698)
Eirik Tsarpalis [Tue, 17 Jan 2023 14:53:07 +0000 (14:53 +0000)]
Update JsonSerializerOptions.AddContext to have combine semantics. (#80698)

* Update JsonSerializerOptions.AddContext to have combine semantics.

* Remove unused property setter.

* Remove unused error message.

* Update XML documentation.

23 months agoAdd statically linked libnuma support for AOT (#80671)
Adeel Mujahid [Tue, 17 Jan 2023 14:19:41 +0000 (16:19 +0200)]
Add statically linked libnuma support for AOT (#80671)

* Add statically linked libnuma support for AOT

* Fix windows build

* Update src/coreclr/nativeaot/docs/compiling.md

* Align formatting in doc

* Address CR feedback

* Add ability to skip static PIE

* Cleanup pal.cpp

* Highlight LGPL with a note in doc

Co-authored-by: Jan Kotas <jkotas@microsoft.com>
23 months agoUse CompressionLevel.SmallestSize in Bundler (#80372)
Stephen Toub [Tue, 17 Jan 2023 13:02:30 +0000 (08:02 -0500)]
Use CompressionLevel.SmallestSize in Bundler (#80372)

23 months agoDon't try to fold ADD(CNS, CNS-handle) in gtWalkOp (#80704)
Egor Bogatov [Tue, 17 Jan 2023 11:47:29 +0000 (12:47 +0100)]
Don't try to fold ADD(CNS, CNS-handle) in gtWalkOp (#80704)

23 months ago[browser] avoid undefined stack (#80707)
Pavel Savara [Tue, 17 Jan 2023 11:08:46 +0000 (12:08 +0100)]
[browser] avoid undefined stack (#80707)

23 months agoUpdate cross-arm-alpine image to Ubuntu 22.04 host (#80725)
Adeel Mujahid [Tue, 17 Jan 2023 10:21:24 +0000 (12:21 +0200)]
Update cross-arm-alpine image to Ubuntu 22.04 host (#80725)

23 months agoDisable onelocbuild in official builds (#80730)
Viktor Hofer [Tue, 17 Jan 2023 10:20:05 +0000 (11:20 +0100)]
Disable onelocbuild in official builds (#80730)

23 months agoDon't build tools along with libraries to stop producing the Microsoft.NET.ILLink...
Tlakaelel Axayakatl Ceja [Tue, 17 Jan 2023 09:54:31 +0000 (01:54 -0800)]
Don't build tools along with libraries to stop producing the Microsoft.NET.ILLink.Tasks package (#80720)

23 months agoFix overwriting of superpmi log file (#80716)
Bruce Forstall [Tue, 17 Jan 2023 06:49:05 +0000 (22:49 -0800)]
Fix overwriting of superpmi log file (#80716)

* Fix overwriting of superpmi log file

The invocation of "tpdiff" was overwriting the log file generated by
superpmi.py of the asmdiffs run. Use a unique log file for each
invocation.

run-superpmi-diffs-job.yml is already configured to copy all
`superpmi_*.log` files to the output, so these new names will get saved.

* Fix file list in DownloadFilesFromResults

23 months agoRevert "Decommit memory as needed (#79912)" (#80723)
Jan Kotas [Tue, 17 Jan 2023 05:57:01 +0000 (21:57 -0800)]
Revert "Decommit memory as needed (#79912)" (#80723)

This reverts commit 6da8e2a27bd43a913b8a2a8a107cefbf57b069c8.

23 months agoMake it possible to construct StackFrame without MethodBase (#80681)
Michal Strehovský [Tue, 17 Jan 2023 05:55:28 +0000 (14:55 +0900)]
Make it possible to construct StackFrame without MethodBase (#80681)

Contributes to #80165.

Resolving a `MethodBase` is a pretty expensive operation and currently even a hello world needs it because of `Exception.ToString()`. This pull request is trying to get `MethodBase` out of the picture when constructing the exception string.

We currently only need `_method` for two things - the public `GetMethod` API, and `StackFrame.ToString`. The `StackFrame.ToString` can already deal with `_method` being null (and that codepath exists solely for NativeAOT). This is the minimal change. We could potentially explore other approaches - leave `MethodBase` always at null, or unshare the `StackFrame` class.

23 months agoMerge pull request #80678 from tlakollo/SyncILLink
Jan Kotas [Tue, 17 Jan 2023 02:54:07 +0000 (18:54 -0800)]
Merge pull request #80678 from tlakollo/SyncILLink

Sync ILLink

23 months agoRemove usage of ComPlus_ variables in tests (#78377)
Nagaev Renat [Tue, 17 Jan 2023 02:34:22 +0000 (05:34 +0300)]
Remove usage of ComPlus_ variables in tests (#78377)

In coreclr's configuration cache, DOTNET_ is preferred over COMPlus_

Fix #76484

Co-authored-by: Jan Kotas <jkotas@microsoft.com>
23 months agoIncrease superpmi-replay x64 parallelism (#80712)
Bruce Forstall [Tue, 17 Jan 2023 00:02:27 +0000 (16:02 -0800)]
Increase superpmi-replay x64 parallelism (#80712)

Increase partitions per platform from 2 to 3 for x64 runs to
reduce overall run time.

23 months agoGenerate fewer templates for generic virtual methods (#80600)
Michal Strehovský [Mon, 16 Jan 2023 23:28:31 +0000 (08:28 +0900)]
Generate fewer templates for generic virtual methods (#80600)

The only reason left why we needed the extra template was because when we're breaking down a `RuntimeMethodHandle` into components, we were trying to break it down into `RuntimeTypeHandle`s. But what we need is a `MethodDesc`. So shortcut the codepath that computes `MethodDesc`, then breaks it down into various type handles and then get a `MethodDesc` again.

23 months agoAdd type loader support for resolving static virtuals (#80601)
Michal Strehovský [Mon, 16 Jan 2023 23:27:50 +0000 (08:27 +0900)]
Add type loader support for resolving static virtuals (#80601)

The implementation of static virtuals was limited to compile-time resolution in .NET 7. I erroneously believed runtime resolution can only happen with `MakeGenericType`/`MakeGenericMethod` and therefore falls into the general "don't do dynamic code" bucket. But this is also reachable from generic instance virtual method resolution that is also dynamic-like (we don't attempt to precompute all runtime artifacts, only canonical code).

This contains compiler changes to start tracking static virtual method use within type loader templates the same way how we track instance generic virtual method use (i.e. those static virtual uses that happen at compile time are not tracked in this - only the dynamic ones). We also make sure the computed targets get generated into the appropriate table.

The other part of the change is a type loader change to call into the generic virtual method resolution logic when needed.

23 months agoRefactor lookupNamedIntrinsic to avoid common duplicate checks (#80705)
Tanner Gooding [Mon, 16 Jan 2023 20:39:29 +0000 (12:39 -0800)]
Refactor lookupNamedIntrinsic to avoid common duplicate checks (#80705)

23 months agoNormalize RepoRoot path to improve logs readability (#80664)
Adeel Mujahid [Mon, 16 Jan 2023 17:56:33 +0000 (19:56 +0200)]
Normalize RepoRoot path to improve logs readability (#80664)

23 months ago[Android] Improvements to remote certificate verification in SslStream (#77386)
Šimon Rozsíval [Mon, 16 Jan 2023 17:54:21 +0000 (18:54 +0100)]
[Android] Improvements to remote certificate verification in SslStream (#77386)

* Extract existing validation code into a separate class

* Implement AndroidDexBuilderTask

* Implement TrustManager proxy

* Integrate the trust manager proxy with SslStream on Android

* Update tests

* Update System.Net.Http tests

* Update System.Net.Security tests

* Fix packaging

* Propagate caught exceptions

* Build and pack .jar

* Optimize allocation and deallocation of memory for certificate data

* Fix building .jar

* Cleanup

* Remove complicated certificate copying

* Remove unnecessary JNI classes and methods

* Simplify and fix the core implementation

* Update enabled and disabled tests

* Cleanup

* Renaming

* Remove unnecessary changes

* Fix invoking validation even when the Java callbacks aren't called (no peer certificate to validate)

* Minor refactoring

* Enable more unnecessarily disabled tests

* Refactor exception handling

* Update disabled tests

* Renaming

* Remove network security config workarounds

* Keep existing active issue

* Remove unnecessary changes

* Remove unnecessary code

* Enable more disabled tests

* Fix throwing exception

* Fix intptr_t cast to Java

* Remove initialization lock

* Update naming

* Fix type casting

* Improve throwing validation exception

* Experiment with code structure

* Fix repeated calls to beginHandshake

* Make SslStream proxy mandatory

* Add missing attributes

* Free temporary buffer

* Update src/native/libs/System.Security.Cryptography.Native.Android/pal_sslstream.c

Co-authored-by: Elinor Fung <elfung@microsoft.com>
* Refactor creating array of trust managers

* Add comments and clean up pal_sslstream.c

* Revert experimental change

* Remove special case for IPv6 addresses as hostnames and disable affected tests

* Fix duplicate variable after merge

* Improve code formatting

* Remove the hack with SafeDeleteContextStub

* Enable passing test

* Remove unnecessary factory

* Move clearing selected client certificate out of the remote certificate verification method

* Fix typo in comment

* Add comment with java equivalent

* Move Android specific runtime files into a separate item group

* Apply suggestions from code review

Co-authored-by: Alexander Köplinger <alex.koeplinger@outlook.com>
* Update src/native/libs/build-native.proj

Co-authored-by: Alexander Köplinger <alex.koeplinger@outlook.com>
* Disable test that fails on Android emualtors

Co-authored-by: Elinor Fung <elfung@microsoft.com>
Co-authored-by: Alexander Köplinger <alex.koeplinger@outlook.com>
23 months ago[Android] Add error code to the assert error message (#80423)
Šimon Rozsíval [Mon, 16 Jan 2023 15:50:13 +0000 (16:50 +0100)]
[Android] Add error code to the assert error message (#80423)

23 months agoJIT: Fix implicit byref block expansion (#80659)
Jakob Botsch Nielsen [Mon, 16 Jan 2023 14:29:20 +0000 (15:29 +0100)]
JIT: Fix implicit byref block expansion (#80659)

Fix #80616

23 months ago[mono][interp] Expand bblocks reordering with common patterns to facilitate propagati...
Milos Kotlar [Mon, 16 Jan 2023 13:40:08 +0000 (14:40 +0100)]
[mono][interp] Expand bblocks reordering with common patterns to facilitate propagation of values (#80362)

* Optimize interp_reorder_bblocks function by moving known patterns into callers bblocks.

* Update interp_inline_into_callers function to match specific patterns and return lookup cond_ins.

23 months ago[mono] Cleanup some unused functions/headers (#80618)
Alexander Köplinger [Mon, 16 Jan 2023 13:05:39 +0000 (14:05 +0100)]
[mono] Cleanup some unused functions/headers (#80618)

23 months agoAdd tests for exercising certificates with platform provider keys (#80558)
Kevin Jones [Mon, 16 Jan 2023 10:36:41 +0000 (05:36 -0500)]
Add tests for exercising certificates with platform provider keys (#80558)

* Add tests for exercising certificate with platform provider keys.

* Refactor CngKey PCP test key creation

23 months ago[QUIC] Log msquic version and commit hash to event log and to test output. (#80612)
Marie Píchová [Mon, 16 Jan 2023 09:41:25 +0000 (10:41 +0100)]
[QUIC] Log msquic version and commit hash to event log and to test output. (#80612)

* Log msquic version and commit hash to event log and to test output.

* Feedback

23 months agoMake reading custom attributes in NativeLibrary avoidable (#80677)
Michal Strehovský [Mon, 16 Jan 2023 09:17:28 +0000 (18:17 +0900)]
Make reading custom attributes in NativeLibrary avoidable (#80677)

Contributes to #80165.

Unfortunately, the `NativeLibrary` APIs contain a pattern where one can skip providing a parameter to the API and then something expensive (custom attribute reading) will happen to compute the value. We have a `TryLoad` call in a hello world that does provide the value (in GlobalizationMode.cs). Make it possible to avoid the expensive thing internally.

23 months agoRename System.Text.Json test exclusion (#80676)
Michal Strehovský [Mon, 16 Jan 2023 08:59:30 +0000 (17:59 +0900)]
Rename System.Text.Json test exclusion (#80676)

23 months agoMerge branch 'main' of ../linker into main
Tlakaelel Axayakatl Ceja [Mon, 16 Jan 2023 05:36:53 +0000 (05:36 +0000)]
Merge branch 'main' of ../linker into main

23 months agoAdd logger and tests for xml parsing in NativeAOT (#80470)
Tlakaelel Axayakatl Ceja [Mon, 16 Jan 2023 04:36:34 +0000 (20:36 -0800)]
Add logger and tests for xml parsing in NativeAOT  (#80470)

Add logger to LinkerXml Processing
Hookup xml reading into testing infra
Port linker xml tests to test cases
Document differences in testing between linker and NativeAOT
Open issues in NativeAOT for remaining differences
Don't throw if not able to resolve assembly
Add a comment on why the MarkAndPreserve method is implemented differently from illink

23 months agoUpdate our inline observations to special case a few more intrinsics (#80637)
Tanner Gooding [Sun, 15 Jan 2023 22:25:39 +0000 (14:25 -0800)]
Update our inline observations to special case a few more intrinsics (#80637)

* Update our inline observations to special case a few more intrinsics

* Apply formatting patch

23 months ago[API Implementation]: Deconstruct for DateTime, DateTimeOffset, DateOnly, and TimeOnl...
Robin Lindner [Sun, 15 Jan 2023 22:11:50 +0000 (23:11 +0100)]
[API Implementation]: Deconstruct for DateTime, DateTimeOffset, DateOnly, and TimeOnly (#79499)

Closes https://github.com/dotnet/runtime/issues/24601

23 months agoBe more conservative with peephole optimization (#80645)
Bruce Forstall [Sun, 15 Jan 2023 18:48:05 +0000 (10:48 -0800)]
Be more conservative with peephole optimization (#80645)

Do not allow any peephole optimization between a NOGC and
non-NOGC IG.

This introduces a very few diffs, all regressions and none
existing GC holes, where a register load as the first instruction
of a NOGC region is not optimized. These mostly look like cases
where we zero initialize a struct then copy the struct to another
stack-based struct. If we could forward-prop the zero that might
eliminate most of the diffs.

The check on `emitForceNewIG` introduced in #78074 is still
required, as that is used to "exit" a NOGC region without actually
creating a new IG without the NOGC flag.

23 months agoUse ROS<long> in FormattingHelpers instead of ROS<byte> (#80668)
Egor Bogatov [Sun, 15 Jan 2023 18:46:22 +0000 (19:46 +0100)]
Use ROS<long> in FormattingHelpers instead of ROS<byte> (#80668)

23 months agoRemove duplicate function (#80643)
Bruce Forstall [Sun, 15 Jan 2023 18:44:13 +0000 (10:44 -0800)]
Remove duplicate function (#80643)

Remove function `emitGetInstrDescSizeSC()`, only used on arm,
and replace uses by the identical `emitGetInstrDescSize()`.

23 months agoHandle float/double for RVA[cns] optimization in fgValueNumberConstLoad (#80661)
Egor Bogatov [Sun, 15 Jan 2023 16:47:52 +0000 (17:47 +0100)]
Handle float/double for RVA[cns] optimization in fgValueNumberConstLoad (#80661)

23 months ago[wasm] Quote illink substitutions path (#80657)
Radek Doulik [Sun, 15 Jan 2023 16:08:29 +0000 (17:08 +0100)]
[wasm] Quote illink substitutions path (#80657)

23 months agoAdd ability statically link OpenSSL (#80380)
Andrii Kurdiumov [Sun, 15 Jan 2023 07:15:22 +0000 (13:15 +0600)]
Add ability statically link OpenSSL (#80380)

* Add ability statically link OpenSSL

This setup works if I apply this as local customizations, I do not sure that I use OpenSSL in most secure way, I do not competent. This setup and StaticExecutable=true allow package just EXE file + /etc/ssl/certs/ folder in Docker

* Share build scripts across Globalization and OpenSSL

* Add warning

Co-authored-by: Adeel Mujahid <3840695+am11@users.noreply.github.com>
23 months agoFix some low-hanging HWIntrinsic issues (#80626)
Tanner Gooding [Sun, 15 Jan 2023 06:13:25 +0000 (22:13 -0800)]
Fix some low-hanging HWIntrinsic issues (#80626)

* Ensure isSimdAsHWIntrinsic is false for Vector64/128/256.WithElement

* Ensure AsVector2 and AsVector3 are intrinsic

* Ensure AsVector128(Vector2) and AsVector128(Vector3) are handled as intrinsic

* Ensure Vector64/128/256.AsNInt and AsNUInt are handled as intrinsic

* Ensure Vector*<T>.IsSupported is handled as intrinsic

* Ensure get_Count for Vector64/128/256<T> and Vector<T> is handled as intrinsic

* Apply formatting patch

* Ensure the right simdSize is selected for AsVector128

* Ensure AsVector2/3 are correctly handled in lowering

* Ensure AsVector2 passes in op1 on Arm64

23 months ago[mono][wasm] Avoid emitting the eh info table, its not used on wasm. (#80653)
Zoltan Varga [Sun, 15 Jan 2023 02:31:53 +0000 (21:31 -0500)]
[mono][wasm] Avoid emitting the eh info table, its not used on wasm. (#80653)

23 months agoAdd support for llvm linker (lld) (#80613)
Adeel Mujahid [Sat, 14 Jan 2023 22:23:46 +0000 (00:23 +0200)]
Add support for llvm linker (lld) (#80613)

23 months agoFix GC hole in newly added test (#80630)
Jakob Botsch Nielsen [Sat, 14 Jan 2023 18:51:43 +0000 (19:51 +0100)]
Fix GC hole in newly added test (#80630)

GC stress is red after 78ccdaeeb4ccc5d0eff36b2eadc5e1cb07403fcd due to a
delegate not being kept alive.

23 months agoRemove forward slash in trimmer args (#80631)
Larry Ewing [Sat, 14 Jan 2023 16:23:17 +0000 (10:23 -0600)]
Remove forward slash in trimmer args (#80631)

23 months agoSet FieldSeq in CreateSpan (#80622)
Egor Bogatov [Sat, 14 Jan 2023 10:43:56 +0000 (11:43 +0100)]
Set FieldSeq in CreateSpan (#80622)

23 months agoFix race condition in build (dotnet/linker#3185)
Sven Boemer [Sat, 14 Jan 2023 08:51:00 +0000 (00:51 -0800)]
Fix race condition in build (dotnet/linker#3185)

Commit migrated from https://github.com/dotnet/linker/commit/44520382eda0c82c5a4d3f38d3f59965f3ba90b0

23 months agoAllow eliminating virtual methods on abstract classes (#80607)
Michal Strehovský [Sat, 14 Jan 2023 06:09:05 +0000 (15:09 +0900)]
Allow eliminating virtual methods on abstract classes (#80607)

Allow removing method bodies of virtual methods on abstract classes when the methods were overriden by descendants.

E.g.

```csharp
Base b = new Derived();
b.Expensive();

abstract class Base
{
    public virtual void Expensive() { expensive stuff; }
}

class Derived : Base
{
    public override void Expensive() { other stuff; }
}
```

The method body of `Base.Expensive` is unreachable, but we're still generating it because it's referenced from the `Base` vtable. Not anymore.

This is pretty much a rollback of https://github.com/dotnet/runtime/pull/66145 with a small fix in ILScanner that fixes the problematic scenarios. I don't know why I gave up so quickly last time.

What we do is instead of generating hard dependencies on the implementation method entrypoints in abstract classes, we delay the dependency on the entrypoint until a derived non-abstract MethodTable. If no non-abstract `MethodTable` that uses this shows up, the entrypoint turns into a throw helper.

23 months agoAdd additional IG assertion checking (#80599)
Bruce Forstall [Sat, 14 Jan 2023 06:08:48 +0000 (22:08 -0800)]
Add additional IG assertion checking (#80599)

* Add additional IG assertion checking

Especially, check various IG flags to ensure illegal combinations
do not occur.

* Feedback

23 months ago[PERF] Fix errors from lowercase OS names (#80629)
Parker Bibus [Sat, 14 Jan 2023 00:48:25 +0000 (16:48 -0800)]
[PERF] Fix errors from lowercase OS names (#80629)

* Change AOT artifacts path to use lowercase linux as the os names were recently normalized to lowercase.
* Add ios fix for the same issue of os needing to be lowercase.

23 months agoDont produce ILLink packages from runtime til preview 2 (#80627)
Tlakaelel Axayakatl Ceja [Fri, 13 Jan 2023 23:29:30 +0000 (15:29 -0800)]
Dont produce ILLink packages from runtime til preview 2 (#80627)

23 months agoUse weak handle for the back reference to EventProvider (#80482)
Jan Kotas [Fri, 13 Jan 2023 23:20:20 +0000 (15:20 -0800)]
Use weak handle for the back reference to EventProvider (#80482)

* Use weak handle for the back reference to EventProvider

This avoids leak when the event provider is orphaned without explicit unregistration.

Fixes #80450

* Delete unnecessary IEventProvider interface

Repurpose no-op event provider as a base class

* Fix warning on wasm

23 months ago[mono][aot] Simplify the dedup code. (#80442)
Zoltan Varga [Fri, 13 Jan 2023 20:11:05 +0000 (15:11 -0500)]
[mono][aot] Simplify the dedup code. (#80442)

Instead of passing state around in a MonoAotState structure, use a few
global variables.

23 months agoMake some tests use single-file publish (#80603)
Elinor Fung [Fri, 13 Jan 2023 16:37:08 +0000 (08:37 -0800)]
Make some tests use single-file publish (#80603)

23 months agoUse ArgumentOutOfRangeException.ThrowIf helpers in more places (#80355)
Stephen Toub [Fri, 13 Jan 2023 16:05:00 +0000 (11:05 -0500)]
Use ArgumentOutOfRangeException.ThrowIf helpers in more places (#80355)

* Use ArgumentOutOfRangeException.ThrowIf helpers in more places

* Apply suggestions from code review

Co-authored-by: Buyaa Namnan <buyankhishig.namnan@microsoft.com>
Co-authored-by: Buyaa Namnan <buyankhishig.namnan@microsoft.com>
23 months agoUse Roslyn support for RuntimeHelpers.CreateSpan (or field caching downlevel) (#79461)
Stephen Toub [Fri, 13 Jan 2023 16:04:50 +0000 (11:04 -0500)]
Use Roslyn support for RuntimeHelpers.CreateSpan (or field caching downlevel) (#79461)

23 months agoJIT: Enable edge based profiles for all scenarios (#80481)
Andy Ayers [Fri, 13 Jan 2023 16:02:14 +0000 (08:02 -0800)]
JIT: Enable edge based profiles for all scenarios (#80481)

Enable edge based profiles for OSR, partial compilation, and optimized plus
instrumented cases.

For OSR this requires deferring flow graph modifications until after we have
built the initial probe list, so that the initial list reflects the entirety
of the method. This set of candidate edge probes is thus the same no matter how
the method is compiled. A given compile may schematize a subset of these probes
and materialize a subset of what gets schematized; this is tolerated by the PGO
mechanism provided that the initial instrumented jitting produces a schema which
is a superset of the schema produced by any subsequent instrumented rejitting.
This is normally the case.

Partial compilation may still need some work to ensure full schematization but
it is currently off by default. Will address this subsequently.

For optimized compiles we give the EfficientEdgeCountInstrumentor the same kind
of probe relocation abilities that we have in the BlockCountInstrumentor. In
particular we need to move probes that might appear in return blocks that follow
implicit tail call blocks, since those return blocks must remain empty.

The details on how we do this are a bit different but the idea is the same: we
create duplicate copies of any probe that was going to appear in the return block
and instead instrument each pred. If the pred reached the return via a critical
edge, we split the edge and put the probe there. This analysis relies on cheap
preds, so to ensure we can use them we move all the critial edge splitting so it
happens before we need the cheap pred lists.

The ability to do block profiling is retained but will no longer be used without
special config settings.

There were also a few bug fixes in the spanning tree visitor. It must visit a
superset of the blocks we end up importing and was missing visits in some cases.

This should improve jit time and code quality for instrumented code.

Fixes #47942.
Fixes #66101.
Contributes to #74873.

23 months agoEmit mneg for mul+neg on Arm64 (#79550)
SwapnilGaikwad [Fri, 13 Jan 2023 15:30:06 +0000 (15:30 +0000)]
Emit mneg for mul+neg on Arm64 (#79550)

23 months agoHave SIMD Load/Store use GT_IND and GT_ASG where possible (#80411)
Tanner Gooding [Fri, 13 Jan 2023 15:15:28 +0000 (07:15 -0800)]
Have SIMD Load/Store use GT_IND and GT_ASG where possible (#80411)

* Moving the LoadVector intrinsics to use `gtNewSimdLoad*Node` helper APIs

* Switching SimdLoadNode to return GT_IND

* Merge separate imp*Intrinsic paths on xarch into impSpecialIntrinsic

* Updating the LoadVector64/128/256 APIs of Sse/Sse2/Avx and AdvSimd to use gtNewSimdLoadNode

* Moving the StoreVector intrinsics to use `gtNewSimdStore*Node` helper APIs

* Switching SimdStoreNode to return GT_ASG

* Updating the Store APIs of Sse/Sse2/Avx and AdvSimd to use gtNewSimdStoreNode

* Make the SIMD load/store instruction consistent between VEX and non-VEX

* Use GTF_REVERSE_OPS instead of impSpillSideEffect

* Applying formatting patch

* Responding to PR feedback

* Revert "Use GTF_REVERSE_OPS instead of impSpillSideEffect"

This reverts commit 0c557822e37405e96762f1403ecf98020d17a11a.

* Remove an unnecessary assert for gtNewSimdLoad/StoreNode

23 months agoFixed Typo (#80609)
Divan van Zyl [Fri, 13 Jan 2023 13:05:47 +0000 (15:05 +0200)]
Fixed Typo (#80609)

23 months ago[main] Update dependencies from 9 repositories (#80429)
dotnet-maestro[bot] [Fri, 13 Jan 2023 11:01:49 +0000 (12:01 +0100)]
[main] Update dependencies from 9 repositories (#80429)

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

Microsoft.NETCore.Runtime.ICU.Transport
 From Version 8.0.0-alpha.1.23056.1 -> To Version 8.0.0-alpha.1.23059.1

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

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

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

Microsoft.DotNet.CilStrip.Sources , System.ComponentModel.TypeConverter.TestData , System.Drawing.Common.TestData , System.Formats.Tar.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 8.0.0-beta.23059.1 -> To Version 8.0.0-beta.23059.2

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

Microsoft.CodeAnalysis.Analyzers , Microsoft.CodeAnalysis.NetAnalyzers
 From Version 3.3.4-beta1.23058.2 -> To Version 3.3.4-beta1.23059.1

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

Microsoft.DotNet.HotReload.Utils.Generator.BuildTool
 From Version 1.1.0-alpha.0.22628.1 -> To Version 1.1.0-alpha.0.23059.1

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

Microsoft.NET.Workload.Emscripten.net7.Manifest-8.0.100
 From Version 8.0.0-alpha.1.23054.1 -> To Version 8.0.0-alpha.1.23061.1

* Update dependencies from https://github.com/dotnet/cecil build 20230110.1

Microsoft.DotNet.Cecil , Microsoft.DotNet.Cecil.Pdb
 From Version 0.11.4-alpha.23053.1 -> To Version 0.11.4-alpha.23060.1

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

Microsoft.DotNet.HotReload.Utils.Generator.BuildTool
 From Version 1.1.0-alpha.0.22628.1 -> To Version 1.1.0-alpha.0.23061.2

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

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-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk , runtime.osx-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools , runtime.osx-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk , runtime.osx-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools , runtime.win-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk , runtime.win-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools
 From Version 14.0.0-alpha.1.22626.2 -> To Version 14.0.0-alpha.1.23061.1

* Update dependencies from https://dev.azure.com/dnceng/internal/_git/dotnet-optimization build 20230111.7

optimization.linux-arm64.MIBC.Runtime , optimization.linux-x64.MIBC.Runtime , optimization.windows_nt-arm64.MIBC.Runtime , optimization.windows_nt-x64.MIBC.Runtime , optimization.windows_nt-x86.MIBC.Runtime , optimization.PGO.CoreCLR
 From Version 1.0.0-prerelease.22511.6 -> To Version 1.0.0-prerelease.23061.7

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
23 months agoEnable specifying custom native main source with AppleAppBuilderTask (#80546)
Ivan Povazan [Fri, 13 Jan 2023 09:23:19 +0000 (10:23 +0100)]
Enable specifying custom native main source with AppleAppBuilderTask (#80546)

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

23 months ago[main] Update dependencies from dotnet/linker (#79449)
dotnet-maestro[bot] [Fri, 13 Jan 2023 08:15:45 +0000 (09:15 +0100)]
[main] Update dependencies from dotnet/linker (#79449)

* Update dependencies from https://github.com/dotnet/linker build 20221208.1

Microsoft.NET.ILLink.Tasks
 From Version 7.0.100-1.22606.1 -> To Version 8.0.100-1.22608.1

* Update dependencies from https://github.com/dotnet/linker build 20221209.1

Microsoft.NET.ILLink.Tasks
 From Version 7.0.100-1.22606.1 -> To Version 8.0.100-1.22609.1

* Update dependencies from https://github.com/dotnet/linker build 20221212.1

Microsoft.NET.ILLink.Tasks
 From Version 7.0.100-1.22606.1 -> To Version 8.0.100-1.22612.1

* Update dependencies from https://github.com/dotnet/linker build 20221212.2

Microsoft.NET.ILLink.Tasks
 From Version 7.0.100-1.22606.1 -> To Version 8.0.100-1.22612.2

* Update dependencies from https://github.com/dotnet/linker build 20221219.1

Microsoft.NET.ILLink.Tasks
 From Version 7.0.100-1.22606.1 -> To Version 8.0.100-1.22619.1

* Update dependencies from https://github.com/dotnet/linker build 20230102.2

Microsoft.NET.ILLink.Tasks
 From Version 7.0.100-1.22606.1 -> To Version 8.0.100-1.23052.2

* Update dependencies from https://github.com/dotnet/linker build 20230104.1

Microsoft.NET.ILLink.Tasks
 From Version 7.0.100-1.22606.1 -> To Version 8.0.100-1.23054.1

* Update dependencies from https://github.com/dotnet/linker build 20230105.2

Microsoft.NET.ILLink.Tasks
 From Version 7.0.100-1.22606.1 -> To Version 8.0.100-1.23055.2

* Update dependencies from https://github.com/dotnet/linker build 20230109.1

Microsoft.NET.ILLink.Tasks
 From Version 7.0.100-1.22606.1 -> To Version 8.0.100-1.23059.1

* Update dependencies from https://github.com/dotnet/linker build 20230110.1

Microsoft.NET.ILLink.Tasks
 From Version 7.0.100-1.22606.1 -> To Version 8.0.100-1.23060.1

* Update dependencies from https://github.com/dotnet/linker build 20230112.1

Microsoft.NET.ILLink.Tasks
 From Version 7.0.100-1.22606.1 -> To Version 8.0.100-1.23062.1

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
23 months agoLocalized file check-in by OneLocBuild Task: Build definition ID 679: Build ID 208762...
dotnet bot [Fri, 13 Jan 2023 08:08:54 +0000 (00:08 -0800)]
Localized file check-in by OneLocBuild Task: Build definition ID 679: Build ID 2087627 (#80505)

* Localized file check-in by OneLocBuild Task: Build definition ID 679: Build ID 2085603

* Localized file check-in by OneLocBuild Task: Build definition ID 679: Build ID 2085846

* Localized file check-in by OneLocBuild Task: Build definition ID 679: Build ID 2087105

* Localized file check-in by OneLocBuild Task: Build definition ID 679: Build ID 2087404

23 months agoDispose archive stream after the list of DataStreams (#80572)
David Cantú [Fri, 13 Jan 2023 05:23:15 +0000 (23:23 -0600)]
Dispose archive stream after the list of DataStreams (#80572)

* Dispose archive stream after the list of DataStreams

* Add tests for TarReader.DisposeAsync properly disposing underlying stream

23 months agodelete enum support for bool as an underlying type (#79962)
Badre BSAILA [Fri, 13 Jan 2023 05:17:13 +0000 (06:17 +0100)]
delete enum support for bool as an underlying type (#79962)

* delete enum support for bool as an underlying type

* keep loading bool backed enum tests

* rollback changes in the type loader

* rollback additionaml test

* rollback code optimized by jit

Co-authored-by: Jan Kotas <jkotas@microsoft.com>
23 months agoRemoving old variable debug info tracking system (#80537)
Brian Bohe [Fri, 13 Jan 2023 04:18:46 +0000 (01:18 -0300)]
Removing old variable debug info tracking system (#80537)

* Removing ScopeInfo variable debug info

Variable live range replaced it on 2019.

* Removing VaribleLiveRange preprocessing flag

* Adding #if defined(DEBUG)

* Using ifdef in place of defined

23 months ago[wasm] Move microbenchmarks, and blazor SOD runs to net8.0 (#80308)
Ankit Jain [Fri, 13 Jan 2023 02:42:23 +0000 (21:42 -0500)]
[wasm] Move microbenchmarks, and blazor SOD runs to net8.0 (#80308)

* [wasm] perf: generate, and collect binlogs

* [wasm] perf: remove workaround to allow building for net8.0 with 8.0 sdk

* [wasm] perf: revert to using latest v8

- this is because jsvu fails to generate a wrapper for the specific
  version, because this version of jsvu (2.0.1) is broken with node 14.x
  . And node 18.x builds are not built for ubuntu 18.04

23 months agoFix security transparency issue (#80478)
Noah Falk [Fri, 13 Jan 2023 01:32:26 +0000 (17:32 -0800)]
Fix security transparency issue (#80478)

* Remove APTCA

None of our assemblies support partial trust usage any longer. Removing
the APTCA attribute from S.D.DS so that it follows the pattern.

Fixes #79749

* Remove more code for partial trust

23 months agoPEReader doesn't work with "IsLoadedImage" and "PrefetchMetadata" options (#80106)
Badre BSAILA [Fri, 13 Jan 2023 01:16:49 +0000 (02:16 +0100)]
PEReader doesn't work with "IsLoadedImage" and "PrefetchMetadata" options (#80106)

* PEReader doesn't work with "IsLoadedImage" and "PrefetchMetadata" options

* Apply suggestions from code review

Co-authored-by: MartyIX <203266+MartyIX@users.noreply.github.com>
Co-authored-by: Buyaa Namnan <buyankhishig.namnan@microsoft.com>
23 months agoMoving GetCurrentProcessorId() to shared (#80532)
Vladimir Sadov [Fri, 13 Jan 2023 00:25:57 +0000 (16:25 -0800)]
Moving GetCurrentProcessorId() to shared (#80532)

* move GetCurrentProcessorId() to shared

* delete more native code

* PR feedback

* fix unix build

* unnecessary HAVE_SCHED_GETCPU

23 months agoMake System.Collections.Immutable adhere to repo's var policy (#80556)
Stephen Toub [Fri, 13 Jan 2023 00:25:49 +0000 (19:25 -0500)]
Make System.Collections.Immutable adhere to repo's var policy (#80556)

* Make System.Collections.Immutable consistent with repo's var policy

* Fix vars that were just merged in new file

23 months agoUse MemoryExtensions.Equals in CharArrayHelpers.EqualsOrdinalAsciiIgnoreCase (#80561)
Stephen Toub [Fri, 13 Jan 2023 00:15:47 +0000 (19:15 -0500)]
Use MemoryExtensions.Equals in CharArrayHelpers.EqualsOrdinalAsciiIgnoreCase (#80561)

* Use MemoryExtensions.Equals in CharArrayHelpers.EqualsOrdinalAsciiIgnoreCase

* Delete CharArrayHelpers.EqualsOrdinalAsciiIgnoreCase/Trim

Just use span directly.

23 months agoMove a regression test out of CI (#80399)
Andrew Au [Thu, 12 Jan 2023 23:13:59 +0000 (15:13 -0800)]
Move a regression test out of CI (#80399)

Co-authored-by: Bruce Forstall <brucefo@microsoft.com>
23 months agoAdd support for JsonUnmappedMemberHandling (#79945)
Eirik Tsarpalis [Thu, 12 Jan 2023 22:41:19 +0000 (22:41 +0000)]
Add support for JsonUnmappedMemberHandling (#79945)

* Add support for JsonUnmappedMemberHandling.

* Address feedback

* Ignore global UnmappedMemberHandling setting when a JsonExtensionDataAttribute is specified.

* Fix VerifyOptionsEqual method.

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

Co-authored-by: Krzysztof Wicher <mordotymoja@gmail.com>
Co-authored-by: Krzysztof Wicher <mordotymoja@gmail.com>