platform/upstream/dotnet/runtime.git
17 months agoJIT: profile synthesis consistency checking and more (#83068)
Andy Ayers [Tue, 7 Mar 2023 16:31:45 +0000 (08:31 -0800)]
JIT: profile synthesis consistency checking and more (#83068)

Add the ability to verify that the profile counts produced by synthesis are
self-consistent, and optionally to assert if they're not. Disable checking
if we know profile flow will be inconsistent (because of irreducible loops
and/or capped cyclic probabilities).

Consistently ignore the likely flow out of handlers. Generally we model
handlers as isolated subgraphs that do not contribute flow to the main flow
graph. This is generally acceptable.

The one caveat is for flow into finallies. The plan here is to fix the weights
for finallies up in a subsequent pass via simple scaling once callfinallies
are introduced. Flow weights out of finallies will be ignored as the
callfinally block will be modeled as always flowing to its pair tail.

Also add the ability to propagate the synthesized counts into the live profile
data. This is mainly to facilitate using the MIBC comparison tools we have
to assess how closely the synthesiszed data comes to actual PGO data.

Finally, enable the new synthesized plus checked modes in a few of our PGO
pipelines.

Contributes to #82964.

17 months ago[wasm] Disable GetAsync_ManyDifferentResponseHeaders_ParsedCorrectly on NodeJS (...
Marek Fišera [Tue, 7 Mar 2023 15:54:24 +0000 (16:54 +0100)]
[wasm] Disable GetAsync_ManyDifferentResponseHeaders_ParsedCorrectly on NodeJS (#83090)

17 months ago[wasm] Add narrow methods to PackedSimd (#83084)
Radek Doulik [Tue, 7 Mar 2023 15:21:36 +0000 (16:21 +0100)]
[wasm] Add narrow methods to PackedSimd (#83084)

* [wasm] Add narrow methods to PackedSimd

Add them as internal as the approved API contains wrong methods for
these. https://github.com/dotnet/runtime/issues/53730#issuecomment-1453900537

This will allow faster implementation of IndexOfAnyValues for wasm.
https://github.com/dotnet/runtime/pull/82789#issuecomment-1451056305

* Fix build

17 months agoMake open method resolver pay for play (#83064)
Michal Strehovský [Tue, 7 Mar 2023 11:50:15 +0000 (20:50 +0900)]
Make open method resolver pay for play (#83064)

Resolver is called into from delegate thunks, so we can't get rid of it, but to construct a resolver one needs to do some reflection first. Make the resolution logic statically depend on resolver being constructed.

17 months agoIfdef out a piece of unreachable reflection stack (#83067)
Michal Strehovský [Tue, 7 Mar 2023 07:00:18 +0000 (16:00 +0900)]
Ifdef out a piece of unreachable reflection stack (#83067)

This is only reachable if we have a .NET Native-esque SharedLibrary.dll. Method signature comparison calls into the type loader.

17 months agoEmit leaner cctor context for preinitialized types (#83065)
Michal Strehovský [Tue, 7 Mar 2023 06:59:49 +0000 (15:59 +0900)]
Emit leaner cctor context for preinitialized types (#83065)

If a type is preinitialized, we shouldn't need the cctor pointer anymore. This was the only thing keeping around general-purpose comparers logic after @EgorBo's #83054.

17 months agoImprove perf of CharEnumerator (#82990)
Stephen Toub [Tue, 7 Mar 2023 06:48:45 +0000 (01:48 -0500)]
Improve perf of CharEnumerator (#82990)

17 months agoAllow devirtualizing more interface calls (#82927)
Michal Strehovský [Tue, 7 Mar 2023 04:52:41 +0000 (13:52 +0900)]
Allow devirtualizing more interface calls (#82927)

There is an existing implementation of "does this introduce variance complexities"?

17 months agoAvoid generic virtual methods in enum infrastructure (#83063)
Michal Strehovský [Tue, 7 Mar 2023 04:50:22 +0000 (13:50 +0900)]
Avoid generic virtual methods in enum infrastructure (#83063)

17 months ago[wasm] Don't generate unused imports in jiterpreter traces (#83061)
Katelyn Gadd [Tue, 7 Mar 2023 03:37:49 +0000 (19:37 -0800)]
[wasm] Don't generate unused imports in jiterpreter traces (#83061)

17 months agoImprove EqualityComparer for NativeAOT (#83054)
Egor Bogatov [Tue, 7 Mar 2023 03:09:08 +0000 (04:09 +0100)]
Improve EqualityComparer for NativeAOT (#83054)

Remove s_default field from EqualityComparer.NativeAot.cs and Comparer.NativeAot.cs

17 months agofix QUIC_STATUS in macOS (#83011)
Tomas Weinfurt [Tue, 7 Mar 2023 01:52:33 +0000 (17:52 -0800)]
fix QUIC_STATUS in macOS (#83011)

17 months ago[NativeAOT] Experiment: Cache location of unwind sections (#82994)
Filip Navara [Tue, 7 Mar 2023 00:46:48 +0000 (01:46 +0100)]
[NativeAOT] Experiment: Cache location of unwind sections (#82994)

* WIP: Cache managed code unwind section lookup

* Clean up

* Attempt to fix EHABI and Darwin builds

* Rename `ip` to `pc`

17 months agoMake ComWrappersUnwrapper public in test assembly (#83046)
Jackson Schuster [Tue, 7 Mar 2023 00:36:31 +0000 (16:36 -0800)]
Make ComWrappersUnwrapper public in test assembly (#83046)

17 months agoJIT: Remove JTRUE(relop) invariant in the backend (#82766)
Jakob Botsch Nielsen [Tue, 7 Mar 2023 00:01:28 +0000 (01:01 +0100)]
JIT: Remove JTRUE(relop) invariant in the backend (#82766)

Today the backend (and much of the JIT) allows only JTRUE with a relop
operand, and it is always assumed that this relop appears right before
JTRUE in linear order. This change adds support for JTRUE nodes with
arbitrary integral operands from lowering and onwards. The operand is
also allowed to appear at arbitrary locations in LIR.

With this, we can now enable an optimization that turns
EQ/NE(relop/SETCC, 0) into just a (potentially) reversed condition. This
improves codegen for some cases with SELECTCC and gives us a simple way
to allow for compare chains that feed conditional branches in the
future.

In addition change DISPTREERANGE to handle nodes that consume flags
by also finding the flags definitions as part of looking for data flow.
This is best-effort only, so there is an assert that it is only used in debug
builds.

17 months agoAdds a test for compiler generated trim warning suppression issue (#82957)
Vitek Karas [Mon, 6 Mar 2023 21:56:15 +0000 (13:56 -0800)]
Adds a test for compiler generated trim warning suppression issue (#82957)

This is adding a test for https://github.com/dotnet/runtime/issues/82956 (currently assumes the wrong behavior).

Also adds a solution file which includes all three trim tools, illink, illink.analyzer and ilc. This brings several advantages:
- As we share more source files between the tools it will be much easier to work in.
- We already share test sources, so this makes it easy to run the modified test with all three tools at once (from one instance of VS)

17 months ago[android][ios] Add LibraryBuilder task to support aot library mode (#81919)
Steve Pfister [Mon, 6 Mar 2023 21:55:14 +0000 (16:55 -0500)]
[android][ios] Add LibraryBuilder task to support aot library mode (#81919)

This change adds a build task to generate a self-contained shared or static library when using the aot compiler and will only export symbols for methods decorated with UnmanagedCallersOnly attributes (similar to NativeAOT).

Contributes to #79377

17 months agoAllow PeriodicTimer to have an infinite timeout (#82986)
Stephen Toub [Mon, 6 Mar 2023 21:40:15 +0000 (16:40 -0500)]
Allow PeriodicTimer to have an infinite timeout (#82986)

* Allow PeriodicTimer to have an infinite timeout

When PeriodicTimer was introduced, we prohibited infinite timeouts as they made no sense: you couldn't change the period after construction, so creating a PeriodicTimer with an infinite timeout meant creating an instance that would never tick.  But now that we've added a Period property with a setter that allows changing the period, infinite timeouts do make sense: as with Timer, they can be used as a mechanism to stop and start the timer, e.g. creating the PeriodicTimer with infinite and only in response to some later action updating its Period to start it.

* Update PeriodicTimer.cs

17 months agoAdd IPAddress ISpanFormattable/Parsable implementations (#82913)
Stephen Toub [Mon, 6 Mar 2023 21:39:52 +0000 (16:39 -0500)]
Add IPAddress ISpanFormattable/Parsable implementations (#82913)

* Add IPAddress ISpanFormattable/Parsable implementations

* Address PR feedback

17 months agoFix for GitHub issue 76673 and regression test - incorrect static virtual method...
Tomáš Rylek [Mon, 6 Mar 2023 21:27:43 +0000 (22:27 +0100)]
Fix for GitHub issue 76673 and regression test - incorrect static virtual method resolution (#76724)

The issue tracks incorrect ordering of static virtual method lookup
methods in the CoreCLR runtime. According to the default interface
implementation ECMA 335 addendum, default interface implementation
resolution should only be used after the "old rules" failed to
resolve the method. In other words resolution on classes must go
first.

In the pre-existing implementation the for loop used to traverse
the chain of base classes was incorrectly combining
resolution on classes with default interface implementation
resolution. The fix is to walk the entire chain of base classes
first and only if that fails, attempt the default interface
implementation resolution.

17 months agoUse SecurityTransforms for RSA+PSS (#82728)
Kevin Jones [Mon, 6 Mar 2023 21:06:14 +0000 (16:06 -0500)]
Use SecurityTransforms for RSA+PSS (#82728)

* Use SecurityTransforms for RSAPSS

* Code review feedback

17 months ago[Mono] Add initial arm64 hardware intrinsics support for mini JIT (#82420)
Fan Yang [Mon, 6 Mar 2023 20:55:38 +0000 (15:55 -0500)]
[Mono] Add initial arm64 hardware intrinsics support for mini JIT (#82420)

* Initial change to make intrinsics work with mini JIT on arm64

* Fix alignment issue and add size getter functions

* Review feedback and refactor

* Fix align

* Fix issue with big offset

* Fix build warning

* Add intrinsics for get_One

* Add xconst to mdesc

* Fix MONO_PATCH_INFO_X128

* Stop the simd and fp registers sharing

* Stop v64 from emitting simd intrinsics

* Move between SIMD registers

* Adjust filter logic

* Keep the filter logic under non-llvm

* Uncomment

17 months agoUse output size helpers for cryptographic primitives (#82800)
Kevin Jones [Mon, 6 Mar 2023 20:51:00 +0000 (15:51 -0500)]
Use output size helpers for cryptographic primitives (#82800)

17 months ago[wasi] More cross compiler fixes. (#82911)
Zoltan Varga [Mon, 6 Mar 2023 20:17:12 +0000 (15:17 -0500)]
[wasi] More cross compiler fixes. (#82911)

17 months agoImplement INITBLK and CPBLK in the Jiterpreter (#83033)
Katelyn Gadd [Mon, 6 Mar 2023 19:54:53 +0000 (11:54 -0800)]
Implement INITBLK and CPBLK in the Jiterpreter (#83033)

17 months agoShare all "Compiles" tests from VTableIndexStubGenerator with ComInterfaceGenerator...
Jackson Schuster [Mon, 6 Mar 2023 19:46:13 +0000 (11:46 -0800)]
Share all "Compiles" tests from VTableIndexStubGenerator with ComInterfaceGenerator (#82657)

Co-authored-by: Jeremy Koritzinsky <jkoritzinsky@gmail.com>
17 months agoJIT: initial implementation of profile synthesis (#82926)
Andy Ayers [Mon, 6 Mar 2023 19:13:49 +0000 (11:13 -0800)]
JIT: initial implementation of profile synthesis (#82926)

Implements a profile synthesis algorithm based on the classic Wu-Larus
paper (Static branch frequency and program profile analysis, Micro-27,
1994), with a simple set of heuristics.

First step is construction of a depth-first spanning tree (DFST) for the
flowgraph, and corresponding reverse postorder (RPO). Together these drive
loop recognition; currently we only recognize reducible loops. We use DFST
(non-) ancestry as a proxy for (non-) domination: the dominator of a node
is required to be a DFST ancestor. So no explicit dominance computation is
needed. Irreducible loops are noted but ignored. Loop features like entry,
back, and exit edges, body sets, and nesting are computed and saved.

Next step is assignment of edge likelihoods. Here we use some simple local
heuristics based on loop structure, returns, and throws. A final heuristic
gives slight preference to conditional branches that fall through to the
next IL offset.

After that we use loop nesting to compute the "cyclic probability" $cp$ for
each loop, working inner to outer in loops and RPO within loops. $cp$ summarizes
the effect of flow through the loop and around loop back edges. We cap $cp$ at
no more than 1000. When finding $cp$ for outer loops we use $cp$ for inner
loops.

Once all $cp$ values are known, we assign "external" input weights to method
and EH entry points, and then a final RPO walk computes the expected weight
of each block (and, via edge likelihoods, each edge).

We use the existing DFS code to build the DFST and the RPO, augmented by
some fixes to ensure all blocks (even ones in isolated cycles) get numbered.

This initial version is intended to establish the right functionality, enable
wider correctness testing, and to provide a foundation for refinement of the
heuristics. It is not yet as efficient as it could be.

The loop recognition and recording done here overlaps with similar code
elsewhere in the JIT. The version here is structural and not sensitive to IL
patterns, so is arguably more general and I believe a good deal simpler than
the lexically driven recognition we use for the current loop optimizer.
I aspire to reconcile this somehow in future work.

All this is disabled by default; a new config option either enables using
synthesis to set block weights for all root methods or just those without PGO
data.

Synthesis for inlinees is not yet enabled; progress here is blocked by #82755.

17 months agoFix special sweep issue for workstation (#81248)
Andrew Au [Mon, 6 Mar 2023 18:48:49 +0000 (10:48 -0800)]
Fix special sweep issue for workstation (#81248)

17 months agoSimplify fgDfsReversePostorderHelper (#83018)
Bruce Forstall [Mon, 6 Mar 2023 16:48:38 +0000 (09:48 -0700)]
Simplify fgDfsReversePostorderHelper (#83018)

17 months agoFixes for partial compilation of methods (#80635)
Andy Ayers [Mon, 6 Mar 2023 16:10:52 +0000 (08:10 -0800)]
Fixes for partial compilation of methods (#80635)

* don't block GC while waiting for PC continuation to jit
* fix flow cleanup at partial compilation point

17 months agoFix cknull_ptr value tracking being incorrect for address-taken locals (#83006)
Katelyn Gadd [Mon, 6 Mar 2023 15:58:44 +0000 (07:58 -0800)]
Fix cknull_ptr value tracking being incorrect for address-taken locals (#83006)

17 months agoJIT: Assume allocations succeed (#82961)
Jakob Botsch Nielsen [Mon, 6 Mar 2023 14:32:03 +0000 (15:32 +0100)]
JIT: Assume allocations succeed (#82961)

We call a NOMEM function when allocations fail that is already marked as
no-return, but at least MSVC is not able to pick up on this fact. The
result is that all operator new calls end up with an unnecessary null
check. This adds a COMPILER_ASSUME to allow compilers to recognize
that allocations never fail.

There was also a workaround for an old VSW bug that I've removed.

17 months agoEnable more intrinsics for tier0 (#83002)
Egor Bogatov [Mon, 6 Mar 2023 11:36:59 +0000 (12:36 +0100)]
Enable more intrinsics for tier0 (#83002)

17 months agoUpdate Microsoft.NETCore.Native.targets (#83024)
Michal Strehovský [Mon, 6 Mar 2023 11:14:52 +0000 (20:14 +0900)]
Update Microsoft.NETCore.Native.targets (#83024)

17 months agoInitial support for zmm in .NET (#80960)
DeepakRajendrakumaran [Mon, 6 Mar 2023 06:03:21 +0000 (22:03 -0800)]
Initial support for zmm in .NET (#80960)

* Adding simd64 and zmm types.

* Adding other infrastructure to lower/emit code for simd64.

* Lowering + workarounds for simd64 constants.

* Fix lowering logic for Create().

* Save/restore for zmm

* Add ToDo comments for AVX512BW

* Separate AVX512F and AVX512BW + Fix disassembly.

* Review changes.

* Fixing throughput issue.

* Additional Review comments.

* Setting 'EnableIncompleteISAClass="1"' for relevant CI runs.

* Removing 64 bit flags + correcting check.

* Apply formatting patch

---------

Co-authored-by: Tanner Gooding <tagoo@outlook.com>
17 months ago[JIT] Fixed improper peephole zero-extension removal when cdq/cwde instructions are...
Will Smith [Sun, 5 Mar 2023 23:54:18 +0000 (15:54 -0800)]
[JIT] Fixed improper peephole zero-extension removal when cdq/cwde instructions are involved (#82733)

* Fixed improper peephole zero-extension removal when cdq/cdqe/cwde instructions are involved

* Update regression test

* Formatting

* Handle cdq differently

* Handle cdq differently

* Handle cdq differently

* Take into account cmpxchg

* Take into account cmpxchg

* Feedback

* Added emitIsInstrWritingToReg. Removed the previously added function.

* Remove function from header

* Quick fix

* Added comment

* Formatting

* Feedback

* Fix build

17 months agoFix BitConverter.ToXx error message (#82987)
Stephen Toub [Sun, 5 Mar 2023 23:36:44 +0000 (18:36 -0500)]
Fix BitConverter.ToXx error message (#82987)

The current message ("Destination array is not long enough to copy all the items in the collection. Check array index and length."), which is otherwise used by CopyTo methods, makes no sense in these APIs. :)

17 months agoAdd NT_SIGINFO NOTE to ELF dumps (#82449)
Mike McLaughlin [Sun, 5 Mar 2023 17:50:49 +0000 (09:50 -0800)]
Add NT_SIGINFO NOTE to ELF dumps (#82449)

* Add NT_SIGINFO NOTE to ELF dumps

Linux Watson needs this to better triage ELF dumps.

Add CreateDumpOptions helper struct to pass all the command options around. Add the
"--code", "--errno", "--address" command line options used to fill the NT_SIGINFO
NOTE. The runtime passes to createdump on a crash.

Added "ExceptionType" field to "Parameters" section of the Linux crash report json.

* Add NT_SIGINFO define

* Code review feedback

17 months agoReplace remaining instances of COMPlus with DOTNET (#82985)
Adeel Mujahid [Sun, 5 Mar 2023 16:40:20 +0000 (18:40 +0200)]
Replace remaining instances of COMPlus with DOTNET (#82985)

* Replace remaining instances of COMPlus with DOTNET

* Fix heading in RyuJIT tutorial

17 months agoReplace some unnecessary use of CompareInfo (#82988)
Stephen Toub [Sun, 5 Mar 2023 05:11:19 +0000 (00:11 -0500)]
Replace some unnecessary use of CompareInfo (#82988)

Anywhere we're explicitly passing Ordinal or OrdinalIgnoreCase, the actual culture data is ignored.  We can just use the relevant string/span methods directly.

17 months agoUpdate dependencies from https://github.com/dotnet/msquic build 20230303.1 (#82979)
dotnet-maestro[bot] [Sun, 5 Mar 2023 05:07:43 +0000 (23:07 -0600)]
Update dependencies from https://github.com/dotnet/msquic build 20230303.1 (#82979)

System.Net.MsQuic.Transport
 From Version 8.0.0-alpha.1.23124.1 -> To Version 8.0.0-alpha.1.23153.1

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
17 months agoClean up run.sh documentation (#82983)
Bruce Forstall [Sat, 4 Mar 2023 20:55:37 +0000 (13:55 -0700)]
Clean up run.sh documentation (#82983)

Add line about build configuration.

Fix illink syntax help.

Simplify a couple cases that just set environment variables.

17 months agoUpdate dependencies from https://github.com/dotnet/roslyn build 20230304.2 (#82980)
dotnet-maestro[bot] [Sat, 4 Mar 2023 20:54:28 +0000 (14:54 -0600)]
Update dependencies from https://github.com/dotnet/roslyn build 20230304.2 (#82980)

Microsoft.CodeAnalysis , Microsoft.CodeAnalysis.CSharp , Microsoft.Net.Compilers.Toolset
 From Version 4.6.0-3.23153.1 -> To Version 4.6.0-3.23154.2

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
17 months agoFix invariant check in DateTimeParse (#82971)
Stephen Toub [Sat, 4 Mar 2023 19:18:02 +0000 (14:18 -0500)]
Fix invariant check in DateTimeParse (#82971)

17 months agoUpdate dependencies from https://github.com/dotnet/arcade build 20230303.1 (#82978)
dotnet-maestro[bot] [Sat, 4 Mar 2023 18:35:49 +0000 (12:35 -0600)]
Update dependencies from https://github.com/dotnet/arcade build 20230303.1 (#82978)

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.23152.1 -> To Version 8.0.0-beta.23153.1

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
17 months ago[mono] Fix Hello World sample. (#82977)
Zoltan Varga [Sat, 4 Mar 2023 15:36:11 +0000 (10:36 -0500)]
[mono] Fix Hello World sample. (#82977)

17 months agoRemove dead link (#82972)
Bruce Forstall [Sat, 4 Mar 2023 10:33:03 +0000 (03:33 -0700)]
Remove dead link (#82972)

17 months agoEnable JitDasmWithAlignmentBoundaries and JitDasmWithAddress in Release (#82666)
Egor Bogatov [Sat, 4 Mar 2023 09:40:21 +0000 (10:40 +0100)]
Enable JitDasmWithAlignmentBoundaries and JitDasmWithAddress in Release (#82666)

17 months agoAdd RID for Fedora 39 (#82185)
Omair Majid [Sat, 4 Mar 2023 07:07:20 +0000 (02:07 -0500)]
Add RID for Fedora 39 (#82185)

The changes to runtime.json and runtime.compatibility.json were
generated by tooling.

17 months agoFix the multicore performance of mapping from an instruction pointer to a MethodDesc...
David Wrighton [Sat, 4 Mar 2023 04:50:07 +0000 (20:50 -0800)]
Fix the multicore performance of mapping from an instruction pointer to a MethodDesc (#79021)

Mapping from an instruction pointer to a MethodDesc is a critical component of the runtime used in many places, notably diagnostics, slow path delegate creation, and stackwalking.

This change provides a dramatic improvement in the performance of that logic through several techniques.

1. The mapping from IP to range of interesting memory is done via a tree structure resembling that of a page table. The result of this is that in addition to reducing the locking logic, the cost of looking up in the presence of many different loaded assemblies will be reduced to a nearly constant time.
2. That tree structure is configured so that when accessing memory which will never be freed in the lifetime of the process, the memory can be accessed without taking any locks whatsoever.
3. The code map is enhanced to include not only the code generated by the JIT/R2R code, but also to include the fixup and stub precode stubs.
4. In addition, performance improvement was done to improve the performance of slow path delegate creation in particular, by reordering which checks are done, and by writing a simplified signature parse routine for computing the number of arguments to a function.

Performance of this was tested in both the EH stackwalking scenario as well as the delegate slow path creation scenario, but the delegate logic is what will be most visible when this is checked in. (See PR #79471 for details of the additional changes necessary to take advantage of this work when doing EH) (#8393 describes the potential product impact of just improving the delegate slow path creation code)

For the delegate creation scenario the perf impact was measured to be quite substantial. These numbers are in ms to create a constant number of delegates on each thread used. Smaller is better. The test was run on a 6 core machine.

| Threads | Without fix | With this PR
| ------------- | ------------- | ----- |
| 1  | 840 |  313|
| 2 | 1977 | 316 |
| 3 | 3290 | 325 |
| 4| 4259 | 344 |
| 5 | 5140 | 351 |
| 6 | 5872 | 374|
| 7 | 6463 | 442|
| 8 | 7046 | 499|
| 9 | 7648 | 547|
| 10 | 8241 | 627|
| 11 | 8851 | 749|
| 12 | 9595 | 773|

Fixes #8393

17 months ago[wasm] Improve jiterpreter trace entry point selection heuristic (#82604)
Katelyn Gadd [Sat, 4 Mar 2023 01:07:20 +0000 (17:07 -0800)]
[wasm] Improve jiterpreter trace entry point selection heuristic (#82604)

This PR adjusts the jiterpreter's heuristic that decides where it's best to put entry points:
* Adds a requirement that entry points be at least a certain distance apart, since in some cases we can end up with trace entry points right next to each other, which isn't very useful and adds overhead. (Backwards branch targets are exempted from this so loops will still JIT properly).
* If we fail to create a trace exactly located at a backwards branch target, continue trying at blocks afterward. This should help in the rare case where the body of a loop begins with an unsupported instruction.
* When considering how long a trace actually is, we treat conditional aborts (like calls and throws) separately from ignored and supported instructions, so they don't count towards the overall size of the trace. These instructions aren't actually doing any useful work and if executed the trace will exit, so it's better not to consider them when deciding whether a trace is worth compiling.
This PR also manually inlines trace entry logic.

17 months agoTrim some overheads for "r"/"o" DateTime parsing (#82925)
Stephen Toub [Sat, 4 Mar 2023 01:06:29 +0000 (20:06 -0500)]
Trim some overheads for "r"/"o" DateTime parsing (#82925)

We were doing some unnecessary work on these fast paths.

I also noticed and cleaned up an unnecessary delegate involved in Hebrew number parsing.

17 months agoImplement managed SegmentCommandLine (#82883)
Huo Yaoyuan [Fri, 3 Mar 2023 23:00:07 +0000 (07:00 +0800)]
Implement managed SegmentCommandLine (#82883)

* Implement managed version of SegmentCommandLine

* Remove P/Invoke for CommandLineToArgv

* Update parsing to latest UCRT

* Add test and fix trailing space in command

* Fix test cases

17 months ago[wasm] Debugger tests - fix build (#82958)
Ankit Jain [Fri, 3 Mar 2023 22:27:59 +0000 (17:27 -0500)]
[wasm] Debugger tests - fix build (#82958)

* [wasm] Debugger tests - fix build

`/workspaces/runtime/src/mono/wasm/debugger/DebuggerTestSuite/TestHarnessProxy.cs(135,44): error CS8601: Possible null reference assignment`

Started being hit with https://github.com/dotnet/runtime/pull/82479 .
The other instances of this were fixed in
https://github.com/dotnet/runtime/pull/82803 .

* CI: Trigger all the wasm jobs, when roslyn is updated

And this includes the debugger tests

17 months agoJIT: fix fgDfsReversePostorder (#82950)
Andy Ayers [Fri, 3 Mar 2023 21:56:52 +0000 (13:56 -0800)]
JIT: fix fgDfsReversePostorder (#82950)

This method was not doing a proper depth first search, so the reverse postorder
it created was flawed.

17 months agoFix patterns that defeat resource string optimizations in CoreLib (#82947)
Jan Kotas [Fri, 3 Mar 2023 21:49:41 +0000 (13:49 -0800)]
Fix patterns that defeat resource string optimizations in CoreLib (#82947)

Replace the resource string keys with enums

Fixes #82759

17 months agoFix trim warning in ComponentActivator (#82952)
Elinor Fung [Fri, 3 Mar 2023 21:28:54 +0000 (13:28 -0800)]
Fix trim warning in ComponentActivator (#82952)

* Fix trim warning in ComponentActivator

* Add UnsupportedOSPlatform attributes

17 months ago[wasm] Fix min/max in the jiterpreter (#82955)
Katelyn Gadd [Fri, 3 Mar 2023 21:14:09 +0000 (13:14 -0800)]
[wasm] Fix min/max in the jiterpreter (#82955)

The math intrinsics table had a typo

17 months agouse PlatformSpecific attribute to supress platform specific Quic tests (#82933)
Tomas Weinfurt [Fri, 3 Mar 2023 21:00:24 +0000 (13:00 -0800)]
use PlatformSpecific attribute to supress platform specific Quic tests (#82933)

* use PlatformSpecific attribute to supress platform specific Quic tests

* Update src/libraries/System.Net.Quic/tests/FunctionalTests/MsQuicPlatformDetectionTests.cs

Co-authored-by: Stephen Toub <stoub@microsoft.com>
---------

Co-authored-by: Stephen Toub <stoub@microsoft.com>
17 months agoadd RID for Ubuntu 23.04 (#82284)
Tomas Weinfurt [Fri, 3 Mar 2023 20:13:53 +0000 (12:13 -0800)]
add RID for Ubuntu 23.04 (#82284)

* add RID for Ubuntu 23.04

* fix resolve

17 months ago[browser] legacy JS interop optional via WasmEnableLegacyJsInterop - native part...
Pavel Savara [Fri, 3 Mar 2023 19:24:37 +0000 (20:24 +0100)]
[browser] legacy JS interop optional via WasmEnableLegacyJsInterop - native part (#82834)

17 months ago[main] Update dependencies from dotnet/roslyn (#82479)
dotnet-maestro[bot] [Fri, 3 Mar 2023 19:17:23 +0000 (13:17 -0600)]
[main] Update dependencies from dotnet/roslyn (#82479)

* Update dependencies from https://github.com/dotnet/roslyn build 20230221.6

Microsoft.CodeAnalysis , Microsoft.CodeAnalysis.CSharp , Microsoft.Net.Compilers.Toolset
 From Version 4.6.0-2.23120.1 -> To Version 4.6.0-2.23121.6

* Update dependencies from https://github.com/dotnet/roslyn build 20230222.3

Microsoft.CodeAnalysis , Microsoft.CodeAnalysis.CSharp , Microsoft.Net.Compilers.Toolset
 From Version 4.6.0-1.23073.4 -> To Version 4.6.0-2.23122.3

* Update dependencies from https://github.com/dotnet/roslyn build 20230223.15

Microsoft.CodeAnalysis , Microsoft.CodeAnalysis.CSharp , Microsoft.Net.Compilers.Toolset
 From Version 4.6.0-1.23073.4 -> To Version 4.6.0-2.23123.15

* Update dependencies from https://github.com/dotnet/roslyn build 20230225.1

Microsoft.CodeAnalysis , Microsoft.CodeAnalysis.CSharp , Microsoft.Net.Compilers.Toolset
 From Version 4.6.0-1.23073.4 -> To Version 4.6.0-2.23125.1

* Update dependencies from https://github.com/dotnet/roslyn build 20230226.1

Microsoft.CodeAnalysis , Microsoft.CodeAnalysis.CSharp , Microsoft.Net.Compilers.Toolset
 From Version 4.6.0-1.23073.4 -> To Version 4.6.0-2.23126.1

* Update dependencies from https://github.com/dotnet/roslyn build 20230226.2

Microsoft.CodeAnalysis , Microsoft.CodeAnalysis.CSharp , Microsoft.Net.Compilers.Toolset
 From Version 4.6.0-1.23073.4 -> To Version 4.6.0-2.23126.2

* Update dependencies from https://github.com/dotnet/roslyn build 20230228.2

Microsoft.CodeAnalysis , Microsoft.CodeAnalysis.CSharp , Microsoft.Net.Compilers.Toolset
 From Version 4.6.0-1.23073.4 -> To Version 4.6.0-2.23128.2

* Update dependencies from https://github.com/dotnet/roslyn build 20230301.1

Microsoft.CodeAnalysis , Microsoft.CodeAnalysis.CSharp , Microsoft.Net.Compilers.Toolset
 From Version 4.6.0-1.23073.4 -> To Version 4.6.0-2.23151.1

* Update dependencies from https://github.com/dotnet/roslyn build 20230302.1

Microsoft.CodeAnalysis , Microsoft.CodeAnalysis.CSharp , Microsoft.Net.Compilers.Toolset
 From Version 4.6.0-1.23073.4 -> To Version 4.6.0-3.23152.1

* Update dependencies from https://github.com/dotnet/roslyn build 20230303.1

Microsoft.CodeAnalysis , Microsoft.CodeAnalysis.CSharp , Microsoft.Net.Compilers.Toolset
 From Version 4.6.0-1.23073.4 -> To Version 4.6.0-3.23153.1

---------

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Co-authored-by: Larry Ewing <lewing@microsoft.com>
17 months ago[wasm] Implement more jiterpreter opcodes (#82940)
Katelyn Gadd [Fri, 3 Mar 2023 16:59:02 +0000 (08:59 -0800)]
[wasm] Implement more jiterpreter opcodes (#82940)

* Implement a bunch of missing math opcodes like exp, log and pow
* Implement STELEM_VT

17 months ago[main] Update dependencies from 9 repositories (#82600)
dotnet-maestro[bot] [Fri, 3 Mar 2023 16:44:57 +0000 (17:44 +0100)]
[main] Update dependencies from 9 repositories (#82600)

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Co-authored-by: Ankit Jain <radical@gmail.com>
17 months agoGuard more COM interop related code (#82882)
Huo Yaoyuan [Fri, 3 Mar 2023 16:27:00 +0000 (00:27 +0800)]
Guard more COM interop related code (#82882)

17 months agoNullable annotation fixes (#82803)
Jared Parsons [Fri, 3 Mar 2023 16:01:43 +0000 (08:01 -0800)]
Nullable annotation fixes (#82803)

* Nullable annotation fixes

Once runtime merges to a Roslyn toolset that has the fix for [issue
50782](https://github.com/dotnet/roslyn/issues/50782) these annotations
will be necessary. Front loading the work here with this change.

* Apply suggestions from code review

Co-authored-by: Stephen Toub <stoub@microsoft.com>
---------

Co-authored-by: Stephen Toub <stoub@microsoft.com>
17 months ago[main] Update dependencies from dotnet/arcade (#82764)
dotnet-maestro[bot] [Fri, 3 Mar 2023 15:57:34 +0000 (16:57 +0100)]
[main] Update dependencies from dotnet/arcade (#82764)

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
17 months agoRemove cached RW mapping when the corresponding RX one is released (#82841)
Jan Vorlicek [Fri, 3 Mar 2023 15:40:52 +0000 (16:40 +0100)]
Remove cached RW mapping when the corresponding RX one is released (#82841)

When a RX mapping in the ExecutableAllocation is released and there is a
RW mapping cached for it, it incorrectly stays in the cache. So when the
same virtual address range that was just released gets reserved again
and a request to get RW mapping comes in, the cached RW mapping is used.
But it is likely that the new RX mapping has a different offset in the
underlying file mapping and thus the RW mapping is unrelated to the new
RX mapping. Using this RW mapping results either in an overwrite of a
different block of memory or just a silent dropping of what's written.

This was discovered when investigating a GC reliability framework crash.
It turned out it was also the culprit behind the #75244 issue that I
was unable to reproduce and it kept  occuring in the CI on x86 only for
quite some time.

In addition to the fix, I've found that there was an off by one
condition in the ExecutableAllocator::FindRWBlock so I've fixed that.
And I've also noticed that in UnlockedLoaderHeap::UnlockedReservePages,
if the allocation of LoaderHeapBlock failed, we would leave the data
block incorrectly on the m_pRangeList. I've fixed that too.

Close #75244

17 months agoFix typo in SingleEntry.targets property (#82935)
Adeel Mujahid [Fri, 3 Mar 2023 15:17:52 +0000 (17:17 +0200)]
Fix typo in SingleEntry.targets property (#82935)

17 months agoSupport raw ECDH key agreements
Kevin Jones [Fri, 3 Mar 2023 14:54:13 +0000 (09:54 -0500)]
Support raw ECDH key agreements

17 months ago[browser] Calculate hash for runtime assets (#82891)
Pavel Savara [Fri, 3 Mar 2023 13:18:24 +0000 (14:18 +0100)]
[browser] Calculate hash for runtime assets (#82891)

* hash assets and IL check
* @thaystg feedback about webcil hash
* @radical feedback

17 months agoIssue correct Enable/Disable commands for EventSources with EventPipe (#81867)
David Mason [Fri, 3 Mar 2023 12:05:09 +0000 (04:05 -0800)]
Issue correct Enable/Disable commands for EventSources with EventPipe (#81867)

17 months agoAllow default AsyncFlowControls rather than throwing (#82912)
Stephen Toub [Fri, 3 Mar 2023 11:43:56 +0000 (06:43 -0500)]
Allow default AsyncFlowControls rather than throwing (#82912)

ExecutionContext.SuppressFlow currently throws an exception if flow is already suppressed.  This makes it complicated to use, as you need to check whether IsFlowSuppressed first and take two different paths based on the result.  If we instead just allow SuppressFlow to return a default AsyncFlowControl rather than throwing, and have AsyncFlowControl's Undo nop rather than throw if it doesn't contain a Thread, we can again make it simple to just always use SuppressFlow without any of the other complications.

17 months ago[Mono] Enable runtime tests running on arm64 with mini JIT (#82814)
Fan Yang [Fri, 3 Mar 2023 09:55:38 +0000 (04:55 -0500)]
[Mono] Enable runtime tests running on arm64 with mini JIT (#82814)

* Enable runtime tests running on arm64 with mini JIT

* Disable failed tests

* Add tracking issue link

* Disable one more failing test

17 months ago[jiterp] Perform a single unsigned bounds check for ldelema1 (#82919)
Katelyn Gadd [Fri, 3 Mar 2023 09:40:06 +0000 (01:40 -0800)]
[jiterp] Perform a single unsigned bounds check for ldelema1 (#82919)

Array and Span both have a uint32_t length field (at least as far as wasm is concerned). If index is signed and we do an unsigned index <= length then any negative index will be treated as a massive value. For arrays it appears to be safe to exploit this and not do the >= 0 check, and interp.c doesn't do it.

17 months agoFixing a bug that causes us to mistakenly demote a gen2 region to gen0 (#82413)
Maoni Stephens [Fri, 3 Mar 2023 08:38:01 +0000 (00:38 -0800)]
Fixing a bug that causes us to mistakenly demote a gen2 region to gen0 (#82413)

We are seeing a gen0 region that's almost fully occupied (< 24 bytes free) with one giant plug (ie, no free objects at all in the region). This causes allocate_in_condemned_generations to go into an infinite loop because in ephemeral generations we expect short plugs, ie, we should be able to allocate a min free object in front of each plug. And normally we can because when we allocate objects in gen0 we make sure to break up the allocation contexts with min free objects and when we compact into gen1 we form short plugs.

We are in this situation when all of the following conditions are true -

+ we did a gen2 compacting GC that generates a pinned plug in a gen2 region almost as big as the whole region. my guess for the reason why there's this giant pinned plug is because that gen2 region was already really compact so when we called allocate_in_condemned_generations on the non pinned plugs that are next to some pinned plugs in it we discovered we can't move the non pinned plugs anyway so we artificially pinned them and formed a giant pinned plug. and during this GC those objects were no longer pinned so we have one giant non pinned plug.
+ this gen2 region needs to be the last region with pinned plugs;
+ this gen2 region hasn't been consumed by allocate_in_condemned_generations yet so it was processed by process_remaining_regions;

Then in process_remaining_regions we'll set the plan_gen_num for that gen2 region to 0 because we are doing

set_region_plan_gen_num_sip (current_region, current_plan_gen_num);

and next time we do a GC, this plug is no longer pinned (and still survived) so we call  allocate_in_condemned_generations on it which causes the infinite loop.

instead of going through the demotion logic to decide whether we should demote this region or not.

17 months agoImplement interfaces in the non-generic enumerator base (#82923)
Michal Strehovský [Fri, 3 Mar 2023 04:19:26 +0000 (13:19 +0900)]
Implement interfaces in the non-generic enumerator base (#82923)

* Implement IDisposable in the non-generic enumerator base

...so that the interface implementation details go to the non-generic dispatch map.

Saves 1.5 kB on BasicMinimalApi.

* f

17 months agoFix a few async void tests to be async Task (#82914)
Stephen Toub [Fri, 3 Mar 2023 04:15:36 +0000 (23:15 -0500)]
Fix a few async void tests to be async Task (#82914)

17 months agoRevert "Enable symbol stripping for crossgen2 (#82698)" (#82881)
Adeel Mujahid [Fri, 3 Mar 2023 03:36:19 +0000 (05:36 +0200)]
Revert "Enable symbol stripping for crossgen2 (#82698)" (#82881)

This reverts commit 6a218ab799e56d4ebaffda550de06a9a73a88b14.

17 months agoImprove DateTime.ParseExact perf for invariant culture (#82877)
Stephen Toub [Fri, 3 Mar 2023 02:46:31 +0000 (21:46 -0500)]
Improve DateTime.ParseExact perf for invariant culture (#82877)

* Improve DateTime parsing perf for invariant culture

Speed up the handling of ddd, dddd, MMM, and MMMM parts of a date time format string when using the invariant culture, which is very commonly used in parsing.  Today, when one of these is encountered, the relevant array of comparison strings is retrieved from the DateTimeFormatInfo, and each is compared as a prefix against the current position in the input, using a linguistic ignore-case comparison.  But for the invariant culture, we don't need to consult any arrays, and can do the comparison much more quickly.  These parts dominate the processing of a format like that for RFC1123.

* Address PR feedback

17 months agoSubstitute out geopolitical term in TimeZoneInfo (#82916)
Mitchell Hwang [Fri, 3 Mar 2023 01:35:24 +0000 (20:35 -0500)]
Substitute out geopolitical term in TimeZoneInfo (#82916)

17 months agoDisable SupportedWindowsPlatforms_IsSupportedIsTrue on Windows Arm64 (#82902)
Natalia Kondratyeva [Thu, 2 Mar 2023 23:44:54 +0000 (00:44 +0100)]
Disable SupportedWindowsPlatforms_IsSupportedIsTrue on Windows Arm64 (#82902)

17 months ago[mono][aot] Emit cctor instantiations for classes referenced by gshared methods....
Zoltan Varga [Thu, 2 Mar 2023 23:38:58 +0000 (18:38 -0500)]
[mono][aot] Emit cctor instantiations for classes referenced by gshared methods. (#82900)

17 months ago[mono][aot] Emit a list of exported methods into the AOT image and load them when...
Zoltan Varga [Thu, 2 Mar 2023 23:38:35 +0000 (18:38 -0500)]
[mono][aot] Emit a list of exported methods into the AOT image and load them when the image is loaded. (#82809)

If there is a runtime attach function specified, these methods can call into the runtime
before its initialized. In order for this to work, the runtime attach function needs
to load all the AOT images containing such methods, and load_aot_module () will
load and initialize these methods using the newly emitted table.

17 months agoEventPipe env var to disable stack collection (#82470)
David Mason [Thu, 2 Mar 2023 23:02:42 +0000 (15:02 -0800)]
EventPipe env var to disable stack collection (#82470)

17 months agoMark some internal/private structs as readonly (#82415)
Stephen Toub [Thu, 2 Mar 2023 22:32:57 +0000 (17:32 -0500)]
Mark some internal/private structs as readonly (#82415)

* Mark some internal/private structs as readonly

* Address PR feedback

17 months ago[wasi] CI: Provision `wasi-sdk`, and `wasmtime` only when needed (#82454)
Ankit Jain [Thu, 2 Mar 2023 21:59:25 +0000 (16:59 -0500)]
[wasi] CI: Provision `wasi-sdk`, and `wasmtime` only when needed (#82454)

* [wasm] Install wasi-sdk, and wasmtime on CI only if needed

* Add generic support for staging helix payloads

For a directory specified as a helix correlation payload, the helix
tasks will attempt to write a `.payload` file to the directory. But if the
directory is not writable then we need to stage the payload in a
writable location, before passing the path to helix.

For example, if we have `wasi-sdk` installed on the system as:
    `WASI_SDK_PATH=/usr/local/wasi-sdk`

.. then we can stage it by copying to
`artifacts/obj/helix-staging/wasi-sdk`, and then using that staging path
for the helix correlation payload.

This was already being done for `EMSDK`, and `WasiSdk` in two separate
targets. And now needs to be done for `wasmtime` also. Instead of having
completely separate targets for all this, add a new mechanism to specify
helix dependencies to stage.

For example:
```xml
  <ItemGroup>
    <HelixDependenciesToStage Condition="'$(NeedsWasmtime)' == 'true'" SourcePath="$(WasmtimeDir)"   Include="$(WasmtimeDirForHelixPayload)" />
  </ItemGroup>
```

.. and the payload can use specified as
```xml
<HelixCorrelationPayload Include="$(WasmtimeDirForHelixPayload)" Destination="wasmtime" Condition="'$(NeedsWasmtime)' == 'true'" />
```

* [wasm] CI: Fix path for wasi artifacts

These were getting created with all the wasi builds sharing the same
prefixes causing them to get overwritten.

17 months ago[wasm] Fix tests substitution conditions (#82901)
Radek Doulik [Thu, 2 Mar 2023 21:55:28 +0000 (22:55 +0100)]
[wasm] Fix tests substitution conditions (#82901)

PR #82886 fixed it for user builds, we should fix it for tests as well.

17 months agoAdd dedicated empty array enumerator for footprint reduction (#82899)
Stephen Toub [Thu, 2 Mar 2023 21:19:51 +0000 (16:19 -0500)]
Add dedicated empty array enumerator for footprint reduction (#82899)

* Add dedicated empty array enumerator for footprint reduction

Its singleton can be used in places where it's less likely the consumer will otherwise be using a T[], such that it's less likely we'll need to generate code for T[].

* Address PR feedback

17 months agoIntroducing ValidateOptionsResultBuilder (#82749)
Tarek Mahmoud Sayed [Thu, 2 Mar 2023 21:15:32 +0000 (13:15 -0800)]
Introducing  ValidateOptionsResultBuilder (#82749)

17 months agoMark Microsoft.NET.ILLink as non-shipping (#82905)
Sven Boemer [Thu, 2 Mar 2023 19:59:08 +0000 (11:59 -0800)]
Mark Microsoft.NET.ILLink as non-shipping (#82905)

This package should not be published to nuget. It is only used by xamarin, and contains the API surface for custom illink steps.

17 months ago[iOS][maccatalyst] Disable MacCatalyst and Simulator CI runs (#82915)
Steve Pfister [Thu, 2 Mar 2023 19:58:37 +0000 (14:58 -0500)]
[iOS][maccatalyst] Disable MacCatalyst and Simulator CI runs (#82915)

The work items for these configurations are failing at a high rate and causing numerous retries. Disabling temporarily to see if that helps queue traffic stabilize.

17 months agoFix string allocation in DateTimeParse.ParseByFormat (#82861)
Stephen Toub [Thu, 2 Mar 2023 19:39:50 +0000 (14:39 -0500)]
Fix string allocation in DateTimeParse.ParseByFormat (#82861)

If a quote is encountered, the parser searches for the ending quote while also handling escaped characters.  It does by adding the interim characters to a temporary ValueStringBuilder.  But it then ToString's that builder to produce a temporary string that's examined.  This is unnecessary: we can just examine the span from the VSB directly.

17 months agoStore Parallel.ForEachAsync exceptions from cancellation callbacks (#82434)
Stephen Toub [Thu, 2 Mar 2023 19:28:06 +0000 (14:28 -0500)]
Store Parallel.ForEachAsync exceptions from cancellation callbacks (#82434)

* Store Parallel.ForEachAsync exceptions from cancellation callbacks

If a cancellation callback erroneously throws an exception, make sure we store it into the list of exceptions used to complete the resulting task. In most cases, this just means we may not be returning _all_ exceptions when there are multiple.  If, however, disposal of the enumerator throws an exception and a cancellation callback throws an exception and no exceptions were thrown from the loop body, without this change the task returned from ForEachAsync likely won't be marked completed.

* Update src/libraries/System.Threading.Tasks.Parallel/tests/ParallelForEachAsyncTests.cs

17 months agoStop storing the parsed RID fallback graph (#82811)
Elinor Fung [Thu, 2 Mar 2023 19:21:16 +0000 (11:21 -0800)]
Stop storing the parsed RID fallback graph (#82811)

After startup, we only need the RID fallback graph from the root framework for component dependency resolution (AssemblyDependencyResolver). This change stops storing that graph (which is decently large for portable linux) for all applications and switches to re-populating it on demand.

Removing this stored value also lines up with the plan to move to algorithmic RID selection rather than reading from the .deps.json.

17 months agodisable tests on Server 2022 with spanish locale (#82578)
Tomas Weinfurt [Thu, 2 Mar 2023 18:22:31 +0000 (10:22 -0800)]
disable tests on Server 2022 with spanish locale (#82578)

* disable tests on Server 2022 with spanish locale

* update name

17 months agoAppend version to RID only with valid characters (#81497)
Adeel Mujahid [Thu, 2 Mar 2023 17:44:02 +0000 (19:44 +0200)]
Append version to RID only with valid characters (#81497)

This is the `init-distro-rid.sh` counterpart of 31e4f404c218eae7ba999c4df5346d30f971451c.

In `amd64/archlinux` docker container, the non-portable RID auto-detection (without explicit `-p:TargetRid=arch-x64` arg or `__DistroRid=arch-x64` env var) looks like this:

Before: `__DistroRid: arch.TEMPLATE_VERSION_ID-x64`
After: `__DistroRid: arch-x64`

17 months ago[workloads] Upstream workload fixes from 7.0 (#82069)
Steve Pfister [Thu, 2 Mar 2023 17:22:38 +0000 (12:22 -0500)]
[workloads] Upstream workload fixes from 7.0 (#82069)

Upstreamed from #75486

- The updated task now provides metadata that will allow us to split the VSDROP generation into two separate archives.
  One which only contains workload packs (needed to share DROPs across VS versions to support multi-targeting) and
  another that only contains the manifest installers and workload components.

- The ZIP archive names have been updated to disambiguate its contents and support automatic drop creation during
   staging.

Most of the changes are in eng due to the Arcade update to obtain the latest copy of the workload build tasks. Those changes are unrelated to the workload fix, but appears to be necessary.

Co-authored-by: Jacques Eloff <joeloff@users.noreply.github.com>
17 months agoEventPipe lock implementation (#82790)
Lakshan Fernando [Thu, 2 Mar 2023 17:08:32 +0000 (09:08 -0800)]
EventPipe lock implementation (#82790)

* EventPipe lock implementation

* FB

17 months agoFix Icon(Stream) handling of partial reads (#82621)
Stephen Toub [Thu, 2 Mar 2023 17:04:28 +0000 (12:04 -0500)]
Fix Icon(Stream) handling of partial reads (#82621)

Icon's ctor assumes Read on a stream will always produce as much data as was asked for, and that's not guaranteed to be the case.