SwapnilGaikwad [Mon, 3 Jul 2023 19:43:36 +0000 (20:43 +0100)]
Remove TODO from a comment in System.Guid.cs (#88337)
dotnet bot [Mon, 3 Jul 2023 15:46:39 +0000 (17:46 +0200)]
Localized file check-in by OneLocBuild Task: Build definition ID 679: Build ID 2213468 (#88301)
Adam Sitnik [Mon, 3 Jul 2023 14:14:56 +0000 (16:14 +0200)]
[Crossgen] Don't display list of enum values in help (#88324)
Jo Shields [Mon, 3 Jul 2023 13:46:29 +0000 (09:46 -0400)]
Upgrade to LLVM 16 & C++17, and bundle libc++ on Linux (#87190)
* Upgrade to LLVM 16, and stop focusing on C++11 ABi stuff from CentOS 7
Co-authored-by: Zoltan Varga <vargaz@gmail.com>
Thefrank [Mon, 3 Jul 2023 13:31:49 +0000 (06:31 -0700)]
[mono] fix memfuncs for FreeBSD (#88300)
* fix memfuncs for FreeBSD
* match format
James Newton-King [Mon, 3 Jul 2023 12:43:08 +0000 (20:43 +0800)]
Improve Hosting debugging (#88308)
* Improve Hosting debugging
* Update
* Remove Logger
* PR feedback
Michal Strehovský [Mon, 3 Jul 2023 04:08:33 +0000 (13:08 +0900)]
Expose stack trace metadata stripping as a supported option (#88235)
Nikita Balabaev [Sun, 2 Jul 2023 18:37:07 +0000 (20:37 +0200)]
Fix OptionsValidator source-gen to skip static and const members (#88254)
Co-authored-by: Nikita Balabaev <nbalabaev@microsoft.com>
Stephen Toub [Sat, 1 Jul 2023 22:14:52 +0000 (18:14 -0400)]
Implement IList<T> on some LINQ iterators (#88249)
`ICollection<T>` provides both a Count and a CopyTo, and `IList<T>` an indexer, all of which can make various consumption mechanisms more efficient. We only implement the interfaces when the underlying collection has a fixed size and all of the interface implementations are side-effect free (in particular, while appealing to do so, we don't implement them on various Select iterators).
Some of the serialization tests need to be fixed as a result. The state of Queue's array is a bit different based on how its initialized, and such private details show up in BinaryFormatter output. Rather than special-casing the output per framework and core, I've just changed the test itself to ensure Queue can't see the size of the input collection.
Katelyn Gadd [Sat, 1 Jul 2023 20:08:33 +0000 (13:08 -0700)]
[wasm] Implement complete PackedSimd feature set in interpreter (#87903)
Implement all PackedSIMD APIs in wasm builds of the interpreter based on a table and auto-generated code
Implement most PackedSIMD APIs in jiterpreter
Detect constant simd arguments in jiterpreter and verify them
Simplify unused/temporary dregs in interp
Andrew Au [Sat, 1 Jul 2023 20:04:28 +0000 (13:04 -0700)]
Avoid reporting frozen segments in GetGenerationBounds (#85727)
Co-authored-by: Noah Falk <noahfalk@users.noreply.github.com>
Jakob Botsch Nielsen [Sat, 1 Jul 2023 19:35:12 +0000 (21:35 +0200)]
Unify JIT interface getTypeLayout between VM and crossgen2; refine what is considered "significant padding" (#88238)
* Stop considering auto layout types to have significant padding in the VM. This was already the behavior in crossgen2. This fixes one of the points of #71711.
* Remove special case where we never considered structs with GC pointers to have significant padding. After the above change this has no additional diffs.
* Fix the inline array layout expansion; the numFields of the inline array node was computed incorrectly, and the parent indices of descendants were not updated correctly
Example C#:
```csharp
private (long, int) _tuple;
[MethodImpl(MethodImplOptions.NoInlining)]
private void Foo()
{
_tuple = (5, 10);
}
```
Before:
```asm
; V00 this [V00,T00] ( 3, 3 ) ref -> rcx this class-hnd single-def
;# V01 OutArgs [V01 ] ( 1, 1 ) struct ( 0) [rsp+00H] do-not-enreg[XS] addr-exposed "OutgoingArgSpace"
; V02 tmp1 [V02 ] ( 4, 8 ) struct (16) [rsp+08H] do-not-enreg[SB] ld-addr-op "NewObj constructor temp"
; V03 tmp2 [V03,T01] ( 3, 5 ) long -> [rsp+08H] do-not-enreg[] "field V02.Item1 (fldOffset=0x0)" P-DEP
; V04 tmp3 [V04,T02] ( 3, 5 ) int -> [rsp+10H] do-not-enreg[] "field V02.Item2 (fldOffset=0x8)" P-DEP
;
; Lcl frame size = 24
G_M52879_IG01: ;; offset=0000H
sub rsp, 24
vzeroupper
;; size=7 bbWeight=1 PerfScore 1.25
G_M52879_IG02: ;; offset=0007H
vxorps xmm0, xmm0, xmm0
vmovups xmmword ptr [rsp+08H], xmm0
mov qword ptr [rsp+08H], 5
mov dword ptr [rsp+10H], 10
vmovups xmm0, xmmword ptr [rsp+08H]
vmovups xmmword ptr [rcx+08H], xmm0
;; size=38 bbWeight=1 PerfScore 8.33
G_M52879_IG03: ;; offset=002DH
add rsp, 24
ret
;; size=5 bbWeight=1 PerfScore 1.25
; Total bytes of code 50, prolog size 7, PerfScore 15.83, instruction count 10, allocated bytes for code 50 (MethodHash=
1da13170) for method Program:Foo():this (FullOpts)
```
After:
```asm
; V00 this [V00,T00] ( 4, 4 ) ref -> rcx this class-hnd single-def
;# V01 OutArgs [V01 ] ( 1, 1 ) struct ( 0) [rsp+00H] do-not-enreg[XS] addr-exposed "OutgoingArgSpace"
;* V02 tmp1 [V02 ] ( 0, 0 ) struct (16) zero-ref ld-addr-op "NewObj constructor temp"
;* V03 tmp2 [V03,T01] ( 0, 0 ) long -> zero-ref "field V02.Item1 (fldOffset=0x0)" P-INDEP
;* V04 tmp3 [V04,T02] ( 0, 0 ) int -> zero-ref "field V02.Item2 (fldOffset=0x8)" P-INDEP
;
; Lcl frame size = 0
G_M52879_IG01: ;; offset=0000H
;; size=0 bbWeight=1 PerfScore 0.00
G_M52879_IG02: ;; offset=0000H
mov qword ptr [rcx+08H], 5
mov dword ptr [rcx+10H], 10
;; size=15 bbWeight=1 PerfScore 2.00
G_M52879_IG03: ;; offset=000FH
ret
;; size=1 bbWeight=1 PerfScore 1.00
; Total bytes of code 16, prolog size 0, PerfScore 4.60, instruction count 3, allocated bytes for code 16 (MethodHash=
1da13170) for method Program:Foo():this (FullOpts)
```
Adeel Mujahid [Sat, 1 Jul 2023 19:02:19 +0000 (22:02 +0300)]
Fix make repro cli command (#88289)
Jakob Botsch Nielsen [Sat, 1 Jul 2023 18:36:20 +0000 (20:36 +0200)]
JIT: Remove a quirk in regular promotion (#88130)
Also fix a bug in LSRA: if we undo promotion of one field of a multi-reg
struct and as a result undo for the other fields as well, we must also
clear out the largeVectorVars bitset to indicate these are no longer
candidates.
Eirik Tsarpalis [Sat, 1 Jul 2023 08:07:46 +0000 (09:07 +0100)]
Apply a number of improvements and bugfixes to JsonNode (#88194)
* Avoid JsonElement torn read in a few JsonArray/JsonDocument and unify code patterns.
* Simplify and clean up JsonValue implementation -- fix DeepEquality bugs.
* Update src/libraries/System.Text.Json/src/System/Text/Json/Nodes/JsonValueOfTPrimitive.cs
* Avoid delegate allocation in the JsonObject setter.
Pavel Savara [Sat, 1 Jul 2023 07:50:21 +0000 (09:50 +0200)]
[wasm] Introduce <InvariantTimezone> build flag (#87284)
Andy Ayers [Sat, 1 Jul 2023 01:53:48 +0000 (18:53 -0700)]
JIT: Don't set patchpoints in methods with CORINFO_DEBUG_CODE (#88227)
In #88199 the debugger is overriding some jit flags, but has left other flags set
that confuse the jit: both `TIER0` and `DEBUG_CODE` end uip set so one part of the jit
used logic appropriate for `TIER0` and another part did not.
The JIT ended up creating a patchpoint for OSR in a method with localloc and this
combination is not supported by OSR and lead to a crash.
Harden the jit so if the runtime asks for debuggable code, the jit will never
generate patchpoints.
Tarek Mahmoud Sayed [Sat, 1 Jul 2023 00:52:21 +0000 (17:52 -0700)]
Fix Out of memory with source gen tests (#88266)
Egor Bogatov [Fri, 30 Jun 2023 23:17:52 +0000 (01:17 +0200)]
Clean up Guid.DecodeByte (#88267)
Jeremy Koritzinsky [Fri, 30 Jun 2023 21:34:20 +0000 (14:34 -0700)]
Fix build failures when declaring a COM-style enumerable type (#88263)
Ilona Tomkowicz [Fri, 30 Jun 2023 21:15:28 +0000 (23:15 +0200)]
[browser] Fix missing braces when resolving application culture (#88264)
Regression from https://github.com/dotnet/runtime/pull/86255.
Steve Harter [Fri, 30 Jun 2023 21:04:00 +0000 (16:04 -0500)]
Add IHostedLifecycleService (#87335)
Stephen Toub [Fri, 30 Jun 2023 20:48:31 +0000 (16:48 -0400)]
Delete stale SkipOnTargetFramework attributes (and a few tests) (#88251)
These projects don't run tests on .NET Framework.
Stephen Toub [Fri, 30 Jun 2023 20:48:22 +0000 (16:48 -0400)]
Simplify LINQ Shuffler test helper (#88252)
The seed support is dead code, and the whole thing can be simplified down to a one-line helper.
Egor Bogatov [Fri, 30 Jun 2023 20:20:09 +0000 (22:20 +0200)]
Rename JITAllowOptionalRelocs to JitEnableOptionalRelocs (#88243)
Co-authored-by: Michał Petryka <35800402+MichalPetryka@users.noreply.github.com>
Elinor Fung [Fri, 30 Jun 2023 20:08:27 +0000 (16:08 -0400)]
Remove code in nativeaot event trace files under !FEATURE_NATIVEAOT or FEATURE_DTRACE (#88258)
Jeremy Koritzinsky [Fri, 30 Jun 2023 18:30:22 +0000 (11:30 -0700)]
Add NFloat as an interop intrinsic for the source generator (#88257)
Pent Ploompuu [Fri, 30 Jun 2023 16:39:46 +0000 (19:39 +0300)]
Reduce allocations in Microsoft.Extensions.Configuration (#88211)
Co-authored-by: Günther Foidl <gue@korporal.at>
Trung Nguyen [Fri, 30 Jun 2023 16:05:40 +0000 (02:05 +1000)]
[libs] Fix poll events conversion (#86843)
- Use bitwise and to check for all flags instead of using a switch
statement for poll events flags conversion.
- Convert poll events before comparison in assert statement.
Tanner Gooding [Fri, 30 Jun 2023 15:43:01 +0000 (08:43 -0700)]
Tweak the register order for xarch to better account for callee saved (#88151)
* Tweak the register order for xarch to better account for callee saved
* Have a different register order for leaf methods
* Preference R12 after R13 for 2x the savings
* Allow float/vector constants to use EVEX registers
* Fix Runtime_34937 to expect the right codegen on Unix
* Don't add VAR_ORDER_LEAF and add a comment explaining why we prefer callee trash then callee save
* Simplifying the REG_VAR_ORDER_FLT_EVEX_CALLEE_* defines
* Ensure x86 matches the general x64 ordering
* Ensure that AllBitsSet vector constants correctly handle high simd registers
* Ensure that Runtime_34937 expects the right codegen for Windows x64
* Improve the register ordering more
* Ensure scalar AllBitsSet handles EVEX registers
* Don't change register allocation order for x86
* Minimize the diffs
James Newton-King [Fri, 30 Jun 2023 13:19:14 +0000 (21:19 +0800)]
Improve Microsoft.Extensions.DependencyInjection debugging (#88082)
Jakob Botsch Nielsen [Fri, 30 Jun 2023 12:50:14 +0000 (14:50 +0200)]
JIT: Refactor physical promotion store decomposition slightly (#88182)
Introduce a LocationAccess helper class to create derived accesses off
of the destination and source locations for the store. Unify all the
code that looks for regularly promoted fields in this class, and use it
consistently for all the derived accesses.
Also update terminology from "assignment" to "store" in a few places,
and add a "(last use)" string for fields when decomposing block stores.
Tomas Weinfurt [Fri, 30 Jun 2023 12:15:05 +0000 (14:15 +0200)]
update QuicError (#88234)
* update QuicError
* feedback
* ProtocolError
Adeel Mujahid [Fri, 30 Jun 2023 12:06:43 +0000 (15:06 +0300)]
Update System.CommandLine version (#84229)
Parker Bibus [Fri, 30 Jun 2023 08:34:57 +0000 (01:34 -0700)]
Update the CompilerPlatformTestingVersion. (#88221)
dotnet bot [Fri, 30 Jun 2023 08:29:21 +0000 (10:29 +0200)]
Localized file check-in by OneLocBuild Task: Build definition ID 679: Build ID 2212176 (#88219)
Nickolas McDonald [Fri, 30 Jun 2023 07:45:25 +0000 (03:45 -0400)]
Don't emit nor generate the manifest for NativeRuntimeEventSource (#86850)
Meri Khamoyan [Fri, 30 Jun 2023 07:00:22 +0000 (11:00 +0400)]
[OSX] When HybridGlobalization mode is on load hybrid icu file (#88041)
Load icudt_hybrid.dat file when hybrid mode is on
Jan Kotas [Fri, 30 Jun 2023 06:53:58 +0000 (23:53 -0700)]
Disable Aot and Trim analyzers when building runtime tests (#88209)
When targeting native AOT, these analyzers are producing warnings that are treated as errors
Milos Kotlar [Fri, 30 Jun 2023 06:08:30 +0000 (08:08 +0200)]
[nativeaot][perf] Simplify the build process for the perf measurements (#88201)
* Simplify the build process and update sample app build script
* Update eng/pipelines/coreclr/perf-non-wasm-jobs.yml
Co-authored-by: Adeel Mujahid <3840695+am11@users.noreply.github.com>
---------
Co-authored-by: Adeel Mujahid <3840695+am11@users.noreply.github.com>
Jeremy Koritzinsky [Fri, 30 Jun 2023 02:58:29 +0000 (19:58 -0700)]
Specially consider CLong, CULong and Guid strictly blittable (#88213)
Jeremy Koritzinsky [Thu, 29 Jun 2023 23:05:19 +0000 (16:05 -0700)]
Fix MSBuild integration for the host build with CMake 3.26 (#88208)
Thays Grazia [Thu, 29 Jun 2023 22:15:43 +0000 (19:15 -0300)]
[wasm][debugger] Fixing "Frame not in module" after vscode-js-debug changes (#87979)
* support executionContextsCleared message
* addressing @radical comments
* change singleordefault with firstordefault
Stephen Toub [Thu, 29 Jun 2023 21:02:24 +0000 (17:02 -0400)]
Replace EventWrittenEventArgs.EmptyPayload with ReadOnlyCollection.Empty singleton (#87906)
Andy Ayers [Thu, 29 Jun 2023 19:46:59 +0000 (12:46 -0700)]
JIT: fix case where RBO leads to an invalid CSE (#88159)
If phi-based RBO bypasses a block with a memory PHI, it is possible for CSE to find
invalid memory-based CSEs. An example of this is seen in the attached test case.
Ideally perhaps CSE would kill availability of these CSEs at the point where memory
can change, but that seems difficult to arrange. Instead, we mark the bypased block
as one that will not propagate any incoming CSEs, as the failures we know of require
CSEs to flow back through this block.
Fixes #88091.
Tom Deseyn [Thu, 29 Jun 2023 18:18:13 +0000 (20:18 +0200)]
TarEntry: small fix-up. (#88118)
Jan Kotas [Thu, 29 Jun 2023 18:16:14 +0000 (11:16 -0700)]
Delete some dead code (#88139)
* Delete some dead code
* Delete comment referencing code that no longer exists
Alexander Radchenko [Thu, 29 Jun 2023 17:13:36 +0000 (23:13 +0600)]
TryFindSystemTimeZoneById (#88071)
Co-authored-by: Dan Moseley <danmose@microsoft.com>
Parker Bibus [Thu, 29 Jun 2023 17:08:24 +0000 (10:08 -0700)]
Update NugetProjectModelVersion and NugetPackagingVersion from 6.2.2 to 6.2.4 (#88107)
* Update Nuget Package Versions.
* Update another Nuget Value.
Vlad Brezae [Thu, 29 Jun 2023 16:47:57 +0000 (19:47 +0300)]
[mono][interp] Fix handling of boolean comparison (#88193)
A boolean value is actually stored as byte behind the scenes, so it can have a value range from 0..255, not just 0/1. Stop converting it to 0/1 when loading it since it can lead to comparison issues.
Szczepan Ćwikliński [Thu, 29 Jun 2023 16:30:32 +0000 (18:30 +0200)]
Allow ResolveReadyToRunCompilers to be run under FreeBSD (#84250)
* Allow ResolveReadyToRunCompilers to be run under FreeBSD
* Generalize to any Linux
Co-authored-by: Jan Kotas <jkotas@microsoft.com>
Jackson Schuster [Thu, 29 Jun 2023 16:30:01 +0000 (09:30 -0700)]
Discard lastIndexMarshalled variable if it is not otherwise used (#88060)
Tracks the last index marshalled in the interop generators to ensure we don't cleanup any unmarshalled elements. It discards the "last index marshalled" variable if it is unused in the cleanup stage.
etemi [Thu, 29 Jun 2023 15:36:18 +0000 (17:36 +0200)]
ZipArchive now disposes given stream only once (#87982)
* Fix #79695
Even though the IDisposable contract says that you should be able to call
Dispose multiple times, be forgiving for implementations that throw when
Dispose is called multiple times.
* Remove line
* Augmented test to explicitly test behavior according to leaveOpen parameter
---------
Co-authored-by: etemi <etemi>
dotnet-maestro[bot] [Thu, 29 Jun 2023 15:33:43 +0000 (11:33 -0400)]
[main] Update dependencies from dotnet/arcade dotnet/sdk (#88187)
* Update dependencies from https://github.com/dotnet/arcade build
20230628.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.23327.3 -> To Version 8.0.0-beta.23328.2
* Update dependencies from https://github.com/dotnet/sdk build
20230629.3
Microsoft.DotNet.ApiCompat.Task
From Version 8.0.100-preview.7.23328.5 -> To Version 8.0.100-preview.7.23329.3
---------
Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Kevin Jones [Thu, 29 Jun 2023 15:08:29 +0000 (11:08 -0400)]
Support displaying X.500 AttributeValue in binary form
Vlad Brezae [Thu, 29 Jun 2023 14:26:23 +0000 (17:26 +0300)]
[mono][interp] Improve verbose output of dumped instructions (#88185)
* [mono][interp] Improve verbose logging of instruction data
Dump the method/class name instead of an index.
* [mono][interp] Fix ins data type for various instructions
Also add new data type for MonoVTable
Stephen Toub [Thu, 29 Jun 2023 13:56:51 +0000 (09:56 -0400)]
Bump SharedArrayPool's max arrays per partition default from 8 to 32 (#87905)
The 8 value was picked arbitrarily years ago, with a smaller value being picked because nothing was ever trimmed from the pool. Since then, we've seen a significant increase in use of the pool, putting pressure on its storage, and we also added trimming so that memory pressure causes arrays to be pitched. Longer term, we might want to remove this limit entirely and have more of a dynamic scheme for allowing the buckets to grow and shrink. For now, though, I'm bumping the limit up from 8 arrays per core to 32 arrays per core to provide some more wiggle room. 32 is also somewhat arbitrary, though recent examples on a few real services that were hitting the 8 limit (resulting in increased allocation and contention) were mollified by 32.
Stephen Toub [Thu, 29 Jun 2023 13:52:36 +0000 (09:52 -0400)]
Use Utf8.IsValid in System.Text.Json (#88165)
* Use Utf8.IsValid in System.Text.Json
* Fix TestingGetStringInvalidUTF8 test
It's expecting there to always be a DecoderFallbackException as the inner exception.
Stephen Toub [Thu, 29 Jun 2023 13:52:28 +0000 (09:52 -0400)]
Augment generated regex XML comment with original pattern and options (#88175)
* Augment generated regex XML comment with original pattern and options
* Delete special-handling of ECMADigitClass for consistency
Aleksey Kliger (λgeek) [Thu, 29 Jun 2023 13:44:15 +0000 (09:44 -0400)]
[mono] Use InlineArrayAttribute for ArgumentData and StackAllocatedByRefs (#88149)
* [mono] Use InlineArrayAttribute for ArgumentData and StackAllocatedByRefs
Mono supports InlineArray
* Apply suggestions from code review
* Expose two more uses of InlineArray in ParamsArray.cs
---------
Co-authored-by: Jan Kotas <jkotas@microsoft.com>
Michal Strehovský [Thu, 29 Jun 2023 11:25:39 +0000 (20:25 +0900)]
Use LLD linker when targeting Bionic (#88179)
https://github.com/dotnet/runtime/issues/87340#issuecomment-
1612561061
Stephen Toub [Thu, 29 Jun 2023 10:42:59 +0000 (06:42 -0400)]
Clone AllowTlsResume as part of SslClientAuthenticationOptionsExtensions.ShallowClone (#88155)
Looks like this was missed as part of adding AllowTlsResume. This helper is used by HttpClient and friends to clone all the settings of an SslClientAuthenticationOptions instance into a new instance.
dotnet bot [Thu, 29 Jun 2023 09:19:19 +0000 (11:19 +0200)]
Localized file check-in by OneLocBuild Task: Build definition ID 679: Build ID 2211409 (#88169)
Adam Sitnik [Thu, 29 Jun 2023 09:00:07 +0000 (11:00 +0200)]
Introduction to vectorization with Vector128 and Vector256 (#84115)
Co-authored-by: Günther Foidl <gue@korporal.at>
Co-authored-by: Dan Moseley <danmose@microsoft.com>
Co-authored-by: Rob Hague <rob.hague00@gmail.com>
Co-authored-by: Tanner Gooding <tagoo@outlook.com>
Co-authored-by: Stephen Toub <stoub@microsoft.com>
Co-authored-by: Jeff Handley <jeffhandley@users.noreply.github.com>
Ankit Jain [Thu, 29 Jun 2023 08:27:03 +0000 (04:27 -0400)]
[wasm] Use latest sdk for workload testing (#88173)
This reverts the earlier change from
7112a41c86ca856dc0a462afafb953be6ac4fcc7 which was working around
https://github.com/dotnet/runtime/issues/87647
Meri Khamoyan [Thu, 29 Jun 2023 08:23:59 +0000 (12:23 +0400)]
[OSX] HybridGlobalization Implement casing functions (#87919)
Implement GlobalizationNative_ChangeCaseNative , GlobalizationNative_ChangeCaseInvariantNative for OSX
Michał Petryka [Thu, 29 Jun 2023 06:14:55 +0000 (08:14 +0200)]
Convert Volatile to JIT intrinsics (#88073)
Marc Brooks [Thu, 29 Jun 2023 06:03:30 +0000 (01:03 -0500)]
Remove redundant call to ConvertToCanonForm (#88171)
Call to `type.ConvertToCanonForm(CanonicalFormKind.Specific)` is redundant as we just computed the `canonType` two lines up. Reuse the computed value
Co-authored-by: Michal Strehovský <MichalStrehovsky@users.noreply.github.com>
Jan Vorlicek [Thu, 29 Jun 2023 06:02:19 +0000 (08:02 +0200)]
Fix NativeAOT rethrow bug (#88113)
* Fix NativeAOT rethrow bug
The rethrowing incorrectly starts searching for exception clause based
on the previously searched clause for the exception being rethrown. It
should always start from the beginning.
* Cleanup and a regression test
Michal Strehovský [Thu, 29 Jun 2023 05:25:52 +0000 (14:25 +0900)]
Mark a new test as NativeAotIncompatible (#88176)
We don't intend to implement non-intrinsic expansion of GetSpanDataFrom, same as InitializeArray.
Jakob Botsch Nielsen [Thu, 29 Jun 2023 05:25:26 +0000 (07:25 +0200)]
JIT: Enable physical promotion by default (#88090)
Fix #6534
Fix #6707
Fix #7576
Fix #32415
Fix #58522
Fix #68797
Fix #71510
Fix #71565
Fix #76928
Michal Strehovský [Thu, 29 Jun 2023 03:26:32 +0000 (12:26 +0900)]
Do not run chmod on Windows (#88174)
These targets were written before we supported cross-OS compilation, but now it's sort of possible.
Tom Deseyn [Thu, 29 Jun 2023 03:17:38 +0000 (05:17 +0200)]
NamedPipeServerStream.Unix: GetImpersonationUserName tweaks. (#88125)
* NamedPipeServerStream.Unix: GetImpersonationUserName tweaks.
When the user name is not found, return an empty string like Environment.UserName.
Add EINTR handling.
* Remove GetNameFromUid and use GetUserNameFromPasswd.
Steve Pfister [Wed, 28 Jun 2023 23:03:41 +0000 (16:03 -0700)]
[iOS] Skip PfxIterationCountTests.Import_BlobHasMoreThanOnePfx_LoadsOnlyOne (#88146)
Co-authored-by: Steve Pfister <steve.pfister@microsoft.com>
Alexander Köplinger [Wed, 28 Jun 2023 22:59:57 +0000 (00:59 +0200)]
[mono] Set SelfContained to true for iOS/Android sample apps (#88126)
We always need SelfContained when using Mono.
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>
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
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>
Justin Anderson [Wed, 28 Jun 2023 19:47:22 +0000 (12:47 -0700)]
GetProcessInfo3 diagnostic command (#87707)
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>
Pavel Ivanov [Wed, 28 Jun 2023 14:39:29 +0000 (19:39 +0500)]
Fix validation on build (#87354)
Jan Vorlicek [Wed, 28 Jun 2023 14:04:56 +0000 (16:04 +0200)]
Remove unused pParentOffset argument in few ExceptionTracker methods (#88131)
Pavel Savara [Wed, 28 Jun 2023 11:43:34 +0000 (13:43 +0200)]
[browser] introduce sourcemaps (#86152)
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`.
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.
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.
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>
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
Fan Yang [Wed, 28 Jun 2023 04:08:27 +0000 (00:08 -0400)]
Remove Vector<T> fallbacks (#88101)
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>
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.
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.
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)
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>
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.
Katelyn Gadd [Tue, 27 Jun 2023 22:03:11 +0000 (15:03 -0700)]
[wasm] Automatically instrument jiterpreter traces if td->verbose_level > 0 (#88053)
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.
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
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.
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)