platform/upstream/dotnet/runtime.git
2 years agoUpdate owner/mentionees for System.Transactions (#76021)
Shay Rojansky [Thu, 22 Sep 2022 15:38:42 +0000 (17:38 +0200)]
Update owner/mentionees for System.Transactions (#76021)

2 years agoUpdate area owners (#75975)
Dan Moseley [Thu, 22 Sep 2022 15:11:11 +0000 (09:11 -0600)]
Update area owners (#75975)

2 years agoConfiguring Console Json Formatting with JsonWriterOptions doesn't work with Trimming...
Eric Erhardt [Thu, 22 Sep 2022 14:45:17 +0000 (09:45 -0500)]
Configuring Console Json Formatting with JsonWriterOptions doesn't work with Trimming (#75943)

* Configuring Console Json Formatting with JsonWriterOptions doesn't work with Trimming

Ensure the correct members are preserved when trimming and add a trimming test.

Fix #73822

* Enable NativeAOT test that should work now

Fix #73436

2 years agoInitial unification of DynamicMethod to be shareable between runtimes (#75829)
Marek Safar [Thu, 22 Sep 2022 14:22:55 +0000 (16:22 +0200)]
Initial unification of DynamicMethod to be shareable between runtimes (#75829)

2 years agoDelete more verification code (#72747)
SingleAccretion [Thu, 22 Sep 2022 13:49:23 +0000 (16:49 +0300)]
Delete more verification code (#72747)

* Delete dead verification code

* Untangle verCheckTailCallConstraint

We only use it for tail call stress.

2 years agoDelete `GTF_VAR_CAST` (#74461)
SingleAccretion [Thu, 22 Sep 2022 13:43:37 +0000 (16:43 +0300)]
Delete `GTF_VAR_CAST` (#74461)

It is unused.

Tighten an assert in the ref counter.

2 years agoUpdate solution files under src/libraries (#75988)
Viktor Hofer [Thu, 22 Sep 2022 09:45:03 +0000 (11:45 +0200)]
Update solution files under src/libraries (#75988)

* Update slngen version to work with .NET 7 SDKs

* Batch update all solution files under src/libs

... by invoking the following command: "dotnet.cmd build
src/libraries/slngen.proj".

2 years agoClean-up InteropServices.JavaScript project file (#75962)
Viktor Hofer [Thu, 22 Sep 2022 09:44:37 +0000 (11:44 +0200)]
Clean-up InteropServices.JavaScript project file (#75962)

* Clean-up InteropServices.JavaScript project file

2 years ago[mono] Add Vector128 Sum intrinsic for amd64 (#75142)
Matous Kozak [Thu, 22 Sep 2022 05:45:57 +0000 (07:45 +0200)]
[mono] Add Vector128 Sum intrinsic for amd64 (#75142)

* TODO entry point for SN_sum

* Sum for Vector128 AMD64 in progress

* Vector128 Sum intrinsic (not supporting byte type)

* remove semicolon

* space in function def

* defined macro

* code style fix

* SIMD intrinsics check, code style fixes

* move ISA check after i64 code

* Fast log -1 illegal entries

2 years agoFix critical finalization test (#75952)
Anton Lapounov [Thu, 22 Sep 2022 05:31:42 +0000 (22:31 -0700)]
Fix critical finalization test (#75952)

2 years agoSet names to runtime internal threads (#75113)
Hyungju Lee [Thu, 22 Sep 2022 03:16:12 +0000 (12:16 +0900)]
Set names to runtime internal threads (#75113)

* Set names to runtime internal threads

* Fix MAC build

* Shorten ThreadPool thread names

* Fix not to return SetThreadDescription()

* Change SetThreadDescription to SetThreadName

* Set thread names inside thread functions

* Add missing name for MAC

* Move name change info thread function

Co-authored-by: Jan Kotas <jkotas@microsoft.com>
2 years agoPreserve last error for patchpoint helpers (#75922)
Andy Ayers [Thu, 22 Sep 2022 01:28:19 +0000 (18:28 -0700)]
Preserve last error for patchpoint helpers (#75922)

In stress modes (and in normal uses, see test case) the jit may insert
patchpoint helper calls in regions where last error is live. So the helpers
need to preserve last error.

Because some invocations of the helpers may transition to OSR methods instead
of returning, we can't use the normal macros for this.

Fixes #75828.

2 years ago[Mono] Restore old code to solve the recent SpanHelpers regressions (#75917)
Adam Sitnik [Thu, 22 Sep 2022 00:33:20 +0000 (02:33 +0200)]
[Mono] Restore old code to solve the recent SpanHelpers regressions (#75917)

* bring back the old code...

* bring back more old code

* Use an ifdef around clr code instead of a separate file

* Delete SpanHelpers.Clr.cs

* Remove a remaining INumber<T> helper from mono

Co-authored-by: Jeff Handley <jeffhandley@users.noreply.github.com>
2 years agoFail-fast on SuspendThread/ResumeThread failures (#75845)
Koundinya Veluri [Wed, 21 Sep 2022 22:30:10 +0000 (15:30 -0700)]
Fail-fast on SuspendThread/ResumeThread failures (#75845)

- They would fail typically if the handle is invalid (perhaps because it was erroneously closed, or it's not a thread handle).
- In the places where they are called the handle should be a valid thread handle. Failures can lead to less desirable behaviors, like a deadlock. Added and used `ClrSuspendThread` and `ClrResumeThread` instead, which check for errors and fail-fast.

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

2 years agoFix source build problem with missing intellisense xmls (#75981)
Carlos Sanchez [Wed, 21 Sep 2022 22:18:58 +0000 (15:18 -0700)]
Fix source build problem with missing intellisense xmls (#75981)

2 years agoFix x64 cross build on arm64 macOS (#75677)
Jan Vorlicek [Wed, 21 Sep 2022 22:14:47 +0000 (00:14 +0200)]
Fix x64 cross build on arm64 macOS (#75677)

* Fix x64 cross build on arm64 macOS

There were couple of minor issues that prevented successful building of x64 macOS
runtime on arm64 macOS device.
This change fixes them.

* Remove cross architecture combination check

* Reflect PR feedback

* Fix #endif comment

2 years agoEnable logging managed stack trace for AV to event log (#75721)
Jan Vorlicek [Wed, 21 Sep 2022 22:14:29 +0000 (00:14 +0200)]
Enable logging managed stack trace for AV to event log (#75721)

.NET Framework was logging managed stack trace of access violations that
happened in external native code in the event log. .NET core only logs
the address and error code of the exception, which makes it difficult
for developers to figure out which part of their managed code has called
the failing native code.
The reason why .NET core doesn't print the stack trace is that the
access violation is now handled as fail fast instead of regular
unhandled exception. And while we report managed stack traces in the
EEPolicy::FatalError for fail fasts called from our runtime and managed
code in both runtime and user code, we don't report it when we come to
that method due to the access violation.

This change enables printing the stack trace for that case too.

2 years agoMake initialization more consistent in `gc.cpp` (#75908)
Aaron Robinson [Wed, 21 Sep 2022 21:54:19 +0000 (17:54 -0400)]
Make initialization more consistent in `gc.cpp` (#75908)

* Revert previous changes to gc.cpp and make class Volatile have a default ctor

* Remove unnecessary use of memset

2 years agoAllow Hardware Intrinsics to work with the AltJit (#75912)
Tanner Gooding [Wed, 21 Sep 2022 20:48:06 +0000 (13:48 -0700)]
Allow Hardware Intrinsics to work with the AltJit (#75912)

* Fixing a case where a *.PlatformNotSupported.cs type was marked Intrinsic

* Under mismatched VM (AltJit) allow any method to be checked as an intrinsic

* Simplify some logic in impIntrinsic and move the info.compMatchedVM check higher

2 years agoFix a rare crash when creating or opening named mutexes (#75843)
Koundinya Veluri [Wed, 21 Sep 2022 20:02:52 +0000 (13:02 -0700)]
Fix a rare crash when creating or opening named mutexes (#75843)

- Refactored an error path for named mutexes to before the object is registered
- This also fixed a rare crash on error paths while creating a handle due to an extra attempt to release a reference

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

2 years agoSkip ASN.1 SetOf sorting if nothing to sort
Kevin Jones [Wed, 21 Sep 2022 19:46:25 +0000 (15:46 -0400)]
Skip ASN.1 SetOf sorting if nothing to sort

2 years ago[NativeAOT] Use clock_gettime_nsec_np if available in GCToOSInterface::GetLowPrecisio...
Filip Navara [Wed, 21 Sep 2022 18:59:01 +0000 (20:59 +0200)]
[NativeAOT] Use clock_gettime_nsec_np if available in GCToOSInterface::GetLowPrecisionTimeStamp (#75862)

* Use clock_gettime_nsec_np if available in GCToOSInterface::GetLowPrecisionTimeStamp

This aligns NativeAOT implementation with the CoreCLR one.

* Change GCToOSInterface::GetLowPrecisionTimeStamp to return 64-bit value, align implementation with PalGetTickCount64, and use it in NativeAOT

2 years agoUpdate RateLimiting ref assembly (#75976)
Brennan [Wed, 21 Sep 2022 18:35:49 +0000 (11:35 -0700)]
Update RateLimiting ref assembly (#75976)

2 years agoFix visibility modifier inconsistency in TextFieldParser (#75974)
Viktor Hofer [Wed, 21 Sep 2022 18:27:15 +0000 (20:27 +0200)]
Fix visibility modifier inconsistency in TextFieldParser (#75974)

* Fix visibility modifier inconsistency in TextFieldParser

The original change brought this API over from .NET Framework without an explicit visibility modifier: https://github.com/dotnet/corefx/pull/32668/files#diff-b244839a8ccb916e708d4ea6158d8bb573e3768d6bb7a3e327a51f2ab1e37c28R641.

That member is publicly exposed on .NET Framework: https://referencesource.microsoft.com/#Microsoft.VisualBasic/Microsoft/VisualBasic/FileIO/TextFieldParser.cs,42.

Noticed during the bootstrap of the new APICompat tooling: https://github.com/dotnet/runtime/pull/73263.

* Update src/libraries/Microsoft.VisualBasic.Core/ref/Microsoft.VisualBasic.Core.cs

Co-authored-by: Stephen Toub <stoub@microsoft.com>
2 years agoAdd missing inheritdocs references to IParsable.TryParse (#75856)
Drew Kersnar [Wed, 21 Sep 2022 18:19:57 +0000 (13:19 -0500)]
Add missing inheritdocs references to IParsable.TryParse (#75856)

* Add missing inheritdocs for TryParse

* Fix documentation for UInt128/Int128.ToString

* Revert "Fix documentation for UInt128/Int128.ToString"

This reverts commit f18cfa7ee95cea427b72e8da15e6af91da8b0391.

* Apply suggestions from dotnet-api-docs review

2 years agoFlow internal transport packages during servicing (#75969)
Viktor Hofer [Wed, 21 Sep 2022 17:38:20 +0000 (19:38 +0200)]
Flow internal transport packages during servicing (#75969)

This makes sure that partner repositories have their internal transport
packages available. This needs to be set explicitly as during servicing,
libraries only publish on demand.

This also fixes broken 7.0 servicing builds which require at least one
package to be published.

Manual, partial backport of c5a20f916b465707919aa5b6a78f7c4c7675c423.

2 years agoData.Common add DynamicallyAccessMembers attribs (#75961)
Viktor Hofer [Wed, 21 Sep 2022 17:32:04 +0000 (19:32 +0200)]
Data.Common add DynamicallyAccessMembers attribs (#75961)

The existing APICompat tooling doesn't indicate a compatibility error when comparing the contract assembly against the implementation assembly and the `[return: ...]` attributes aren't in sync. The new tooling that is being bootstrapped in dotnet/runtime via https://github.com/dotnet/runtime/pull/73263 does flag them.

In this case a few type members were missing the `DynamicallyAccessedMembers` return attribute in the contract.

2 years agoRemove a few ToCharArray uses from System.Private.Xml (#75946)
Stephen Toub [Wed, 21 Sep 2022 17:02:46 +0000 (13:02 -0400)]
Remove a few ToCharArray uses from System.Private.Xml (#75946)

2 years agoOptimize AwayFromZero rounding (#74935)
Michał Petryka [Wed, 21 Sep 2022 15:56:59 +0000 (17:56 +0200)]
Optimize AwayFromZero rounding (#74935)

* Optimize AwayFromZero rounding

Makes AwayFromZero use a fast managed
implementation instead of an FCall.

The code is not fully optimal due to
CopySign not being optimized for constant inputs,
it could be workarounded with direct Sse usage
but propely fixing CopySign would be better.

* Update MathF.cs

* Update MathF.cs

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

Co-authored-by: Tanner Gooding <tagoo@outlook.com>
Co-authored-by: Tanner Gooding <tagoo@outlook.com>
2 years agoBump intellisense package to include latest comments for Numerics (#75937)
Carlos Sanchez [Wed, 21 Sep 2022 15:54:27 +0000 (08:54 -0700)]
Bump intellisense package to include latest comments for Numerics (#75937)

Co-authored-by: carlossanlop <carlossanlop@users.noreply.github.com>
2 years agoFix public key token of Serialization.Schema contract assembly (#75963)
Viktor Hofer [Wed, 21 Sep 2022 14:58:31 +0000 (16:58 +0200)]
Fix public key token of Serialization.Schema contract assembly (#75963)

* Fix public key token for Serialization.Schema lib

The Microsoft public key token was only applied to the source assembly but not to the contract.

* Update Directory.Build.props

2 years ago[wasm] update README (#75960)
Radek Doulik [Wed, 21 Sep 2022 10:20:27 +0000 (12:20 +0200)]
[wasm] update README (#75960)

To mention the right workload for the templates.

2 years agofix readme typo (#75953)
Milos Kotlar [Wed, 21 Sep 2022 08:46:36 +0000 (10:46 +0200)]
fix readme typo (#75953)

2 years ago[wasm] enable issue 58812 (#75444)
Pavel Savara [Wed, 21 Sep 2022 08:42:37 +0000 (10:42 +0200)]
[wasm] enable issue 58812 (#75444)

2 years agoRemoved internalProperties group from proxy and tests. (#75904)
Ilona Tomkowicz [Wed, 21 Sep 2022 04:00:51 +0000 (06:00 +0200)]
Removed internalProperties group from proxy and tests. (#75904)

2 years agoFaster "obj is T[]" for sealed T (#75816)
Egor Bogatov [Wed, 21 Sep 2022 03:48:21 +0000 (05:48 +0200)]
Faster "obj is T[]" for sealed T (#75816)

Co-authored-by: Jan Kotas <jkotas@microsoft.com>
2 years ago[wasm] Don't use MS.Build.NoTargets SDK for runtime tests (#75939)
Ankit Jain [Wed, 21 Sep 2022 02:51:06 +0000 (22:51 -0400)]
[wasm] Don't use MS.Build.NoTargets SDK for runtime tests (#75939)

This will also avoid intermittent failures like https://github.com/dotnet/runtime/issues/75391

2 years agoRemove unused configurations (#75911)
Elinor Fung [Wed, 21 Sep 2022 01:03:30 +0000 (19:03 -0600)]
Remove unused configurations (#75911)

Remnants of crossgen code removal.

2 years agoAdd markdown readme for Microsoft.Extensions.Configuration.Json (#75876)
MSDN.WhiteKnight [Wed, 21 Sep 2022 00:26:09 +0000 (05:26 +0500)]
Add markdown readme for Microsoft.Extensions.Configuration.Json (#75876)

2 years agoUpdate heap hard limit for large pages (#73508)
Andrew Au [Tue, 20 Sep 2022 22:35:57 +0000 (15:35 -0700)]
Update heap hard limit for large pages (#73508)

2 years agoAvoid array out of bound access for commit accounting (#75232)
Andrew Au [Tue, 20 Sep 2022 22:35:11 +0000 (15:35 -0700)]
Avoid array out of bound access for commit accounting (#75232)

2 years agoChange VerifyXmlResolver to use TcpListener over HttpListener
Jeremy Barton [Tue, 20 Sep 2022 22:21:10 +0000 (15:21 -0700)]
Change VerifyXmlResolver to use TcpListener over HttpListener

2 years agoDelete duplicative code in WebClient (#75896)
Stephen Toub [Tue, 20 Sep 2022 20:04:40 +0000 (16:04 -0400)]
Delete duplicative code in WebClient (#75896)

It had its own implementation of URL encoding; we can just use WebUtility.UrlEncode.  And it had its own helper for checking whether a byte array had a prefix; we can just use StartsWith.

2 years agoDelete a few stray commented-out Console.WriteLine calls in src (#75895)
Stephen Toub [Tue, 20 Sep 2022 20:04:24 +0000 (16:04 -0400)]
Delete a few stray commented-out Console.WriteLine calls in src (#75895)

2 years agoEnsure that the VNFunc for HWIntrinsics are properly marked as commutative where...
Tanner Gooding [Tue, 20 Sep 2022 19:48:55 +0000 (12:48 -0700)]
Ensure that the VNFunc for HWIntrinsics are properly marked as commutative where possible (#75840)

2 years ago[main] Update dependencies from dotnet/arcade (#75190)
dotnet-maestro[bot] [Tue, 20 Sep 2022 19:22:22 +0000 (14:22 -0500)]
[main] Update dependencies from dotnet/arcade (#75190)

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

Microsoft.DotNet.ApiCompat , 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.22455.1 -> To Version 8.0.0-beta.22456.4

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

Microsoft.DotNet.ApiCompat , 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.22455.1 -> To Version 8.0.0-beta.22462.4

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

Microsoft.DotNet.ApiCompat , 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.22455.1 -> To Version 8.0.0-beta.22463.5

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

Microsoft.DotNet.ApiCompat , 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.22455.1 -> To Version 8.0.0-beta.22465.7

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

Microsoft.DotNet.ApiCompat , 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.22455.1 -> To Version 8.0.0-beta.22466.3

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

Microsoft.DotNet.ApiCompat , 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.22455.1 -> To Version 8.0.0-beta.22469.1

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Co-authored-by: Ankit Jain <radical@gmail.com>
2 years ago[main] Update dependencies from dotnet/icu dotnet/xharness dotnet/hotreload-utils...
dotnet-maestro[bot] [Tue, 20 Sep 2022 19:21:31 +0000 (14:21 -0500)]
[main] Update dependencies from dotnet/icu dotnet/xharness dotnet/hotreload-utils dotnet/llvm-project (#75886)

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

Microsoft.NETCore.Runtime.ICU.Transport
 From Version 8.0.0-alpha.1.22462.1 -> To Version 8.0.0-alpha.1.22469.1

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

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

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

Microsoft.DotNet.HotReload.Utils.Generator.BuildTool
 From Version 1.1.0-alpha.0.22462.2 -> To Version 1.1.0-alpha.0.22469.1

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

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
 From Version 14.0.0-alpha.1.22462.3 -> To Version 14.0.0-alpha.1.22469.3

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
2 years agoSkip frozen segments for commit accounting (#75738)
Andrew Au [Tue, 20 Sep 2022 18:20:52 +0000 (11:20 -0700)]
Skip frozen segments for commit accounting (#75738)

2 years agoAdd infinite codegen stress feature to crossgen2 and fix memory usage issues found...
David Wrighton [Tue, 20 Sep 2022 18:19:10 +0000 (11:19 -0700)]
Add infinite codegen stress feature to crossgen2 and fix memory usage issues found while doing so (#74956)

- Add Inifinite codegen stress mode which runs the compilation portion of crossgen2 in an infinite loop
- Fix a couple of memory leaks around PInvokeTargetNativeMethod and UnboxingMethodDesc
  - These were being stored into long-lived data structures, and I was able to make at least UnboxingMethodDesc have a feature which prevents them from being stored for a long period of time
- Address a number of scenarios where we allocate tremendous amounts of useless garbage
  - Our pattern for using ConcurrentDictionary was allocating a delegate on every lookup
  - Tweak ModuleTokenResolver to not need to allocate new copies of the `TokenResolverProvider` and the various `ImmutableArray` objects in the signature decoders as we don't actually need the return value from those apis.
 - Tweak parallelization strategy to use raw threads instead of `Parallel.ForEach`
   - This allows us to easily control thread lifetime, as well as providing a means to eliminate old and no-longer used `CorInfoImpl` instances.
   - This should address to some extent high levels of memory needed for compilation seen by some customers

# Inifite codegen stress mode
Enable by passing --codegenopt:InfiniteCompileStress=1 on the command line

A simple way to use this would be to run stress it on system.private.corelib.dll.

Assuming that a release clr+libs has been built and your enlistment is in `c:\gitdir\runtime`, run something like the following
```
pushd c:\gitdir\runtime
src\tests\build generatelayoutonly
set CORE_ROOT=C:\gitdir\runtime\artifacts\tests\coreclr\windows.x64.Release\tests\core_root
SET DOTNET_gcServer=1
SET DOTNET_GCHeapCount=6
%CORE_ROOT%\corerun C:\gitdir\runtime\artifacts\bin\coreclr\windows.x64.Release\crossgen2\crossgen2.dll -o:C:\temp\System.Private.CoreLib.dll -r:C:\gitdir\runtime\artifacts\bin\coreclr\windows.x64.Release\IL\*.dll --targetarch:x64 -m:C:\gitdir\runtime\artifacts\bin\coreclr\windows.x64.Release\StandardOptimizationData.mibc --embed-pgo-data -O C:\gitdir\runtime\artifacts\bin\coreclr\windows.x64.Release\IL\System.Private.CoreLib.dll   --pdb --pdb-path:C:\temp --codegenopt:InfiniteCompileStress=1

```

That will run for an infinite period of time, and stress the GC and various other aspects of the runtime.

2 years agoSplit Codespaces configuration based on development scenarios (#74683)
Eric Erhardt [Tue, 20 Sep 2022 16:24:04 +0000 (11:24 -0500)]
Split Codespaces configuration based on development scenarios (#74683)

* Split libraries and wasm devcontainers

Codespaces allows for monorepo support now. So we can have different pre-builds for different dev environments.

Creating a "libraries" pre-build and a "wasm" pre-build devcontainer.

* Move devcontainer files into separate folders

* Path up a directory to the Dockerfile

* Split the Dockerfile so it can be customized per devcontainer

* Update Codespaces docs

* Respond to PR feedback

* Use the new open devcontainers path.

* Use the GH CLI feature instead of installing it ourselves

* Set hostRequirements for Codespaces

Developing in dotnet/runtime with a 2-core / 4GB ram machine doesn't work very well. Add a minimum of 4-core machine to the devcontainer spec.

Fix #75680

2 years agoFaster Vector128/64 compare on arm64 (#75864)
Egor Bogatov [Tue, 20 Sep 2022 15:55:50 +0000 (17:55 +0200)]
Faster Vector128/64 compare on arm64 (#75864)

2 years agoReplace XmlCharType.IsDigit with char.IsAsciiDigit (#75871)
Stephen Toub [Tue, 20 Sep 2022 15:41:04 +0000 (11:41 -0400)]
Replace XmlCharType.IsDigit with char.IsAsciiDigit (#75871)

2 years agoUpdating the initial capacity of the intrinsic TypeConverter dictionary (#75850)
Eric Erhardt [Tue, 20 Sep 2022 15:37:33 +0000 (10:37 -0500)]
Updating the initial capacity of the intrinsic TypeConverter dictionary (#75850)

We added 5 new intrinsic TypeConverters in https://github.com/dotnet/runtime/commit/367fe33ea0a25392980f44f76307e210813228fb but missed updating the dictionary capacity.

2 years agoFix servicing of coreclr nuget packages (#75884)
Viktor Hofer [Tue, 20 Sep 2022 15:06:45 +0000 (17:06 +0200)]
Fix servicing of coreclr nuget packages (#75884)

Fixes the failures in the 7.0.1 test servicing build:

```
/__w/1/s/.packages/microsoft.dotnet.build.tasks.packaging/7.0.0-beta.22416.1/build/Packaging.targets(800,5): error : No VersionSuffix was set. Ensure it is set before targets in packaging are ran. [/__w/1/s/src/coreclr/.nuget/Microsoft.NETCore.ILAsm/Microsoft.NETCore.ILAsm.pkgproj]
##[error].packages/microsoft.dotnet.build.tasks.packaging/7.0.0-beta.22416.1/build/Packaging.targets(800,5): error : (NETCORE_ENGINEERING_TELEMETRY=Build) No VersionSuffix was set. Ensure it is set before targets in packaging are ran.
/__w/1/s/.packages/microsoft.dotnet.build.tasks.packaging/7.0.0-beta.22416.1/build/Packaging.targets(800,5): error : No VersionSuffix was set. Ensure it is set before targets in packaging are ran. [/__w/1/s/src/coreclr/.nuget/Microsoft.NETCore.ILDAsm/Microsoft.NETCore.ILDAsm.pkgproj]
##[error].packages/microsoft.dotnet.build.tasks.packaging/7.0.0-beta.22416.1/build/Packaging.targets(800,5): error : (NETCORE_ENGINEERING_TELEMETRY=Build) No VersionSuffix was set. Ensure it is set before targets in packaging are ran.
```

2 years agoUse fixed version of dotnet for Spmi benchmark (#75888)
Kunal Pathak [Tue, 20 Sep 2022 13:28:44 +0000 (06:28 -0700)]
Use fixed version of dotnet for Spmi benchmark (#75888)

* fixed dotnet version

* comment everything except benchmarks

* Add comment

* Revert "comment everything except benchmarks"

This reverts commit 1a6ae318ee6a1fadce7b662b36e9cf206f1acf43.

2 years agoAdd definition of hostfxr_get_dotnet_environment_info_fn to hostfxr.h (#75860)
Sean Hall [Tue, 20 Sep 2022 09:08:11 +0000 (04:08 -0500)]
Add definition of hostfxr_get_dotnet_environment_info_fn to hostfxr.h (#75860)

* Add definition of hostfxr_get_dotnet_environment_info_fn to hostfxr.h.

* Move doc for hostfxr_get_dotnet_environment_info into hostfxr.h.

2 years agoAcceptAsync with existing Socket support on Unix, Review Changes (#74645)
Ahmet İbrahim AKSOY [Tue, 20 Sep 2022 08:56:23 +0000 (11:56 +0300)]
AcceptAsync with existing Socket support on Unix, Review Changes (#74645)

2 years agoFixing SpanHelpers.LastIndexOfAnyValueType to no longer create out of bounds GC refs...
Tanner Gooding [Tue, 20 Sep 2022 08:48:30 +0000 (01:48 -0700)]
Fixing SpanHelpers.LastIndexOfAnyValueType to no longer create out of bounds GC refs (#75857)

Co-authored-by: Adam Sitnik <adam.sitnik@gmail.com>
2 years agoKeyChar should be preserved for Ctrl+Letter (#75853)
Adam Sitnik [Tue, 20 Sep 2022 08:46:29 +0000 (10:46 +0200)]
KeyChar should be preserved for Ctrl+Letter (#75853)

2 years ago[wasm] Add Vector128:ExtractMostSignificantBits (#75844)
Radek Doulik [Tue, 20 Sep 2022 06:55:31 +0000 (08:55 +0200)]
[wasm] Add Vector128:ExtractMostSignificantBits (#75844)

Implement `Vector128:ExtractMostSignificantBits` intrinsic. It is used in many places, so this should improve overall performance.

Also fix typo in i16x8 version.

The improvements are visible in the Json and Span measurements*:

|                      measurement |    before |     after |
| -------------------------------: | --------: | --------: |
|              Span, IndexOf bytes |  0.3733us |  0.0992us |
|              Span, IndexOf chars |  0.0031ms |  0.0027ms |
|   Json, non-ASCII text serialize |  1.1966ms |  0.2430ms |
| Json, non-ASCII text deserialize |  2.0456ms |  0.5030ms |
|            Json, small serialize |  0.0437ms |  0.0274ms |
|          Json, small deserialize |  0.0532ms |  0.0497ms |
|            Json, large serialize | 13.6972ms |  7.4649ms |
|          Json, large deserialize | 17.6993ms | 14.0079ms |

* The above was measured with the aot compiler temporary hack to avoid shared generics in Span.

2 years agoInitialize Volatile value (#74959)
Andrew Au [Tue, 20 Sep 2022 05:08:04 +0000 (22:08 -0700)]
Initialize Volatile value (#74959)

2 years agoUpdating inbox source generators to Roslyn 4.4 and removing polyfill approach (#75717)
Jose Perez Rodriguez [Tue, 20 Sep 2022 02:28:44 +0000 (19:28 -0700)]
Updating inbox source generators to Roslyn 4.4 and removing polyfill approach (#75717)

2 years agoFix querying L3 cache size on osx-x64 (#75854)
Filip Navara [Tue, 20 Sep 2022 01:47:12 +0000 (03:47 +0200)]
Fix querying L3 cache size on osx-x64 (#75854)

2 years agoJIT: move optOptimizeBools later in the phase list (#75842)
Andy Ayers [Tue, 20 Sep 2022 01:14:01 +0000 (18:14 -0700)]
JIT: move optOptimizeBools later in the phase list (#75842)

This transformation blocks assertion prop and RBO and does not enable any
global optimizations. So defer it until later, after all the optimization
phases have run.

2 years agoUse CommonPrefixLength for SetOf sort validation
Kevin Jones [Mon, 19 Sep 2022 21:36:09 +0000 (17:36 -0400)]
Use CommonPrefixLength for SetOf sort validation

2 years agoJIT: extend RBO partial inference to unsigned relops (#75804)
Andy Ayers [Mon, 19 Sep 2022 19:15:31 +0000 (12:15 -0700)]
JIT: extend RBO partial inference to unsigned relops (#75804)

RBO can now partially infer from a pair of unsigned relops or an unsigned
relop and an equality relop.

Fixes #65327.

2 years agoSmall diagnostics improvements to HostWriter (#75593)
Vitek Karas [Mon, 19 Sep 2022 17:43:49 +0000 (10:43 -0700)]
Small diagnostics improvements to HostWriter (#75593)

- Print out file permissions in octal (as per Linux standard)
- Actually print out error enum value when MachO processing fails

2 years agoJIT: Enhance metrics reported by superpmi diffs (#74584)
Jakob Botsch Nielsen [Mon, 19 Sep 2022 17:19:18 +0000 (19:19 +0200)]
JIT: Enhance metrics reported by superpmi diffs (#74584)

* Report the total number of contexts, minopts contexts and fullopts
  contexted processed
* Report number of successful and missing contexts
* Report asmdiffs and tpdiffs for minopts/fullopts separately

Fixes #70350
Contributes to #73506

2 years ago[main] Update dependencies from dotnet/linker (#75191)
dotnet-maestro[bot] [Mon, 19 Sep 2022 16:52:30 +0000 (12:52 -0400)]
[main] Update dependencies from dotnet/linker (#75191)

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

Microsoft.NET.ILLink.Tasks
 From Version 7.0.100-1.22451.5 -> To Version 7.0.100-1.22456.1

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

Microsoft.NET.ILLink.Tasks
 From Version 7.0.100-1.22451.5 -> To Version 7.0.100-1.22458.1

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

Microsoft.NET.ILLink.Tasks
 From Version 7.0.100-1.22451.5 -> To Version 7.0.100-1.22465.1

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

Microsoft.NET.ILLink.Tasks
 From Version 7.0.100-1.22451.5 -> To Version 7.0.100-1.22466.1

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

Microsoft.NET.ILLink.Tasks
 From Version 7.0.100-1.22451.5 -> To Version 7.0.100-1.22469.1

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
2 years ago[main] Update dependencies from dotnet/roslyn-analyzers dotnet/runtime dotnet/xharnes...
dotnet-maestro[bot] [Mon, 19 Sep 2022 15:46:37 +0000 (15:46 +0000)]
[main] Update dependencies from dotnet/roslyn-analyzers dotnet/runtime dotnet/xharness (#75605)

[main] Update dependencies from dotnet/roslyn-analyzers dotnet/runtime dotnet/xharness

2 years agoAdd doc for CET compatibility. (#75551)
Manish Godse [Mon, 19 Sep 2022 15:24:48 +0000 (08:24 -0700)]
Add doc for CET compatibility. (#75551)

* Add doc for CET compatibility.

* doc feedback

* fixing mdlint issue.

* adding 22H2 as the required windows version

2 years ago[mono][tests] Fix System.Reflection.Tests.ModuleTests.GetField failing test on ARMv6...
Milos Kotlar [Mon, 19 Sep 2022 15:15:09 +0000 (17:15 +0200)]
[mono][tests] Fix System.Reflection.Tests.ModuleTests.GetField failing test on ARMv6 and Android (#75458)

* push int64 instead of int32 on evaluation stack

2 years agoEnsure GenTree::isCommutativeHWIntrinsic works on Arm64 (#75818)
Tanner Gooding [Mon, 19 Sep 2022 14:35:34 +0000 (07:35 -0700)]
Ensure GenTree::isCommutativeHWIntrinsic works on Arm64 (#75818)

2 years agoFix grammatical error in #75831. (#75835)
Eirik Tsarpalis [Mon, 19 Sep 2022 14:01:39 +0000 (17:01 +0300)]
Fix grammatical error in #75831. (#75835)

2 years agoDelete unused code (#75814)
Adeel Mujahid [Mon, 19 Sep 2022 13:47:48 +0000 (16:47 +0300)]
Delete unused code (#75814)

* Delete unused code

* Fix casing of mscoree.idl

* Delete START/STOP_MD_PERF macros

2 years agoDelete some unused includes and files (#75805)
Jan Kotas [Mon, 19 Sep 2022 13:25:15 +0000 (06:25 -0700)]
Delete some unused includes and files (#75805)

2 years agoUpdate List.cs (#75831)
viveknuna [Mon, 19 Sep 2022 12:11:14 +0000 (17:41 +0530)]
Update List.cs (#75831)

* Update List.cs

The comment was misleading, It should be removing the item not the item from given index

* Update List.cs

Changing the comment based on the review comment

2 years agoJIT: Early expand vtable calls on ARM32 too (#75604)
Jakob Botsch Nielsen [Mon, 19 Sep 2022 09:42:49 +0000 (11:42 +0200)]
JIT: Early expand vtable calls on ARM32 too (#75604)

This test does not fail anymore for me locally, so we can simplify some
of the code around this.

2 years ago[wasm] hide interop delegates from intelisense (#75800)
Pavel Savara [Mon, 19 Sep 2022 06:55:22 +0000 (08:55 +0200)]
[wasm] hide interop delegates from intelisense (#75800)

2 years ago[Mono]Disable failing intrinsics tests for llvmaot CI lane, due to disabling LLVM...
Fan Yang [Mon, 19 Sep 2022 06:07:30 +0000 (02:07 -0400)]
[Mono]Disable failing intrinsics tests for llvmaot CI lane, due to disabling LLVM JIT (#75768)

* Disable failing tests

* CI: Library tests should run on library changes

- installer builds, and runtime tests also depend on this

* Disable all failing tests

* Disable the last 4 failing tests

Co-authored-by: Ankit Jain <radical@gmail.com>
2 years agofix behavior of JMC (#75783)
Thays Grazia [Mon, 19 Sep 2022 03:15:57 +0000 (00:15 -0300)]
fix behavior of JMC (#75783)

2 years agoNo need to try hijack/suspend GC threads (#75810)
Vladimir Sadov [Mon, 19 Sep 2022 01:55:13 +0000 (18:55 -0700)]
No need to try hijack/suspend GC threads (#75810)

* No need to try suspend GC threads

* Same change for CoreClr + some cleanup.

2 years agoSimplify windows version detection in vm (#75254)
Huo Yaoyuan [Sun, 18 Sep 2022 14:31:46 +0000 (22:31 +0800)]
Simplify windows version detection in vm (#75254)

* Simplify windows version detection in vm

* Update ifdef and include

Co-authored-by: Jan Kotas <jkotas@microsoft.com>
2 years ago[NativeAOT] Make conservative stack reporting configurable. (#75803)
Vladimir Sadov [Sun, 18 Sep 2022 05:42:48 +0000 (22:42 -0700)]
[NativeAOT] Make conservative stack reporting configurable. (#75803)

* Make conservative stack reporting configurable.

* formatting

* Update RhConfigValues.h

* Update gcrhenv.cpp

2 years ago[NativeAOT] QueryPerformanceCounter in Pal should use CLOCK_MONOTONIC (#75708)
Vladimir Sadov [Sun, 18 Sep 2022 00:11:12 +0000 (17:11 -0700)]
[NativeAOT] QueryPerformanceCounter in Pal should use CLOCK_MONOTONIC (#75708)

* monotonic clock

* move implementation to gcenv.unix

* revert changes to WindowsAPI.txt

* check for HAVE_CLOCK_MONOTONIC

* frequency should be in nanoseconds

2 years agoUpdating Vector*.IsHardwareAccelerated to be recursive (#69578)
Tanner Gooding [Sat, 17 Sep 2022 20:16:17 +0000 (13:16 -0700)]
Updating Vector*.IsHardwareAccelerated to be recursive (#69578)

* Updating Vector*.IsHardwareAccelerated to be recursive so it works in the debugger

* Adding tests validating indirect and direct invocation of get_IsHardwareAccelerated return the same value

* Ensure that Vector<T>.IsHardwareAccelerated supports being recursive

* Apply suggestions from code review

Co-authored-by: Stephen Toub <stoub@microsoft.com>
* Update src/libraries/System.Numerics.Vectors/tests/GenericVectorTests.cs

* Detect the one legal violation of the behaves the same rule for intrinsics in CoreLib
- The functions which detect if an intrinsic is actually available are allowed to have behavior which differs based on which intrinsics are available at runtime

* [mono] Intrinsify IsHardwareAccelerated in the interpreter.

* Add a fallback path for unhandled recursive intrinsics in System.Numerics

* Move the Vector.IsHardwareAccelerated handling into SimdAsHWIntrinsicInfo.lookupId

* Fixinng a compiler error due to an unresolved member

* Adjust the NI_IsSupported_Dynamic checks to be NAOT only

Co-authored-by: Stephen Toub <stoub@microsoft.com>
Co-authored-by: David Wrighton <davidwr@microsoft.com>
Co-authored-by: Zoltan Varga <vargaz@gmail.com>
2 years agoEnsure that all paths of double.Hypot use the absolute value where required (#75776)
Tanner Gooding [Sat, 17 Sep 2022 20:15:14 +0000 (13:15 -0700)]
Ensure that all paths of double.Hypot use the absolute value where required (#75776)

* Adding a regression test covering dotnet/runtime#75651

* Ensure that all paths of double.Hypot use the absolute value where required

* Change were the regression tests for Hypot are exposed

2 years ago[wasm] Add workaround for msbuild issue in tests (#75743)
Ankit Jain [Sat, 17 Sep 2022 18:06:25 +0000 (14:06 -0400)]
[wasm] Add workaround for msbuild issue in tests (#75743)

2 years agoRemove unused file (#75777)
Kevin Jones [Sat, 17 Sep 2022 17:07:19 +0000 (13:07 -0400)]
Remove unused file (#75777)

2 years ago[NativeAOT] Fix building src/tests (#75781)
Austin Wise [Sat, 17 Sep 2022 17:06:07 +0000 (10:06 -0700)]
[NativeAOT] Fix building src/tests (#75781)

* [NativeAOT] Fix building src/tests

Fixes #75780

Co-authored-by: Jan Kotas <jkotas@microsoft.com>
2 years agoUse *_NOCTOR jit helpers version once class is initialized (#75785)
Kunal Pathak [Sat, 17 Sep 2022 16:28:49 +0000 (09:28 -0700)]
Use *_NOCTOR jit helpers version once class is initialized (#75785)

* use noctor version once class is initialized

* review feedback

2 years agoDon't set JitPath for coreclr test SPMI collections (#75765)
Andy Ayers [Sat, 17 Sep 2022 15:37:49 +0000 (08:37 -0700)]
Don't set JitPath for coreclr test SPMI collections (#75765)

Some coreclr tests run (or partially run) using the build SDK which
will have an incompatible jit GUID.

Fixes #75539.

2 years ago[wasm] fix missing managed stack trace on managed exceptions marshaled to JS (#75678)
Pavel Savara [Sat, 17 Sep 2022 12:21:41 +0000 (14:21 +0200)]
[wasm] fix missing managed stack trace on managed exceptions marshaled to JS (#75678)

* fix missing managed stack trace on managed exceptions marshaled to JS
* override `get stack`
* fix Firefox tests

2 years agoDon't propagate const TYP_REF as TYP_I_IMPL (#75661)
Egor Bogatov [Sat, 17 Sep 2022 02:29:28 +0000 (04:29 +0200)]
Don't propagate const TYP_REF as TYP_I_IMPL (#75661)

2 years agoDo not request type layout for RuntimeDetermined types (#75746)
Michal Strehovský [Fri, 16 Sep 2022 23:34:10 +0000 (08:34 +0900)]
Do not request type layout for RuntimeDetermined types (#75746)

#74123 broke compiling TechEmpower benchmarks with NativeAOT. We now crash with:

```
> ILCompiler.TypeSystem.dll!Internal.TypeSystem.RuntimeDeterminedFieldLayoutAlgorithm.ComputeInstanceLayout(Internal.TypeSystem.DefType defType, Internal.TypeSystem.InstanceLayoutKind layoutKind) Line 19 C#
  ILCompiler.TypeSystem.dll!Internal.TypeSystem.DefType.ComputeInstanceLayout(Internal.TypeSystem.InstanceLayoutKind layoutKind) Line 436 C#
  ILCompiler.TypeSystem.dll!Internal.TypeSystem.DefType.IsInt128OrHasInt128Fields.get() Line 150 C#
  ILCompiler.TypeSystem.dll!Internal.TypeSystem.MetadataFieldLayoutAlgorithm.ComputeAutoFieldLayout(Internal.TypeSystem.MetadataType type, int numInstanceFields) Line 483 C#
  ILCompiler.Compiler.dll!ILCompiler.CompilerMetadataFieldLayoutAlgorithm.ComputeInstanceFieldLayout(Internal.TypeSystem.MetadataType type, int numInstanceFields) Line 56 C#
  ILCompiler.TypeSystem.dll!Internal.TypeSystem.MetadataFieldLayoutAlgorithm.ComputeInstanceLayout(Internal.TypeSystem.DefType defType, Internal.TypeSystem.InstanceLayoutKind layoutKind) Line 164 C#
  ILCompiler.TypeSystem.dll!Internal.TypeSystem.DefType.ComputeInstanceLayout(Internal.TypeSystem.InstanceLayoutKind layoutKind) Line 436 C#
  ILCompiler.TypeSystem.dll!Internal.TypeSystem.DefType.InstanceFieldSize.get() Line 165 C#
  ILCompiler.TypeSystem.dll!Internal.TypeSystem.MetadataFieldLayoutAlgorithm.ComputeFieldSizeAndAlignment(Internal.TypeSystem.TypeDesc fieldType, bool hasLayout, int packingSize, out bool layoutAbiStable, out bool fieldTypeHasAutoLayout, out bool fieldTypeHasInt128Field) Line 838 C#
  ILCompiler.TypeSystem.dll!Internal.TypeSystem.MetadataFieldLayoutAlgorithm.ComputeStaticFieldLayout(Internal.TypeSystem.DefType defType, Internal.TypeSystem.StaticLayoutKind layoutKind) Line 215 C#
  ILCompiler.TypeSystem.dll!Internal.TypeSystem.DefType.ComputeStaticFieldLayout(Internal.TypeSystem.StaticLayoutKind layoutKind) Line 473 C#
  ILCompiler.TypeSystem.dll!Internal.TypeSystem.DefType.GCStaticFieldSize.get() Line 302 C#
  ILCompiler.Compiler.dll!ILCompiler.DependencyAnalysis.NativeLayoutTemplateTypeLayoutVertexNode.GetStaticDependencies(ILCompiler.DependencyAnalysis.NodeFactory context) Line 997 C#
```

https://github.com/dotnet/runtime/blob/4cf1383c8458945b7eb27ae5f57338c10ed25d54/src/coreclr/tools/Common/TypeSystem/RuntimeDetermined/RuntimeDeterminedFieldLayoutAlgorithm.cs#L17-L19

I was not able to come up with a standalone repro case, but this fixes compiling the benchmark. I'm not clear why native layout operates on runtime determined forms, but what I'm doing here should have equivalent behaviors, except avoiding the problem that we can no longer compute layouts of runtime determined things in some obscure scenarios due to the new code.

2 years agoPad the perm table to avoid array out of bound (#75364)
Andrew Au [Fri, 16 Sep 2022 23:08:42 +0000 (16:08 -0700)]
Pad the perm table to avoid array out of bound (#75364)

2 years agoAdding zmmStateSupport and AVX512F, AVX512CD, AVX512BW, AVX512DQ and AVX512VL ISAs...
DeepakRajendrakumaran [Fri, 16 Sep 2022 20:58:59 +0000 (13:58 -0700)]
Adding zmmStateSupport and  AVX512F, AVX512CD, AVX512BW, AVX512DQ and AVX512VL ISAs. (#74113)

* Adding avx512StateSupport().

This adds the helper functions to check if avx512 functionality is supported.

* Adding AVX512F, AVX512CD, AVX512BW, AVX512DQ and AVX512VL ISAs.

* Updating JIT/EE Version Guid.

2 years agoFix edge cases of getting attribute data from syntax (#75727)
Jeremy Koritzinsky [Fri, 16 Sep 2022 19:53:33 +0000 (12:53 -0700)]
Fix edge cases of getting attribute data from syntax (#75727)

Co-authored-by: Stephen Toub <stoub@microsoft.com>
2 years agoSimplify some `ADDR`-related code; fix one bug (#74274)
SingleAccretion [Fri, 16 Sep 2022 18:13:21 +0000 (21:13 +0300)]
Simplify some `ADDR`-related code; fix one bug (#74274)

* Always simplify "ADDR(IND(addr))" to "addr"

The goal is to disallow "ADDR(IND(...))" altogether.

* Simplify some "ADDR"-related code

* Fix an old importer bug

2 years agoFix return code in critical_finalization test (#75750)
Egor Bogatov [Fri, 16 Sep 2022 17:47:00 +0000 (19:47 +0200)]
Fix return code in critical_finalization test (#75750)