platform/upstream/dotnet/runtime.git
14 months ago[main] Update dependencies from dotnet/arcade dotnet/sdk (#88133)
dotnet-maestro[bot] [Wed, 28 Jun 2023 22:17:59 +0000 (18:17 -0400)]
[main] Update dependencies from dotnet/arcade dotnet/sdk (#88133)

* Update dependencies from https://github.com/dotnet/arcade build 20230627.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.23326.5 -> To Version 8.0.0-beta.23327.3

* Update dependencies from https://github.com/dotnet/sdk build 20230628.5

Microsoft.DotNet.ApiCompat.Task
 From Version 8.0.100-preview.7.23327.4 -> To Version 8.0.100-preview.7.23328.5

---------

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
14 months agoAdded Utf8.IsValid(bytes) (#88004)
Alexander Radchenko [Wed, 28 Jun 2023 20:58:51 +0000 (02:58 +0600)]
Added Utf8.IsValid(bytes) (#88004)

* Added Utf8.IsValid(bytes)

* Code review

* Delete System.Runtime.sln

* solution file

* Solution file

* Code review: Removed duplicate tests

14 months agoremove ppc64/setcontext.S from libunwind sources as file does not exist any more...
Sapana-Khemkar [Wed, 28 Jun 2023 20:18:13 +0000 (01:48 +0530)]
remove ppc64/setcontext.S from libunwind sources as file does not exist any more (#88145)

Co-authored-by: Sapana Khemkar <Sapana.Khemkar@ibm.cm>
14 months agoGetProcessInfo3 diagnostic command (#87707)
Justin Anderson [Wed, 28 Jun 2023 19:47:22 +0000 (12:47 -0700)]
GetProcessInfo3 diagnostic command (#87707)

14 months agoAdd support for including System.Index and System.Range downlevel within dotnet/runti...
Jeremy Koritzinsky [Wed, 28 Jun 2023 17:07:06 +0000 (10:07 -0700)]
Add support for including System.Index and System.Range downlevel within dotnet/runtime (#87840)

Co-authored-by: Stephen Toub <stoub@microsoft.com>
14 months agoFix validation on build (#87354)
Pavel Ivanov [Wed, 28 Jun 2023 14:39:29 +0000 (19:39 +0500)]
Fix validation on build (#87354)

14 months agoRemove unused pParentOffset argument in few ExceptionTracker methods (#88131)
Jan Vorlicek [Wed, 28 Jun 2023 14:04:56 +0000 (16:04 +0200)]
Remove unused pParentOffset argument in few ExceptionTracker methods (#88131)

14 months ago[browser] introduce sourcemaps (#86152)
Pavel Savara [Wed, 28 Jun 2023 11:43:34 +0000 (13:43 +0200)]
[browser] introduce sourcemaps (#86152)

14 months agoAdd hosting test to validate behavior of runtime property set twice (#87781)
Vitek Karas [Wed, 28 Jun 2023 11:41:50 +0000 (04:41 -0700)]
Add hosting test to validate behavior of runtime property set twice (#87781)

The test validates that the runtime property from `.runtimeconfig.json` takes precedent over `.runtimeconfig.dev.json`.

14 months agoFix budgets for dynamic heap count and add smoothing to overhead computation (#87618)
Peter Sollich [Wed, 28 Jun 2023 10:41:10 +0000 (12:41 +0200)]
Fix budgets for dynamic heap count and add smoothing to overhead computation (#87618)

When changing heap counts, we used to keep the budgets per heap constant - the heaps coming into service would just inherit the budgets from heap 0. Testing shows this to be inappropriate, as it causes short term peaks in memory consumption when heap count increases quickly.

It seems more appropriate therefore to keep total budget (over all heaps) constant, and, similarly, apply exponential smoothing to the total budgets, not the per-heap-budgets.

During investigation, it was found that a few more fields in the dynamic_data_table need to be initialized or recomputed when heaps are coming into service.

We also found that sometimes heap counts are changed due to small temporary fluctuations in measured GC overhead. The fix is to use a smoothed value to make decisions in situation where the estimated performance difference is small, but keep the median-of-three estimate where it shows a big difference, so we can still react fast in that situation.

14 months agoRemove stack trace metadata decoding support if stack trace data disabled (#88117)
Michal Strehovský [Wed, 28 Jun 2023 08:55:43 +0000 (17:55 +0900)]
Remove stack trace metadata decoding support if stack trace data disabled (#88117)

We have an opt-in feature (currently not officially supported) to disable generation of stack trace metadata. This metadata is used to print the stack trace in places like `Exception.ToString`. This metadata is only generated for methods that are not visible reflection targets. If a method _is_ a visible reflection target, we obtain this data from reflection metadata. So currently it's possible for partial stack traces to be printed even if stack trace metadata was turned off.

I'm not sure it makes sense to do it this way now that very little surface area is actually visible from reflection. This PR conditions stack trace metadata decoding support on the same configuration option.

Before (with stack trace metadata disabled):

```
Unhandled Exception: System.Exception: Exception of type 'System.Exception' was thrown.
   at Program.<Main>$(String[] args) + 0x24
   at HelloBionic!<BaseAddress>+0x8a9e0
```

After:

```
Unhandled Exception: System.Exception: Exception of type 'System.Exception' was thrown.
   at HelloBionic!<BaseAddress>+0x4e958
   at HelloBionic!<BaseAddress>+0x85d5b
```

(Notice we had metadata for Main because we implicitly make `Assembly.EntryPoint` reflection visible. But if there was more code on stack, most of it would look like the "after" case.)

I think the new behavior is easier to comprehend.

This also shrinks the size of an app (with stack trace data disabled) that only throws an exception from 972,288 bytes to 945,152 bytes (the size of stack trace decoding support).

We should consider making this a supported option. It was a supported option in .NET Native and apps like the Windows Store actually ship like this.

14 months ago[main] Update dependencies from dnceng/internal/dotnet-optimization (#87995)
dotnet-maestro[bot] [Wed, 28 Jun 2023 07:16:45 +0000 (03:16 -0400)]
[main] Update dependencies from dnceng/internal/dotnet-optimization (#87995)

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

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.23321.5 -> To Version 1.0.0-prerelease.23322.3

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

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.23321.5 -> To Version 1.0.0-prerelease.23325.3

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

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.23321.5 -> To Version 1.0.0-prerelease.23326.3

---------

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
14 months agoadd AllowTlsResume to SslStream options (#86047)
Tomas Weinfurt [Wed, 28 Jun 2023 07:01:41 +0000 (09:01 +0200)]
add AllowTlsResume to SslStream options (#86047)

* add AllowTlsResume to SslStream options

* debug

* test

* dwSessionLifespan

* feedback

* update

* feedback

14 months agoRemove Vector<T> fallbacks (#88101)
Fan Yang [Wed, 28 Jun 2023 04:08:27 +0000 (00:08 -0400)]
Remove Vector<T> fallbacks (#88101)

14 months ago[browser] Unify boot config schema and output layout (#86255)
Marek Fišera [Wed, 28 Jun 2023 03:57:02 +0000 (05:57 +0200)]
[browser] Unify boot config schema and output layout (#86255)

- Update `WasmAppBuilder` to produce the same boot config schema as `GenerateWasmBootJson`
- Update AppBundle layout to match blazor layout.
    - All the runtime files (js, wasm, icu) are deployed to `_framework` folder.
    - This behavior can be overriden by setting `<WasmRuntimeAssetsLocation>` property. The empty value is overriden to default `_framework`, but `./` can be used to flatten the output structure.
    - WBT test with flat output
    - The only remaining difference is `AppBundle` vs `wwwrooot` folder name.
- `JSHost.ImportAsync` now requires the same relative paths as in blazor (`./module.js` => `../module.js`)

Contributes to https://github.com/dotnet/runtime/issues/70762
---------

Co-authored-by: Ankit Jain <radical@gmail.com>
14 months agoFix handling recursion over fields (#88083)
Michal Strehovský [Wed, 28 Jun 2023 03:36:13 +0000 (12:36 +0900)]
Fix handling recursion over fields (#88083)

See the test for an example. C++ would probably tell the user to take a hike for a template like this, but we need to support this in .NET.

* Use the same logic to root types of reflectable fields as we do for methods instead of asking for a concrete type
* Fix another issue in debug info emission. We already had logic to cut off deep generics, but deep arrays weren't considered. Also consider array depth.

14 months ago[RISC-V] Workaround for __clear_cache() (#88039)
Alexander Soldatov [Wed, 28 Jun 2023 03:06:33 +0000 (06:06 +0300)]
[RISC-V] Workaround for __clear_cache() (#88039)

__clear_cache() expanded from __builtin___clear_cache() is not implemented
on Linux/RISCV64, at least in Clang 14, and we have to make syscall directly.

14 months agoEnsure that we can still inline Math.Max and Math.Min on downlevel hardware (#88106)
Tanner Gooding [Tue, 27 Jun 2023 23:39:34 +0000 (16:39 -0700)]
Ensure that we can still inline Math.Max and Math.Min on downlevel hardware (#88106)

14 months ago[main] Update dependencies from 10 repositories (#87996)
dotnet-maestro[bot] [Tue, 27 Jun 2023 22:57:10 +0000 (18:57 -0400)]
[main] Update dependencies from 10 repositories (#87996)

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

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.23320.3 -> To Version 8.0.0-beta.23322.2

* Update dependencies from https://github.com/dotnet/sdk build 20230623.16

Microsoft.DotNet.ApiCompat.Task
 From Version 8.0.100-preview.7.23321.38 -> To Version 8.0.100-preview.7.23323.16

* Update dependencies from https://github.com/dotnet/sdk build 20230625.1

Microsoft.DotNet.ApiCompat.Task
 From Version 8.0.100-preview.7.23321.38 -> To Version 8.0.100-preview.7.23325.1

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

Microsoft.NETCore.Runtime.ICU.Transport
 From Version 8.0.0-preview.7.23321.2 -> To Version 8.0.0-preview.7.23326.1

* Update dependencies from https://github.com/dotnet/sdk build 20230626.2

Microsoft.DotNet.ApiCompat.Task
 From Version 8.0.100-preview.7.23321.38 -> To Version 8.0.100-preview.7.23326.2

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

Microsoft.DotNet.Cecil
 From Version 0.11.4-alpha.23319.2 -> To Version 0.11.4-alpha.23326.1

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

Microsoft.NET.ILLink.Tasks , Microsoft.NET.Sdk.IL , Microsoft.NETCore.App.Runtime.win-x64 , Microsoft.NETCore.ILAsm , runtime.native.System.IO.Ports , System.Text.Json
 From Version 8.0.0-preview.6.23319.2 -> To Version 8.0.0-preview.7.23325.2

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

runtime.linux-arm64.Microsoft.NETCore.Runtime.JIT.Tools , runtime.linux-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk , runtime.linux-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools , runtime.linux-arm64.Microsoft.NETCore.Runtime.ObjWriter , runtime.linux-musl-arm64.Microsoft.NETCore.Runtime.JIT.Tools , runtime.linux-musl-arm64.Microsoft.NETCore.Runtime.ObjWriter , runtime.linux-musl-x64.Microsoft.NETCore.Runtime.JIT.Tools , runtime.linux-musl-x64.Microsoft.NETCore.Runtime.ObjWriter , runtime.linux-x64.Microsoft.NETCore.Runtime.JIT.Tools , runtime.linux-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk , runtime.linux-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools , runtime.linux-x64.Microsoft.NETCore.Runtime.ObjWriter , 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-arm64.Microsoft.NETCore.Runtime.JIT.Tools , runtime.win-arm64.Microsoft.NETCore.Runtime.ObjWriter , runtime.win-x64.Microsoft.NETCore.Runtime.JIT.Tools , runtime.win-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk , runtime.win-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools , runtime.win-x64.Microsoft.NETCore.Runtime.ObjWriter
 From Version 14.0.0-alpha.1.23321.1 -> To Version 14.0.0-alpha.1.23326.1

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

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.23320.3 -> To Version 8.0.0-beta.23326.5

Dependency coherency updates

Microsoft.DotNet.XliffTasks
 From Version 1.0.0-beta.23312.2 -> To Version 1.0.0-beta.23319.1 (parent: Microsoft.DotNet.Arcade.Sdk

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

Microsoft.NETCore.Runtime.ICU.Transport
 From Version 8.0.0-preview.7.23321.2 -> To Version 8.0.0-preview.7.23326.2

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

Microsoft.DotNet.XHarness.CLI , Microsoft.DotNet.XHarness.TestRunners.Common , Microsoft.DotNet.XHarness.TestRunners.Xunit
 From Version 8.0.0-prerelease.23321.2 -> To Version 8.0.0-prerelease.23326.1

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

Microsoft.DotNet.CilStrip.Sources , System.ComponentModel.TypeConverter.TestData , System.Data.Common.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.23321.1 -> To Version 8.0.0-beta.23326.1

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

Microsoft.NET.Workload.Emscripten.Current.Manifest-8.0.100.Transport
 From Version 8.0.0-preview.7.23321.3 -> To Version 8.0.0-preview.7.23326.1

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

Microsoft.DotNet.HotReload.Utils.Generator.BuildTool
 From Version 8.0.0-alpha.0.23319.2 -> To Version 8.0.0-alpha.0.23326.2

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

Microsoft.DotNet.Cecil
 From Version 0.11.4-alpha.23319.2 -> To Version 0.11.4-alpha.23327.1

* Update dependencies from https://github.com/dotnet/sdk build 20230627.4

Microsoft.DotNet.ApiCompat.Task
 From Version 8.0.100-preview.7.23321.38 -> To Version 8.0.100-preview.7.23327.4

---------

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
14 months agoFix ABIStress test (#88097)
Jakob Botsch Nielsen [Tue, 27 Jun 2023 22:31:09 +0000 (00:31 +0200)]
Fix ABIStress test (#88097)

ABIStress was including padding in its hashing when trying to determine
if all values made it through correctly. Make sure we only hash the
fields that actually store data.

14 months ago[wasm] Automatically instrument jiterpreter traces if td->verbose_level > 0 (#88053)
Katelyn Gadd [Tue, 27 Jun 2023 22:03:11 +0000 (15:03 -0700)]
[wasm] Automatically instrument jiterpreter traces if td->verbose_level > 0 (#88053)

14 months agoAdditional JsonNode functionality (#87381)
RaymondHuy [Tue, 27 Jun 2023 20:51:54 +0000 (03:51 +0700)]
Additional JsonNode functionality (#87381)

* add deep clone implementation

* Add tests for DeepClone JsonObject method

* add more tests

* Add GetElementIndex, GetPropertyName api

* Add ReplaceWith api

* Add api description

* remove unused code

* add more tests

* resolve comments

* resolve comments.

* resolve comments.

* resolve comments.

* add test cases

* resolve comments.

* resolve comments.

* remove unused namespace.

* resolve comments.

* Resolve comments.

* resolve comments.

* fix failed test.

* enhance comparision.

* resolve comments.

* resolve comments.

* resolve comments.

* resolve comments.

* resolve comments.

* add more test cases.

* resolve comments.

* resolve comments.

* add test cases.

14 months agoRework JIT<->EE communication for struct promotion (#87917)
Jakob Botsch Nielsen [Tue, 27 Jun 2023 20:07:00 +0000 (22:07 +0200)]
Rework JIT<->EE communication for struct promotion (#87917)

Rework the communication so that the JIT asks the EE for struct field
related information relevant to promotion in a single JIT-EE call of a
new function called getTypeLayout. Crossgen2 can then more easily
provide the information that the JIT is allowed to depend on.

As a side effect, removes CORINFO_FLG_CUSTOMLAYOUT (which fixes #71711)
and CORINFO_FLG_DONT_DIG_FIELDS.

Fix #85511
Fix #71711

14 months agoTarEntry: remove some unneeded checks when extracting symbolic and hard links. (...
Tom Deseyn [Tue, 27 Jun 2023 19:49:29 +0000 (21:49 +0200)]
TarEntry: remove some unneeded checks when extracting symbolic and hard links. (#85378)

* TarEntry: remove some unneeded checks when extracting symbolic and hard links.

* Add test.

* Fix linkTargetPath for hard links.

The LinkName for hard links is a path relative to the archive root.

* Add the trailing separator early on.

* Sanitize the complete Name and LinkName.

* Preserve the drive colon when sanitizing paths on Windows.

* Add some comments.

* PR feedback.

14 months agoactive issue https://github.com/dotnet/runtime/issues/88084 and https://github.com...
Pavel Savara [Tue, 27 Jun 2023 19:26:54 +0000 (21:26 +0200)]
active issue https://github.com/dotnet/runtime/issues/88084 and https://github.com/dotnet/runtime/issues/88057 (#88100)

14 months agoDisable building of tests with build breaks (#88094)
Jan Kotas [Tue, 27 Jun 2023 19:01:25 +0000 (12:01 -0700)]
Disable building of tests with build breaks (#88094)

Related to #87879

14 months ago[wasm] Add some JIT helper functions to throw common corlib exceptions. (#87044)
Zoltan Varga [Tue, 27 Jun 2023 18:06:54 +0000 (14:06 -0400)]
[wasm] Add some JIT helper functions to throw common corlib exceptions. (#87044)

14 months ago[LoongArch64] The REG_SCRATCH is not conflict with REG_PINVOKE_FRAME. (#88029)
Qiao Pengcheng [Tue, 27 Jun 2023 15:20:01 +0000 (23:20 +0800)]
[LoongArch64] The REG_SCRATCH is not conflict with REG_PINVOKE_FRAME. (#88029)

* [LoongArch64] The REG_SCRATCH is not conflict with REG_PINVOKE_FRAME.

* amend the comment for CR.

14 months agoSPMI: Fix a couple of replay bugs (#88088)
Jakob Botsch Nielsen [Tue, 27 Jun 2023 15:02:56 +0000 (17:02 +0200)]
SPMI: Fix a couple of replay bugs (#88088)

* repGetClassNameFromMetadata should zero the key and should miss on
  misses
* repGetArrayOrStringLength should return the length (copy paste
  mistake)

14 months agoFix TimeProvider Timer with Infinity Timeout (#88024)
Tarek Mahmoud Sayed [Tue, 27 Jun 2023 15:01:39 +0000 (08:01 -0700)]
Fix TimeProvider Timer with Infinity Timeout (#88024)

14 months agoLocalized file check-in by OneLocBuild Task: Build definition ID 679: Build ID 221026...
dotnet bot [Tue, 27 Jun 2023 14:15:55 +0000 (16:15 +0200)]
Localized file check-in by OneLocBuild Task: Build definition ID 679: Build ID 2210267 (#88069)

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

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

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

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

14 months agoJIT: Optimize aggregate info iteration in physical promotion (#87997)
Jakob Botsch Nielsen [Tue, 27 Jun 2023 14:06:36 +0000 (16:06 +0200)]
JIT: Optimize aggregate info iteration in physical promotion (#87997)

In several places we have to iterate over all promoted aggregates. This
was less efficient than it has to be because we stored aggregate
information in a flat array indexed by local number, and the vast
majority of locals are not physically promoted. This change introduces
an AggregateInfoMap that stores just the promoted aggregates, and
additionally stores an array mapping locals to the promoted aggregates.

This does mean that we need a two level lookup to map a local number
back to its aggregate information, but that still seems better for
throughput than the previous behavior.

14 months ago[nativeaot] Fix native bits build when targeting "cross" architecture iOS platforms...
Milos Kotlar [Tue, 27 Jun 2023 13:04:48 +0000 (15:04 +0200)]
[nativeaot] Fix native bits build when targeting "cross" architecture iOS platforms (#88079)

* Build native bits for the host architecture when targeting iOS platforms with Native AOT

* Revert the crosscomponets condition

* Don't build ILCompiler_crossarch.csproj

14 months agoJIT: Use compGetTieringName for disassembly output (#88033)
Jakob Botsch Nielsen [Tue, 27 Jun 2023 12:04:55 +0000 (14:04 +0200)]
JIT: Use compGetTieringName for disassembly output (#88033)

Also add the code type to the method names, which makes jit-analyze able
to differentiate between them.

14 months agoImprove dynamic heap count (#87619)
Peter Sollich [Tue, 27 Jun 2023 10:10:16 +0000 (12:10 +0200)]
Improve dynamic heap count (#87619)

Change the logic around check_heap_count so it's called on a single thread - this eliminates the cost of the join call from check_heap_count. When a change in heap count is found to be necessary, set the gc_start_event to wake up the other GC threads so they can participate in rethreading free list items.

Stress testing this with STRESS_DYNAMIC_HEAP_COUNT showed some issues (mostly assert failures) which are addressed as well.

14 months agothrow SocketException for Quic transport errors (#87208)
Tomas Weinfurt [Tue, 27 Jun 2023 09:06:25 +0000 (11:06 +0200)]
throw SocketException for Quic transport errors (#87208)

* throw SocketException for Quic transport errors

* feedback from review

* update

* cleanup

* test

14 months agoEnsure runtime thread for diagnostic server thread (#88077)
Justin Anderson [Tue, 27 Jun 2023 07:52:27 +0000 (00:52 -0700)]
Ensure runtime thread for diagnostic server thread (#88077)

14 months agominor regex cleanup (#88026)
Dan Moseley [Tue, 27 Jun 2023 03:42:18 +0000 (20:42 -0700)]
minor regex cleanup (#88026)

14 months agoUpgrading SpanHelpers with Vector512 (#86655)
DeepakRajendrakumaran [Tue, 27 Jun 2023 03:31:12 +0000 (20:31 -0700)]
Upgrading SpanHelpers with Vector512 (#86655)

* Adding required internal library methods to support Vector512.

* Making Vector512.IsHardwareAccelerated return 'False' on targets with Vector512Throttling issues

* SpanHelper library upgrades.

* Using AVX512 directly in packed implementation

* Fixing cpuid tests

* Cleanup + Addressing review comments

* Address review comments.

14 months agoAllow unnecessary [In, Out] attributes on blittable arrays and report them as unneces...
Jeremy Koritzinsky [Tue, 27 Jun 2023 02:35:40 +0000 (19:35 -0700)]
Allow unnecessary [In, Out] attributes on blittable arrays and report them as unnecessary (#87774)

* Change our '[In, Out]' attribute handling to have a concept of 'unnecessary but not invalid' to enable us in the future to report a non-fatal diagnostic.

* WIP enable unnecessary diagnostic in LibraryImportGenerator'

* Hook up diagnostics and add tests for LibraryImportGenerator

* Hook up diagnostics for ComInterfaceGenerator as well

* Update XLF

* Don't reference the live LibraryImportGenerator when building .NET 7 assets. Use the inbox instead.

* PR feedback

* Fix merge

14 months agoAdd newguid.bat/sh to update jiteeversionguid.h (#88022)
Egor Bogatov [Mon, 26 Jun 2023 22:42:28 +0000 (00:42 +0200)]
Add newguid.bat/sh to update jiteeversionguid.h (#88022)

14 months agoJIT: Stop setting class handles for promoted parameter SIMD fields (#87967)
Jakob Botsch Nielsen [Mon, 26 Jun 2023 21:58:33 +0000 (23:58 +0200)]
JIT: Stop setting class handles for promoted parameter SIMD fields (#87967)

Having these class handles floating around in the JIT is problematic
during prejit where the JIT-EE calls allowed on "random" type handles
(in this case the type of a field of a struct) is limited.

Precursor to #87917

14 months ago[wasm] Shorter jiterp encoding for zero v128 constants; exploit natural stack alignme...
Katelyn Gadd [Mon, 26 Jun 2023 20:36:09 +0000 (13:36 -0700)]
[wasm] Shorter jiterp encoding for zero v128 constants; exploit natural stack alignment (#88058)

* Add support for v128 trace locals
* Use a default-initialized local for zero v128 constants
* Attempt to exploit natural alignment for local loads and stores more often

14 months agoFall back to the forwarder generator for invalid [In, Out] attributes instead of...
Jeremy Koritzinsky [Mon, 26 Jun 2023 20:17:01 +0000 (13:17 -0700)]
Fall back to the forwarder generator for invalid [In, Out] attributes instead of using the already-selected generator with additional diagnostics (#88055)

14 months agoAdd support for building host bits when targeting iOS platforms with Native AOT ...
Milos Kotlar [Mon, 26 Jun 2023 18:52:13 +0000 (20:52 +0200)]
Add support for building host bits when targeting iOS platforms with Native AOT (#87985)

14 months ago[mono][infra] Remove iossimulator runtime-staging pipeline (#88036)
Milos Kotlar [Mon, 26 Jun 2023 18:30:56 +0000 (20:30 +0200)]
[mono][infra] Remove iossimulator runtime-staging pipeline (#88036)

* Remove iossimulator runtime-staging pipeline

14 months agoEnable scoped parameters in signatures of source-generated interop methods (#87987)
Jeremy Koritzinsky [Mon, 26 Jun 2023 16:48:17 +0000 (09:48 -0700)]
Enable scoped parameters in signatures of source-generated interop methods (#87987)

14 months agoAdd SelfContained property to run ILLink targets (#88042)
Milos Kotlar [Mon, 26 Jun 2023 16:27:46 +0000 (18:27 +0200)]
Add SelfContained property to run ILLink targets (#88042)

14 months agoDocument new STJ diagnostics and fix diagnostic id conflicts. (#87980)
Eirik Tsarpalis [Mon, 26 Jun 2023 15:38:12 +0000 (16:38 +0100)]
Document new STJ diagnostics and fix diagnostic id conflicts. (#87980)

14 months agoAdd example to doc for UnsafeAccessor (#88040)
Aaron Robinson [Mon, 26 Jun 2023 14:45:21 +0000 (10:45 -0400)]
Add example to doc for UnsafeAccessor (#88040)

14 months agoRemove optimizeForReading overloads from FrozenDictionary/Set (#87988)
Stephen Toub [Mon, 26 Jun 2023 13:50:16 +0000 (09:50 -0400)]
Remove optimizeForReading overloads from FrozenDictionary/Set (#87988)

We initially added these as a mitigation primarily for construction potentially being super slow.  Now that enough optimization has been done to mitigate those performance concerns, we can get rid of the original mitgation and just have the surface area we initially wanted.

14 months ago[RISC-V] Fix GenericPInvokeCalliHelper arg (#87928)
t-mustafin [Mon, 26 Jun 2023 12:56:37 +0000 (15:56 +0300)]
[RISC-V] Fix GenericPInvokeCalliHelper arg (#87928)

14 months ago[HTTP/3] Fix handling cancelation during QUIC connection establishment (#87971)
Marie Píchová [Mon, 26 Jun 2023 11:47:16 +0000 (13:47 +0200)]
[HTTP/3] Fix handling cancelation during QUIC connection establishment (#87971)

* Fix handling cancelation during QUIC connection establishment

* Feedback

* Recreate client for each reconnect attempt

14 months agoLocalized file check-in by OneLocBuild Task: Build definition ID 679: Build ID 220898...
dotnet bot [Mon, 26 Jun 2023 11:11:48 +0000 (13:11 +0200)]
Localized file check-in by OneLocBuild Task: Build definition ID 679: Build ID 2208985 (#87991)

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

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

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

14 months agoPort FrozenDictionary's length bucket optimizations to FrozenSet (#87989)
Stephen Toub [Mon, 26 Jun 2023 10:22:40 +0000 (06:22 -0400)]
Port FrozenDictionary's length bucket optimizations to FrozenSet (#87989)

Improvements were recently made for construction perf to the length bucket strategy in FrozenDictionary, but the same for FrozenSet were missed.  Port them over.

14 months agoIntroduce DOTNET_JITAllowOptionalRelocs (#88008)
Egor Bogatov [Mon, 26 Jun 2023 09:59:38 +0000 (11:59 +0200)]
Introduce DOTNET_JITAllowOptionalRelocs (#88008)

14 months agoFix `--make-repro-path` handling of "ILLinker compatible" parameters (#87909)
Michal Strehovský [Mon, 26 Jun 2023 02:16:43 +0000 (11:16 +0900)]
Fix `--make-repro-path` handling of "ILLinker compatible" parameters (#87909)

* Fix `--make-repro-path` handling of "ILLinker compatible" parameters

We have a couple command line options that for compat with ILLinker accept either file names, or assembly names.

The zip packages created with `--make-repro-path` don't work well when such parameters are specified because `--make-repro-path` doesn't know whether to de-illinkerify them (the logic is general-purpose and shared with other tools). If this was a file name, the generated response file would be read as an assembly name (because the file no longer exists when we run repro).

The fix is to stop accepting illinkerified command line arguments and instead shim this in MSBuild. That way no transformation is needed - these should always be treated as assembly names in ILC.

Fixes #79032.

Fixes #78752.

14 months agoAdd Uri : ISpanFormattable (#88012)
Stephen Toub [Sun, 25 Jun 2023 18:54:18 +0000 (14:54 -0400)]
Add Uri : ISpanFormattable (#88012)

* Add Uri : ISpanFormattable

Implemented TryFormat by copying in the ToString implementation, manually expanding out each call, deleting all the cruft, and switching return strings to be span copies / writes.

* Update src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/DataContract.cs

14 months ago[RISC-V][JIT] Disable promotion for splitted args (#87855)
Dong-Heon Jung [Sun, 25 Jun 2023 13:37:48 +0000 (22:37 +0900)]
[RISC-V][JIT] Disable promotion for splitted args (#87855)

* [RISC-V][JIT] Reset lvIsRegArg in splitted arg

* Remove LA

* Updated based on the review

* Moved codes

14 months agoAuto generate Event Ids in the logging source gen (#87892)
Tarek Mahmoud Sayed [Sat, 24 Jun 2023 18:56:43 +0000 (11:56 -0700)]
Auto generate Event Ids in the logging source gen (#87892)

14 months agoFix invalid datetimeoffset parsing (#87801)
Maksim Golev [Sat, 24 Jun 2023 18:47:59 +0000 (22:47 +0400)]
Fix invalid datetimeoffset parsing (#87801)

Co-authored-by: Maksim Golev <mgolev@htc-cs.ru>
14 months agoAdd ConfigurationExtensions tests to NativeAOT exclusions (#87955)
Michal Strehovský [Sat, 24 Jun 2023 03:48:56 +0000 (12:48 +0900)]
Add ConfigurationExtensions tests to NativeAOT exclusions (#87955)

14 months agoFix UnsafeAccessors with Relocs (#87986)
Aaron Robinson [Sat, 24 Jun 2023 03:10:27 +0000 (23:10 -0400)]
Fix UnsafeAccessors with Relocs (#87986)

14 months agoJIT: don't set edge weights to zero for inconsistent profiles (#87947)
Andy Ayers [Sat, 24 Jun 2023 02:14:11 +0000 (19:14 -0700)]
JIT: don't set edge weights to zero for inconsistent profiles (#87947)

With the advent of scalable profile counters (or even with the old racing
counters) counts might be approximate or inconsistent. When we run across a
negative count during reconstruction, set the afflicted count to a small
positive value instead of to zero, since zero has special meaning to the JIT.

The aim is to reduce some of the benchmark instability we are seeing in #87324.
Depending on exact counter values, we can see different sets of edge weights
(and hence block weights) from run to run.

14 months agoUse config binding generator in Microsoft.Extensions.Logging.Configuration assembly...
Layomi Akinrinade [Sat, 24 Jun 2023 00:19:56 +0000 (17:19 -0700)]
Use config binding generator in Microsoft.Extensions.Logging.Configuration assembly (#87935)

* Use config binding generator in Microsoft.Extensions.Logging.Configuration assembly

* Suppress package dependency to Microsoft.Extensions.Configuration.Binder

---------

Co-authored-by: Eric StJohn <ericstj@microsoft.com>
14 months agoJIT: Insert writebacks more eagerly (#87869)
Jakob Botsch Nielsen [Fri, 23 Jun 2023 22:41:44 +0000 (00:41 +0200)]
JIT: Insert writebacks more eagerly (#87869)

Before starting replacements within a statement we now look for
physically promoted struct locals passed as call args and write those
back if necessary. This has two benefits:
1. It avoids creating a lot of comma nodes that we would otherwise
   create
2. More importantly, it allows morph's last-use copy omission to kick in
   because we no longer have complex trees as the argument.

Fix #87471

14 months agoJIT: Add a size component to the physical promotion heuristic (#87969)
Jakob Botsch Nielsen [Fri, 23 Jun 2023 22:41:23 +0000 (00:41 +0200)]
JIT: Add a size component to the physical promotion heuristic (#87969)

The physical promotion heuristic was basing all decisions on an estimate
of execution cost. One problematic thing is that that estimate is scaled
by block weights. This does not allow us to take into account that
blocks that are never executed still has some cost associated with
increased code size.

This changes the accounting pass to track unweighted counts and uses the
unweighted counts as part of the heuristic. The new heuristic check is
then that we improve the execution cost, but also that we only allow up
to some amount of size regression depending on how many cycles we
estimate to gain.

14 months agoHandle GT_FTN_ADDR in gtClone (#87942)
Michał Petryka [Fri, 23 Jun 2023 20:59:04 +0000 (22:59 +0200)]
Handle GT_FTN_ADDR in gtClone (#87942)

Fixes #87888

14 months agoTargetOS::IsMacOS was not properly handled on X64 (#87940)
David Wrighton [Fri, 23 Jun 2023 19:42:27 +0000 (12:42 -0700)]
TargetOS::IsMacOS was not properly handled on X64 (#87940)

* TargetOS::IsMacOS was not properly handled on X64
- Add a new concept of only determining the OS dynamically on Unix, and not all the various flags
- Funnel that through our build system
- Remove some legacy msbuild logic that is no longer used

* Fix formatting

14 months ago[browser][MT] Make HTTP and WS clients work (#87567)
Pavel Savara [Fri, 23 Jun 2023 18:45:04 +0000 (20:45 +0200)]
[browser][MT] Make HTTP and WS clients work (#87567)

14 months agoAdd unsupported language detection to the STJ source generator (#87950)
Eirik Tsarpalis [Fri, 23 Jun 2023 18:04:00 +0000 (19:04 +0100)]
Add unsupported language detection to the STJ source generator (#87950)

* Make the STJ source generator detect unsupported C# language versions and emit error diagnostics.

* Fix whitespace

* Do not hardcode minimal lang version on diagnostic string.

14 months agoMatrix4x4.CreateViewport (#87748)
Alexander Radchenko [Fri, 23 Jun 2023 17:35:53 +0000 (23:35 +0600)]
Matrix4x4.CreateViewport (#87748)

* Matrix4x4.CreateViewport

* Revert solution file

* 4x SIMD fields to get a lot better codegen

* result.W optimization

* lint

* lint

14 months ago[NativeAOT] ThreadStatics part 2 (#87148)
Vladimir Sadov [Fri, 23 Jun 2023 16:59:16 +0000 (09:59 -0700)]
[NativeAOT] ThreadStatics part 2 (#87148)

* introduced TlsRootNode

* remove RhGetInlinedThreadStaticStorage

* get rid of c++ tls_InlinedThreadStatics

* remove GetSingleTypeManager

* use .tdata on unix

* do not switch OSX just yet

* bring back tls_InlinedThreadStatics on Windows temporarily

* emit inline access on windows

* unify tls sections

* inline TLS access on linux-x64

* no need for RhpGetInlinedThreadStaticBase when inlining the access

* some comments and TODOs

* enable ILC generation of tls_InlinedThreadStatics on win-x64

* allow storage inlining in multimodule case when TLS access is inlined

* disable "Initial Exec" optimizations

* some comments and formatting

* follow up change that was suggested in the previous PR

* Remove use of RhpGetInlinedThreadstaticBase on x64

* Remove use of RhpGetInlinedThreadStaticBase on arm64

* removed tls_InlinedThreadStatics

* a few cleanups/typos

* fix after rebase

* inlined TLS support for linux-arm64

* PR feedback

14 months agoFaster optimized frozen dictionary creation (4/n) (#87876)
Adam Sitnik [Fri, 23 Jun 2023 14:52:54 +0000 (16:52 +0200)]
Faster optimized frozen dictionary creation (4/n) (#87876)

* Instead of creating a dictionary of lists and a multi-dimensional array

 we rent a single dimension array, where every bucket has five slots.
 The bucket starts at (key.Length - minLength) * 5.
 Each value is an index of the key from _keys array
 or just -1, which represents "null".

Creation time is from 2 to 10 times faster
Indexing is 4-10% slower, but still and order of magnitude faster than Dictionary

* address code review feedback

14 months agoAdd span-based static Create overloads for immutable collections (#87945)
Stephen Toub [Fri, 23 Jun 2023 14:43:42 +0000 (10:43 -0400)]
Add span-based static Create overloads for immutable collections (#87945)

14 months agoFaster optimized frozen dictionary creation (5/n) (#87960)
Adam Sitnik [Fri, 23 Jun 2023 13:47:46 +0000 (15:47 +0200)]
Faster optimized frozen dictionary creation (5/n)  (#87960)

* address code review feedback from previous PR: move the duplicated logic into a dedicated local method

* Based on our observations, in more than 99.5% of cases the number of buckets that meets our criteria is

at least twice as big as the number of unique hash codes.

+33% gain on average

14 months agoUpdate dependencies from https://dev.azure.com/dnceng/internal/_git/dotnet-optimizati...
dotnet-maestro[bot] [Fri, 23 Jun 2023 11:04:45 +0000 (07:04 -0400)]
Update dependencies from https://dev.azure.com/dnceng/internal/_git/dotnet-optimization build 20230621.5 (#87922)

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.23320.5 -> To Version 1.0.0-prerelease.23321.5

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
14 months agoadd timeouts to SendRecv_Stream_TCP_MultipleConcurrentReceives (#87943)
Anton Firszov [Fri, 23 Jun 2023 10:59:03 +0000 (12:59 +0200)]
add timeouts to SendRecv_Stream_TCP_MultipleConcurrentReceives (#87943)

14 months agoLocalized file check-in by OneLocBuild Task: Build definition ID 679: Build ID 220791...
dotnet bot [Fri, 23 Jun 2023 09:57:48 +0000 (11:57 +0200)]
Localized file check-in by OneLocBuild Task: Build definition ID 679: Build ID 2207912 (#87948)

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

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

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

14 months agoDelete CLSID cruft from reflection (#87907)
Michal Strehovský [Fri, 23 Jun 2023 07:23:16 +0000 (16:23 +0900)]
Delete CLSID cruft from reflection (#87907)

Fixes #72914.

14 months ago[RISC-V] Fix constant preparing for shuffle stub (#87708)
t-mustafin [Fri, 23 Jun 2023 06:04:39 +0000 (09:04 +0300)]
[RISC-V] Fix constant preparing for shuffle stub (#87708)

14 months agoRemove uses of SR.GetResourceString throughout the libs (#87912)
Michal Strehovský [Fri, 23 Jun 2023 02:51:08 +0000 (11:51 +0900)]
Remove uses of SR.GetResourceString throughout the libs (#87912)

Fixes #81338.

14 months agoAdjust determinism tests to store away the 2 different binaries that are generated...
David Wrighton [Thu, 22 Jun 2023 23:35:25 +0000 (16:35 -0700)]
Adjust determinism tests to store away the 2 different binaries that are generated (#87852)

- This should allow comparison without needing full rebuilds
- as well as comparison in cases where locally running the tooling doesn't result in equivalent results
- In addition, generate a map file to better understand what portion of the two files does not match

Finally, fix comparison failure identified by using the above tech:
- Fix culture sensive compare in instruction set handling
- This should be culture insensitive, as otherwise different machines can reliably generate different output due to different culture settings

14 months agoRefactor how diagnostics work in the interop generators (#87700)
Jeremy Koritzinsky [Thu, 22 Jun 2023 23:02:03 +0000 (16:02 -0700)]
Refactor how diagnostics work in the interop generators (#87700)

14 months agoBlock non-static application of UnsafeAccessor (#87936)
Aaron Robinson [Thu, 22 Jun 2023 22:38:33 +0000 (18:38 -0400)]
Block non-static application of UnsafeAccessor (#87936)

* Add negative test for generic scenarios

14 months ago[NativeAOT] allow creating CCW for resurrected objects (#86882)
Austin Wise [Thu, 22 Jun 2023 21:13:05 +0000 (14:13 -0700)]
[NativeAOT] allow creating CCW for resurrected objects (#86882)

14 months agoUpdate to the 22.04 debpkg image so we're on a newer ubuntu version. (#86803)
Jeremy Koritzinsky [Thu, 22 Jun 2023 20:33:57 +0000 (13:33 -0700)]
Update to the 22.04 debpkg image so we're on a newer ubuntu version. (#86803)

14 months agoBlock "Convert To LibraryImport" in more unsupported cases (#87503)
Jeremy Koritzinsky [Thu, 22 Jun 2023 20:32:24 +0000 (13:32 -0700)]
Block "Convert To LibraryImport" in more unsupported cases (#87503)

14 months agoJIT: Induce more physical promotions (#87810)
Jakob Botsch Nielsen [Thu, 22 Jun 2023 19:49:15 +0000 (21:49 +0200)]
JIT: Induce more physical promotions (#87810)

Two improvements:
1. Even if we haven't made any physical promotions it is still
   beneficial to go through and try to induce promotions from
   assignments between regular promotions and physical promotion
   candidates (e.g. STORE_LCL_FLD(V00, LCL_VAR(V01)) where V00 is a
   candidate and V01 is regularly promoted).
2. The logic to save candidate stores was missing the case where the
   regularly promoted struct is the destination and the source is the
   physical promotion candidate. Fix this by handling stores separately
   from candidates.

This shows up as a TP regression, but the regression mainly comes from
the work around the new promotions (new IR, more work as part of
replacement), not from actually picking the promotions themselves.

14 months ago[hot_reload] Give more info about why the runtime can't apply updates (#87880)
Aleksey Kliger (λgeek) [Thu, 22 Jun 2023 19:04:23 +0000 (15:04 -0400)]
[hot_reload] Give more info about why the runtime can't apply updates (#87880)

* [hot_reload] Give more info about why the runtime can't apply updates

* rework hot_reload_update_enabled

   Add a version that always checks the environment variable and returns unexpected values back to the caller.

   Change the assembly_update_supported function to take a MonoError and set it to a detailed error message directly.

14 months agoFix a minor race condition in Monitor's AwareLock regarding tracking of waiter starva...
Koundinya Veluri [Thu, 22 Jun 2023 18:52:14 +0000 (11:52 -0700)]
Fix a minor race condition in Monitor's AwareLock regarding tracking of waiter starvation (#87703)

* Fix a minor race condition in Monitor's AwareLock regarding tracking of waiter starvation

- When the first waiter is starting to wait, the waiter starvation start time is reset before registering the waiter. In the CAS loop it may be determined initially that this thread wasn't the first later, and after a successful CAS, it may end up being the first waiter. It's remotely possible that the waiter starvation start time is reset before the CAS loop and that after a successful CAS, this thread was not the first waiter, in which case the waiter starvation start time would not be updated, which can lead to waiter starvation.
- Fixed to always update the waiter starvation start time after the CAS if it was reset before the CAS

14 months ago[mono] ILStrip sorts custom attribute table (#87923)
Jan Dupej [Thu, 22 Jun 2023 18:39:23 +0000 (20:39 +0200)]
[mono] ILStrip sorts custom attribute table (#87923)

This prevents custom attribute table corruption by sorting it as the last step when stripping an assembly. Addresses #85414.

The PR will have to be backported to net7.0.

14 months agoFix runtime-extra-platforms failures related to HybridGlobalization (#87913)
Meri Khamoyan [Thu, 22 Jun 2023 18:25:25 +0000 (22:25 +0400)]
Fix runtime-extra-platforms failures related to HybridGlobalization (#87913)

Add ErrorCodes and return -2 only when options are not found

14 months ago[main] Update dependencies from 10 repositories (#87522)
dotnet-maestro[bot] [Thu, 22 Jun 2023 16:05:20 +0000 (12:05 -0400)]
[main] Update dependencies from 10 repositories (#87522)

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

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.23309.8 -> To Version 8.0.0-beta.23312.4

Dependency coherency updates

Microsoft.SourceLink.GitHub
 From Version 8.0.0-beta.23252.2 -> To Version 8.0.0-beta.23309.3 (parent: Microsoft.DotNet.Arcade.Sdk

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

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.23309.8 -> To Version 8.0.0-beta.23313.6

Dependency coherency updates

Microsoft.SourceLink.GitHub,Microsoft.DotNet.XliffTasks
 From Version 8.0.0-beta.23252.2 -> To Version 8.0.0-beta.23309.3 (parent: Microsoft.DotNet.Arcade.Sdk

* Update dependencies from https://github.com/dotnet/sdk build 20230614.2

Microsoft.DotNet.ApiCompat.Task
 From Version 8.0.100-preview.6.23313.1 -> To Version 8.0.100-preview.6.23314.2

* [wasm] Set SelfContained=true for local, and in-tree targets

Fixes sample builds:

```
/__w/1/s/src/mono/wasm/build/WasmApp.targets(272,5): error : WasmAssembliesToBundle item is empty. No assemblies to process [/__w/1/s/src/mono/sample/wasm/browser-bench/Wasm.Browser.Bench.Sample.csproj]
/__w/1/s/src/mono/wasm/build/WasmApp.targets(272,5): error : WasmAssembliesToBundle item is empty. No assemblies to process [/__w/1/s/src/mono/sample/wasm/browser-profile/Wasm.BrowserProfile.Sample.csproj]
/__w/1/s/src/mono/wasm/build/WasmApp.targets(272,5): error : WasmAssembliesToBundle item is empty. No assemblies to process [/__w/1/s/src/mono/sample/wasm/browser-advanced/Wasm.Advanced.Sample.csproj]
/__w/1/s/src/mono/wasm/build/WasmApp.targets(272,5): error : WasmAssembliesToBundle item is empty. No assemblies to process [/__w/1/s/src/mono/sample/wasm/console-v8/Wasm.Console.V8.Sample.csproj]
/__w/1/s/.packages/microsoft.net.illink.tasks/8.0.0-preview.6.23309.7/build/Microsoft.NET.ILLink.targets(193,5): error NETSDK1102: Optimizing assemblies for size is not supported for the selected publish configuration. Please ensure that you are publishing a self-contained app. [/__w/1/s/src/mono/sample/wasm/browser-bench/Console/Wasm.Console.Bench.Sample.csproj]
/__w/1/s/src/mono/wasm/build/WasmApp.targets(272,5): error : WasmAssembliesToBundle item is empty. No assemblies to process [/__w/1/s/src/mono/sample/wasm/browser/Wasm.Browser.Sample.csproj]
/__w/1/s/src/mono/wasm/build/WasmApp.targets(272,5): error : WasmAssembliesToBundle item is empty. No assemblies to process [/__w/1/s/src/mono/sample/wasm/console-node/Wasm.Console.Node.Sample.csproj]
```

* [wasm] debugger-tests Set RID, and LibrariesConfiguration early

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

runtime.linux-arm64.Microsoft.NETCore.Runtime.JIT.Tools , runtime.linux-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk , runtime.linux-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools , runtime.linux-arm64.Microsoft.NETCore.Runtime.ObjWriter , runtime.linux-musl-arm64.Microsoft.NETCore.Runtime.JIT.Tools , runtime.linux-musl-arm64.Microsoft.NETCore.Runtime.ObjWriter , runtime.linux-musl-x64.Microsoft.NETCore.Runtime.JIT.Tools , runtime.linux-musl-x64.Microsoft.NETCore.Runtime.ObjWriter , runtime.linux-x64.Microsoft.NETCore.Runtime.JIT.Tools , runtime.linux-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk , runtime.linux-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools , runtime.linux-x64.Microsoft.NETCore.Runtime.ObjWriter , 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-arm64.Microsoft.NETCore.Runtime.JIT.Tools , runtime.win-arm64.Microsoft.NETCore.Runtime.ObjWriter , runtime.win-x64.Microsoft.NETCore.Runtime.JIT.Tools , runtime.win-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk , runtime.win-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools , runtime.win-x64.Microsoft.NETCore.Runtime.ObjWriter
 From Version 14.0.0-alpha.1.23307.1 -> To Version 14.0.0-alpha.1.23315.1

* Update dependencies from https://github.com/dotnet/arcade build 20230614.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.23309.8 -> To Version 8.0.0-beta.23314.1

Dependency coherency updates

Microsoft.SourceLink.GitHub,Microsoft.DotNet.XliffTasks
 From Version 8.0.0-beta.23252.2 -> To Version 8.0.0-beta.23309.3 (parent: Microsoft.DotNet.Arcade.Sdk

* Update dependencies from https://github.com/dotnet/sdk build 20230615.13

Microsoft.DotNet.ApiCompat.Task
 From Version 8.0.100-preview.6.23313.1 -> To Version 8.0.100-preview.6.23315.13

* Update dependencies from https://github.com/dotnet/sdk build 20230616.3

Microsoft.DotNet.ApiCompat.Task
 From Version 8.0.100-preview.6.23313.1 -> To Version 8.0.100-preview.6.23316.3

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

runtime.linux-arm64.Microsoft.NETCore.Runtime.JIT.Tools , runtime.linux-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk , runtime.linux-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools , runtime.linux-arm64.Microsoft.NETCore.Runtime.ObjWriter , runtime.linux-musl-arm64.Microsoft.NETCore.Runtime.JIT.Tools , runtime.linux-musl-arm64.Microsoft.NETCore.Runtime.ObjWriter , runtime.linux-musl-x64.Microsoft.NETCore.Runtime.JIT.Tools , runtime.linux-musl-x64.Microsoft.NETCore.Runtime.ObjWriter , runtime.linux-x64.Microsoft.NETCore.Runtime.JIT.Tools , runtime.linux-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk , runtime.linux-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools , runtime.linux-x64.Microsoft.NETCore.Runtime.ObjWriter , 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-arm64.Microsoft.NETCore.Runtime.JIT.Tools , runtime.win-arm64.Microsoft.NETCore.Runtime.ObjWriter , runtime.win-x64.Microsoft.NETCore.Runtime.JIT.Tools , runtime.win-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk , runtime.win-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools , runtime.win-x64.Microsoft.NETCore.Runtime.ObjWriter
 From Version 14.0.0-alpha.1.23307.1 -> To Version 14.0.0-alpha.1.23316.1

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

runtime.linux-arm64.Microsoft.NETCore.Runtime.JIT.Tools , runtime.linux-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk , runtime.linux-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools , runtime.linux-arm64.Microsoft.NETCore.Runtime.ObjWriter , runtime.linux-musl-arm64.Microsoft.NETCore.Runtime.JIT.Tools , runtime.linux-musl-arm64.Microsoft.NETCore.Runtime.ObjWriter , runtime.linux-musl-x64.Microsoft.NETCore.Runtime.JIT.Tools , runtime.linux-musl-x64.Microsoft.NETCore.Runtime.ObjWriter , runtime.linux-x64.Microsoft.NETCore.Runtime.JIT.Tools , runtime.linux-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk , runtime.linux-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools , runtime.linux-x64.Microsoft.NETCore.Runtime.ObjWriter , 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-arm64.Microsoft.NETCore.Runtime.JIT.Tools , runtime.win-arm64.Microsoft.NETCore.Runtime.ObjWriter , runtime.win-x64.Microsoft.NETCore.Runtime.JIT.Tools , runtime.win-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk , runtime.win-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools , runtime.win-x64.Microsoft.NETCore.Runtime.ObjWriter
 From Version 14.0.0-alpha.1.23307.1 -> To Version 14.0.0-alpha.1.23316.4

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

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.23309.8 -> To Version 8.0.0-beta.23316.6

Dependency coherency updates

Microsoft.SourceLink.GitHub,Microsoft.DotNet.XliffTasks
 From Version 8.0.0-beta.23252.2 -> To Version 8.0.0-beta.23314.2 (parent: Microsoft.DotNet.Arcade.Sdk

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

Microsoft.DotNet.CilStrip.Sources , System.ComponentModel.TypeConverter.TestData , System.Data.Common.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.23307.1 -> To Version 8.0.0-beta.23316.1

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

Microsoft.DotNet.HotReload.Utils.Generator.BuildTool
 From Version 8.0.0-alpha.0.23305.2 -> To Version 8.0.0-alpha.0.23316.4

* Update dependencies from https://github.com/dotnet/sdk build 20230616.53

Microsoft.DotNet.ApiCompat.Task
 From Version 8.0.100-preview.6.23313.1 -> To Version 8.0.100-preview.6.23316.53

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

Microsoft.NET.ILLink.Tasks , Microsoft.NET.Sdk.IL , Microsoft.NETCore.App.Runtime.win-x64 , Microsoft.NETCore.ILAsm , runtime.native.System.IO.Ports , System.Text.Json
 From Version 8.0.0-preview.6.23309.7 -> To Version 8.0.0-preview.6.23319.2

* Update dependencies from https://github.com/dotnet/sdk build 20230619.8

Microsoft.DotNet.ApiCompat.Task
 From Version 8.0.100-preview.6.23313.1 -> To Version 8.0.100-preview.6.23319.8

* Fix all host tests to correctly specify SelfContained when necessary

Recent SDK change modified the default for when RuntimeIdentifier is specified. Before this also implied SelfContained, now it doesn't. The host tests were not yet updated for this and thus several failed with various types of failures.

This change modifes all the test projects which specify RuntimeIdentifier to also specify SelfContained=true. And then updates the test infra to:
* Fail if RuntimeIdentifier is specified and SelfContained is not specified
* Update all callsites which specify RuntimeIdentifier to also specify SelfContained.

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

runtime.linux-arm64.Microsoft.NETCore.Runtime.JIT.Tools , runtime.linux-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk , runtime.linux-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools , runtime.linux-arm64.Microsoft.NETCore.Runtime.ObjWriter , runtime.linux-musl-arm64.Microsoft.NETCore.Runtime.JIT.Tools , runtime.linux-musl-arm64.Microsoft.NETCore.Runtime.ObjWriter , runtime.linux-musl-x64.Microsoft.NETCore.Runtime.JIT.Tools , runtime.linux-musl-x64.Microsoft.NETCore.Runtime.ObjWriter , runtime.linux-x64.Microsoft.NETCore.Runtime.JIT.Tools , runtime.linux-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk , runtime.linux-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools , runtime.linux-x64.Microsoft.NETCore.Runtime.ObjWriter , 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-arm64.Microsoft.NETCore.Runtime.JIT.Tools , runtime.win-arm64.Microsoft.NETCore.Runtime.ObjWriter , runtime.win-x64.Microsoft.NETCore.Runtime.JIT.Tools , runtime.win-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk , runtime.win-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools , runtime.win-x64.Microsoft.NETCore.Runtime.ObjWriter
 From Version 14.0.0-alpha.1.23307.1 -> To Version 14.0.0-alpha.1.23319.3

* Implement a workaround for issue with EnableUnsafeBinaryFormatterSerialization

See https://github.com/dotnet/runtime/issues/87811 for more details.

This change uses a custom target to hook right before the runtimeconfig is generated and removes the runtime property from the item group to avoid writing it into runtimeconfig.

* Update dependencies from https://github.com/dotnet/arcade build 20230619.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.23309.8 -> To Version 8.0.0-beta.23319.3

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

Microsoft.NETCore.Runtime.ICU.Transport
 From Version 8.0.0-preview.6.23312.1 -> To Version 8.0.0-preview.6.23319.1

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

Microsoft.DotNet.HotReload.Utils.Generator.BuildTool
 From Version 8.0.0-alpha.0.23305.2 -> To Version 8.0.0-alpha.0.23319.2

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

Microsoft.DotNet.Cecil
 From Version 0.11.4-alpha.23312.1 -> To Version 0.11.4-alpha.23319.2

* Update dependencies from https://github.com/dotnet/sdk build 20230620.3

Microsoft.DotNet.ApiCompat.Task
 From Version 8.0.100-preview.6.23313.1 -> To Version 8.0.100-preview.6.23320.3

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

runtime.linux-arm64.Microsoft.NETCore.Runtime.JIT.Tools , runtime.linux-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk , runtime.linux-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools , runtime.linux-arm64.Microsoft.NETCore.Runtime.ObjWriter , runtime.linux-musl-arm64.Microsoft.NETCore.Runtime.JIT.Tools , runtime.linux-musl-arm64.Microsoft.NETCore.Runtime.ObjWriter , runtime.linux-musl-x64.Microsoft.NETCore.Runtime.JIT.Tools , runtime.linux-musl-x64.Microsoft.NETCore.Runtime.ObjWriter , runtime.linux-x64.Microsoft.NETCore.Runtime.JIT.Tools , runtime.linux-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk , runtime.linux-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools , runtime.linux-x64.Microsoft.NETCore.Runtime.ObjWriter , 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-arm64.Microsoft.NETCore.Runtime.JIT.Tools , runtime.win-arm64.Microsoft.NETCore.Runtime.ObjWriter , runtime.win-x64.Microsoft.NETCore.Runtime.JIT.Tools , runtime.win-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk , runtime.win-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools , runtime.win-x64.Microsoft.NETCore.Runtime.ObjWriter
 From Version 14.0.0-alpha.1.23307.1 -> To Version 14.0.0-alpha.1.23321.1

* Update dependencies from https://github.com/dotnet/arcade build 20230620.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.23309.8 -> To Version 8.0.0-beta.23320.3

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

Microsoft.DotNet.CilStrip.Sources , System.ComponentModel.TypeConverter.TestData , System.Data.Common.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.23307.1 -> To Version 8.0.0-beta.23321.1

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

Microsoft.NET.Workload.Emscripten.Current.Manifest-8.0.100.Transport
 From Version 8.0.0-preview.6.23312.1 -> To Version 8.0.0-preview.6.23321.1

* Disable failing runtime test

```
/Users/runner/work/1/s/src/tests/JIT/jit64/opt/rngchk/RngchkStress2.cs(527,796): error CS8078: An expression is too long or complex to compile [/Users/runner/work/1/s/src/tests/JIT/jit64/opt/rngchk/RngchkStress2_o.csproj] [/Users/runner/work/1/s/src/tests/build.proj]
```
Issue: https://github.com/dotnet/runtime/issues/87879

* disable JIT/jit64/opt/cse/hugeSimpleExpr1.csproj

* Use full name for the test being disabled

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

Microsoft.NET.Workload.Emscripten.Current.Manifest-8.0.100.Transport
 From Version 8.0.0-preview.6.23312.1 -> To Version 8.0.0-preview.7.23321.3

* another try

* Update dependencies from https://github.com/dotnet/arcade build 20230620.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.23309.8 -> To Version 8.0.0-beta.23320.3

Dependency coherency updates

Microsoft.SourceLink.GitHub,Microsoft.DotNet.XliffTasks
 From Version 8.0.0-beta.23252.2 -> To Version 8.0.0-beta.23314.2 (parent: Microsoft.DotNet.Arcade.Sdk

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

Microsoft.NETCore.Runtime.ICU.Transport
 From Version 8.0.0-preview.6.23312.1 -> To Version 8.0.0-preview.7.23321.2

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

Microsoft.DotNet.XHarness.CLI , Microsoft.DotNet.XHarness.TestRunners.Common , Microsoft.DotNet.XHarness.TestRunners.Xunit
 From Version 8.0.0-prerelease.23312.1 -> To Version 8.0.0-prerelease.23321.2

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

Microsoft.DotNet.CilStrip.Sources , System.ComponentModel.TypeConverter.TestData , System.Data.Common.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.23307.1 -> To Version 8.0.0-beta.23321.1

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

Microsoft.DotNet.HotReload.Utils.Generator.BuildTool
 From Version 8.0.0-alpha.0.23305.2 -> To Version 8.0.0-alpha.0.23319.2

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

Microsoft.DotNet.Cecil
 From Version 0.11.4-alpha.23312.1 -> To Version 0.11.4-alpha.23319.2

* Update dependencies from https://github.com/dotnet/sdk build 20230621.38

Microsoft.DotNet.ApiCompat.Task
 From Version 8.0.100-preview.6.23313.1 -> To Version 8.0.100-preview.7.23321.38

---------

Co-authored-by: Ankit Jain <radical@gmail.com>
Co-authored-by: vitek-karas <10670590+vitek-karas@users.noreply.github.com>
14 months agoFix metrics test (#87898)
Tarek Mahmoud Sayed [Thu, 22 Jun 2023 15:14:51 +0000 (08:14 -0700)]
Fix metrics test (#87898)

Co-authored-by: Stephen Toub <stoub@microsoft.com>
14 months agoFaster optimized frozen dictionary creation (3/n) (#87688)
Adam Sitnik [Thu, 22 Jun 2023 14:52:50 +0000 (16:52 +0200)]
Faster optimized frozen dictionary creation (3/n) (#87688)

* avoid the need of having `Action<int, int> storeDestIndexFromSrcIndex` by writing the destination indexes to the provided buffer with hashcodes and moving the responsibility to the caller (1-4% gain)

* For cases where the key is an integer and we know the input us already unique (because it comes from a dictionary or a hash set) there is no need to create another hash set

Also, in cases where simply all hash codes are unique, we can iterate over a span rather than a hash set

+9% gain for scenarios where the key was an integer (time), 10-20% allocations drop
up to +5% gain where string keys turned out to have unique hash codes

Co-authored-by: Stephen Toub <stoub@microsoft.com>
14 months ago[mono] Do not ignore non-public custom attributes in dynamic assemblies (#87406)
Ivan Povazan [Thu, 22 Jun 2023 13:44:15 +0000 (15:44 +0200)]
[mono] Do not ignore non-public custom attributes in dynamic assemblies (#87406)

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

14 months agoShare UTF8 converters between coreclr and mono (#85558)
Adeel Mujahid [Thu, 22 Jun 2023 13:30:16 +0000 (16:30 +0300)]
Share UTF8 converters between coreclr and mono (#85558)

* Share UTF8 converters between coreclr and mono - v1

* Revert "Share UTF8 converters between coreclr and mono - v1"

This reverts commit f9845ac6f53dc95fb747eb21351dfa9412397217.

* Share UTF8 converters between coreclr and mono - v2

* Remove C++ runtime dependency

* Initial C++ to C conversion

* Delete unused macros

* Fix custom alloc in mono

* Error on invalid sequences when caller requested

* Remove count from convert APIs

14 months agoadd support for https proxy (#87638)
Tomas Weinfurt [Thu, 22 Jun 2023 12:22:34 +0000 (14:22 +0200)]
add support for https proxy (#87638)

* add support for https proxy

* winhttp

* https

* diag

14 months ago[main] Update dependencies from dnceng/internal/dotnet-optimization (#87727)
dotnet-maestro[bot] [Thu, 22 Jun 2023 11:56:44 +0000 (07:56 -0400)]
[main] Update dependencies from dnceng/internal/dotnet-optimization (#87727)

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

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.23315.5 -> To Version 1.0.0-prerelease.23316.4

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

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.23315.5 -> To Version 1.0.0-prerelease.23317.4

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

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.23315.5 -> To Version 1.0.0-prerelease.23319.3

* Update dependencies from https://dev.azure.com/dnceng/internal/_git/dotnet-optimization build 20230619.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.23315.5 -> To Version 1.0.0-prerelease.23319.7

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

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.23315.5 -> To Version 1.0.0-prerelease.23320.5

---------

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>